LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - py_srvsvc.c (source / functions) Hit Total Coverage
Test: coverage report for v4-17-test 1498b464 Lines: 1097 31142 3.5 %
Date: 2024-06-13 04:01:37 Functions: 11 2157 0.5 %

          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_srvsvc.h"
      12             : #include "bin/default/librpc/gen_ndr/ndr_srvsvc_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           2 : static inline unsigned long long ndr_sizeof2uintmax(size_t var_size)
      33             : {
      34           2 :         switch (var_size) {
      35           0 :         case 8:
      36           0 :                 return UINT64_MAX;
      37           2 :         case 4:
      38           2 :                 return UINT32_MAX;
      39           0 :         case 2:
      40           0 :                 return UINT16_MAX;
      41           0 :         case 1:
      42           0 :                 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/security.h"
      66             : #include "librpc/gen_ndr/svcctl.h"
      67             : static PyTypeObject srvsvc_NetCharDevInfo0_Type;
      68             : static PyTypeObject srvsvc_NetCharDevCtr0_Type;
      69             : static PyTypeObject srvsvc_NetCharDevInfo1_Type;
      70             : static PyTypeObject srvsvc_NetCharDevCtr1_Type;
      71             : static PyTypeObject srvsvc_NetCharDevInfo_Type;
      72             : static PyTypeObject srvsvc_NetCharDevCtr_Type;
      73             : static PyTypeObject srvsvc_NetCharDevInfoCtr_Type;
      74             : static PyTypeObject srvsvc_NetCharDevQInfo0_Type;
      75             : static PyTypeObject srvsvc_NetCharDevQCtr0_Type;
      76             : static PyTypeObject srvsvc_NetCharDevQInfo1_Type;
      77             : static PyTypeObject srvsvc_NetCharDevQCtr1_Type;
      78             : static PyTypeObject srvsvc_NetCharDevQInfo_Type;
      79             : static PyTypeObject srvsvc_NetCharDevQCtr_Type;
      80             : static PyTypeObject srvsvc_NetCharDevQInfoCtr_Type;
      81             : static PyTypeObject srvsvc_NetConnInfo0_Type;
      82             : static PyTypeObject srvsvc_NetConnCtr0_Type;
      83             : static PyTypeObject srvsvc_NetConnInfo1_Type;
      84             : static PyTypeObject srvsvc_NetConnCtr1_Type;
      85             : static PyTypeObject srvsvc_NetConnCtr_Type;
      86             : static PyTypeObject srvsvc_NetConnInfoCtr_Type;
      87             : static PyTypeObject srvsvc_NetFileInfo2_Type;
      88             : static PyTypeObject srvsvc_NetFileCtr2_Type;
      89             : static PyTypeObject srvsvc_NetFileInfo3_Type;
      90             : static PyTypeObject srvsvc_NetFileCtr3_Type;
      91             : static PyTypeObject srvsvc_NetFileInfo_Type;
      92             : static PyTypeObject srvsvc_NetFileCtr_Type;
      93             : static PyTypeObject srvsvc_NetFileInfoCtr_Type;
      94             : static PyTypeObject srvsvc_NetSessInfo0_Type;
      95             : static PyTypeObject srvsvc_NetSessCtr0_Type;
      96             : static PyTypeObject srvsvc_NetSessInfo1_Type;
      97             : static PyTypeObject srvsvc_NetSessCtr1_Type;
      98             : static PyTypeObject srvsvc_NetSessInfo2_Type;
      99             : static PyTypeObject srvsvc_NetSessCtr2_Type;
     100             : static PyTypeObject srvsvc_NetSessInfo10_Type;
     101             : static PyTypeObject srvsvc_NetSessCtr10_Type;
     102             : static PyTypeObject srvsvc_NetSessInfo502_Type;
     103             : static PyTypeObject srvsvc_NetSessCtr502_Type;
     104             : static PyTypeObject srvsvc_NetSessCtr_Type;
     105             : static PyTypeObject srvsvc_NetSessInfoCtr_Type;
     106             : static PyTypeObject srvsvc_NetShareInfo0_Type;
     107             : static PyTypeObject srvsvc_NetShareCtr0_Type;
     108             : static PyTypeObject srvsvc_NetShareInfo1_Type;
     109             : static PyTypeObject srvsvc_NetShareCtr1_Type;
     110             : static PyTypeObject srvsvc_NetShareInfo2_Type;
     111             : static PyTypeObject srvsvc_NetShareCtr2_Type;
     112             : static PyTypeObject srvsvc_NetShareInfo501_Type;
     113             : static PyTypeObject srvsvc_NetShareCtr501_Type;
     114             : static PyTypeObject srvsvc_NetShareInfo502_Type;
     115             : static PyTypeObject srvsvc_NetShareCtr502_Type;
     116             : static PyTypeObject srvsvc_NetShareInfo1004_Type;
     117             : static PyTypeObject srvsvc_NetShareCtr1004_Type;
     118             : static PyTypeObject srvsvc_NetShareInfo1005_Type;
     119             : static PyTypeObject srvsvc_NetShareCtr1005_Type;
     120             : static PyTypeObject srvsvc_NetShareInfo1006_Type;
     121             : static PyTypeObject srvsvc_NetShareCtr1006_Type;
     122             : static PyTypeObject srvsvc_NetShareInfo1007_Type;
     123             : static PyTypeObject srvsvc_NetShareCtr1007_Type;
     124             : static PyTypeObject srvsvc_NetShareCtr1501_Type;
     125             : static PyTypeObject srvsvc_NetShareInfo_Type;
     126             : static PyTypeObject srvsvc_NetShareCtr_Type;
     127             : static PyTypeObject srvsvc_NetShareInfoCtr_Type;
     128             : static PyTypeObject srvsvc_NetSrvInfo100_Type;
     129             : static PyTypeObject srvsvc_NetSrvInfo101_Type;
     130             : static PyTypeObject srvsvc_NetSrvInfo102_Type;
     131             : static PyTypeObject srvsvc_NetSrvInfo402_Type;
     132             : static PyTypeObject srvsvc_NetSrvInfo403_Type;
     133             : static PyTypeObject srvsvc_NetSrvInfo502_Type;
     134             : static PyTypeObject srvsvc_NetSrvInfo503_Type;
     135             : static PyTypeObject srvsvc_NetSrvInfo599_Type;
     136             : static PyTypeObject srvsvc_NetSrvInfo1005_Type;
     137             : static PyTypeObject srvsvc_NetSrvInfo1010_Type;
     138             : static PyTypeObject srvsvc_NetSrvInfo1016_Type;
     139             : static PyTypeObject srvsvc_NetSrvInfo1017_Type;
     140             : static PyTypeObject srvsvc_NetSrvInfo1018_Type;
     141             : static PyTypeObject srvsvc_NetSrvInfo1107_Type;
     142             : static PyTypeObject srvsvc_NetSrvInfo1501_Type;
     143             : static PyTypeObject srvsvc_NetSrvInfo1502_Type;
     144             : static PyTypeObject srvsvc_NetSrvInfo1503_Type;
     145             : static PyTypeObject srvsvc_NetSrvInfo1506_Type;
     146             : static PyTypeObject srvsvc_NetSrvInfo1509_Type;
     147             : static PyTypeObject srvsvc_NetSrvInfo1510_Type;
     148             : static PyTypeObject srvsvc_NetSrvInfo1511_Type;
     149             : static PyTypeObject srvsvc_NetSrvInfo1512_Type;
     150             : static PyTypeObject srvsvc_NetSrvInfo1513_Type;
     151             : static PyTypeObject srvsvc_NetSrvInfo1514_Type;
     152             : static PyTypeObject srvsvc_NetSrvInfo1515_Type;
     153             : static PyTypeObject srvsvc_NetSrvInfo1516_Type;
     154             : static PyTypeObject srvsvc_NetSrvInfo1518_Type;
     155             : static PyTypeObject srvsvc_NetSrvInfo1520_Type;
     156             : static PyTypeObject srvsvc_NetSrvInfo1521_Type;
     157             : static PyTypeObject srvsvc_NetSrvInfo1522_Type;
     158             : static PyTypeObject srvsvc_NetSrvInfo1523_Type;
     159             : static PyTypeObject srvsvc_NetSrvInfo1524_Type;
     160             : static PyTypeObject srvsvc_NetSrvInfo1525_Type;
     161             : static PyTypeObject srvsvc_NetSrvInfo1528_Type;
     162             : static PyTypeObject srvsvc_NetSrvInfo1529_Type;
     163             : static PyTypeObject srvsvc_NetSrvInfo1530_Type;
     164             : static PyTypeObject srvsvc_NetSrvInfo1533_Type;
     165             : static PyTypeObject srvsvc_NetSrvInfo1534_Type;
     166             : static PyTypeObject srvsvc_NetSrvInfo1535_Type;
     167             : static PyTypeObject srvsvc_NetSrvInfo1536_Type;
     168             : static PyTypeObject srvsvc_NetSrvInfo1537_Type;
     169             : static PyTypeObject srvsvc_NetSrvInfo1538_Type;
     170             : static PyTypeObject srvsvc_NetSrvInfo1539_Type;
     171             : static PyTypeObject srvsvc_NetSrvInfo1540_Type;
     172             : static PyTypeObject srvsvc_NetSrvInfo1541_Type;
     173             : static PyTypeObject srvsvc_NetSrvInfo1542_Type;
     174             : static PyTypeObject srvsvc_NetSrvInfo1543_Type;
     175             : static PyTypeObject srvsvc_NetSrvInfo1544_Type;
     176             : static PyTypeObject srvsvc_NetSrvInfo1545_Type;
     177             : static PyTypeObject srvsvc_NetSrvInfo1546_Type;
     178             : static PyTypeObject srvsvc_NetSrvInfo1547_Type;
     179             : static PyTypeObject srvsvc_NetSrvInfo1548_Type;
     180             : static PyTypeObject srvsvc_NetSrvInfo1549_Type;
     181             : static PyTypeObject srvsvc_NetSrvInfo1550_Type;
     182             : static PyTypeObject srvsvc_NetSrvInfo1552_Type;
     183             : static PyTypeObject srvsvc_NetSrvInfo1553_Type;
     184             : static PyTypeObject srvsvc_NetSrvInfo1554_Type;
     185             : static PyTypeObject srvsvc_NetSrvInfo1555_Type;
     186             : static PyTypeObject srvsvc_NetSrvInfo1556_Type;
     187             : static PyTypeObject srvsvc_NetSrvInfo_Type;
     188             : static PyTypeObject srvsvc_NetDiskInfo0_Type;
     189             : static PyTypeObject srvsvc_NetDiskInfo_Type;
     190             : static PyTypeObject srvsvc_Statistics_Type;
     191             : static PyTypeObject srvsvc_NetTransportInfo0_Type;
     192             : static PyTypeObject srvsvc_NetTransportCtr0_Type;
     193             : static PyTypeObject srvsvc_NetTransportInfo1_Type;
     194             : static PyTypeObject srvsvc_NetTransportCtr1_Type;
     195             : static PyTypeObject srvsvc_NetTransportInfo2_Type;
     196             : static PyTypeObject srvsvc_NetTransportCtr2_Type;
     197             : static PyTypeObject srvsvc_NetTransportInfo3_Type;
     198             : static PyTypeObject srvsvc_NetTransportCtr3_Type;
     199             : static PyTypeObject srvsvc_NetTransportCtr_Type;
     200             : static PyTypeObject srvsvc_NetTransportInfoCtr_Type;
     201             : static PyTypeObject srvsvc_NetRemoteTODInfo_Type;
     202             : static PyTypeObject srvsvc_NetTransportInfo_Type;
     203             : static PyTypeObject srvsvc_InterfaceType;
     204             : static PyTypeObject srvsvc_NetCharDevEnum_Type;
     205             : static PyTypeObject srvsvc_NetCharDevGetInfo_Type;
     206             : static PyTypeObject srvsvc_NetCharDevControl_Type;
     207             : static PyTypeObject srvsvc_NetCharDevQEnum_Type;
     208             : static PyTypeObject srvsvc_NetCharDevQGetInfo_Type;
     209             : static PyTypeObject srvsvc_NetCharDevQSetInfo_Type;
     210             : static PyTypeObject srvsvc_NetCharDevQPurge_Type;
     211             : static PyTypeObject srvsvc_NetCharDevQPurgeSelf_Type;
     212             : static PyTypeObject srvsvc_NetConnEnum_Type;
     213             : static PyTypeObject srvsvc_NetFileEnum_Type;
     214             : static PyTypeObject srvsvc_NetFileGetInfo_Type;
     215             : static PyTypeObject srvsvc_NetFileClose_Type;
     216             : static PyTypeObject srvsvc_NetSessEnum_Type;
     217             : static PyTypeObject srvsvc_NetSessDel_Type;
     218             : static PyTypeObject srvsvc_NetShareAdd_Type;
     219             : static PyTypeObject srvsvc_NetShareEnumAll_Type;
     220             : static PyTypeObject srvsvc_NetShareGetInfo_Type;
     221             : static PyTypeObject srvsvc_NetShareSetInfo_Type;
     222             : static PyTypeObject srvsvc_NetShareDel_Type;
     223             : static PyTypeObject srvsvc_NetShareDelSticky_Type;
     224             : static PyTypeObject srvsvc_NetShareCheck_Type;
     225             : static PyTypeObject srvsvc_NetSrvGetInfo_Type;
     226             : static PyTypeObject srvsvc_NetSrvSetInfo_Type;
     227             : static PyTypeObject srvsvc_NetDiskEnum_Type;
     228             : static PyTypeObject srvsvc_NetServerStatisticsGet_Type;
     229             : static PyTypeObject srvsvc_NetTransportAdd_Type;
     230             : static PyTypeObject srvsvc_NetTransportEnum_Type;
     231             : static PyTypeObject srvsvc_NetTransportDel_Type;
     232             : static PyTypeObject srvsvc_NetRemoteTOD_Type;
     233             : static PyTypeObject srvsvc_NetSetServiceBits_Type;
     234             : static PyTypeObject srvsvc_NetPathType_Type;
     235             : static PyTypeObject srvsvc_NetPathCanonicalize_Type;
     236             : static PyTypeObject srvsvc_NetPathCompare_Type;
     237             : static PyTypeObject srvsvc_NetNameValidate_Type;
     238             : static PyTypeObject srvsvc_NetPRNameCompare_Type;
     239             : static PyTypeObject srvsvc_NetShareEnum_Type;
     240             : static PyTypeObject srvsvc_NetShareDelStart_Type;
     241             : static PyTypeObject srvsvc_NetShareDelCommit_Type;
     242             : static PyTypeObject srvsvc_NetGetFileSecurity_Type;
     243             : static PyTypeObject srvsvc_NetSetFileSecurity_Type;
     244             : static PyTypeObject srvsvc_NetServerTransportAddEx_Type;
     245             : static PyTypeObject srvsvc_NetServerSetServiceBitsEx_Type;
     246             : 
     247             : static PyTypeObject *BaseObject_Type;
     248             : static PyTypeObject *sec_desc_buf_Type;
     249             : static PyTypeObject *policy_handle_Type;
     250             : static PyTypeObject *ClientConnection_Type;
     251             : static PyTypeObject *ndr_syntax_id_Type;
     252             : 
     253           0 : static PyObject *py_srvsvc_NetCharDevInfo0_get_device(PyObject *obj, void *closure)
     254             : {
     255           0 :         struct srvsvc_NetCharDevInfo0 *object = (struct srvsvc_NetCharDevInfo0 *)pytalloc_get_ptr(obj);
     256             :         PyObject *py_device;
     257           0 :         if (object->device == NULL) {
     258           0 :                 Py_RETURN_NONE;
     259             :         }
     260           0 :         if (object->device == NULL) {
     261           0 :                 py_device = Py_None;
     262           0 :                 Py_INCREF(py_device);
     263             :         } else {
     264           0 :                 if (object->device == NULL) {
     265           0 :                         py_device = Py_None;
     266           0 :                         Py_INCREF(py_device);
     267             :                 } else {
     268           0 :                         py_device = PyUnicode_Decode(object->device, strlen(object->device), "utf-8", "ignore");
     269             :                 }
     270             :         }
     271           0 :         return py_device;
     272             : }
     273             : 
     274           0 : static int py_srvsvc_NetCharDevInfo0_set_device(PyObject *py_obj, PyObject *value, void *closure)
     275             : {
     276           0 :         struct srvsvc_NetCharDevInfo0 *object = (struct srvsvc_NetCharDevInfo0 *)pytalloc_get_ptr(py_obj);
     277           0 :         if (value == NULL) {
     278           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->device");
     279           0 :                 return -1;
     280             :         }
     281           0 :         if (value == Py_None) {
     282           0 :                 object->device = NULL;
     283             :         } else {
     284           0 :                 object->device = NULL;
     285             :                 {
     286             :                         const char *test_str;
     287             :                         const char *talloc_str;
     288           0 :                         PyObject *unicode = NULL;
     289           0 :                         if (PyUnicode_Check(value)) {
     290           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     291           0 :                                 if (unicode == NULL) {
     292           0 :                                         PyErr_NoMemory();
     293           0 :                                         return -1;
     294             :                                 }
     295           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     296           0 :                         } else if (PyBytes_Check(value)) {
     297           0 :                                 test_str = PyBytes_AS_STRING(value);
     298             :                         } else {
     299           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     300           0 :                                 return -1;
     301             :                         }
     302           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     303           0 :                         if (unicode != NULL) {
     304           0 :                                 Py_DECREF(unicode);
     305             :                         }
     306           0 :                         if (talloc_str == NULL) {
     307           0 :                                 PyErr_NoMemory();
     308           0 :                                 return -1;
     309             :                         }
     310           0 :                         object->device = talloc_str;
     311             :                 }
     312             :         }
     313           0 :         return 0;
     314             : }
     315             : 
     316             : static PyGetSetDef py_srvsvc_NetCharDevInfo0_getsetters[] = {
     317             :         {
     318             :                 .name = discard_const_p(char, "device"),
     319             :                 .get = py_srvsvc_NetCharDevInfo0_get_device,
     320             :                 .set = py_srvsvc_NetCharDevInfo0_set_device,
     321             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
     322             :         },
     323             :         { .name = NULL }
     324             : };
     325             : 
     326           0 : static PyObject *py_srvsvc_NetCharDevInfo0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     327             : {
     328           0 :         return pytalloc_new(struct srvsvc_NetCharDevInfo0, type);
     329             : }
     330             : 
     331             : 
     332             : static PyTypeObject srvsvc_NetCharDevInfo0_Type = {
     333             :         PyVarObject_HEAD_INIT(NULL, 0)
     334             :         .tp_name = "srvsvc.NetCharDevInfo0",
     335             :         .tp_getset = py_srvsvc_NetCharDevInfo0_getsetters,
     336             :         .tp_methods = NULL,
     337             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
     338             :         .tp_new = py_srvsvc_NetCharDevInfo0_new,
     339             : };
     340             : 
     341             : 
     342           0 : static PyObject *py_srvsvc_NetCharDevCtr0_get_count(PyObject *obj, void *closure)
     343             : {
     344           0 :         struct srvsvc_NetCharDevCtr0 *object = (struct srvsvc_NetCharDevCtr0 *)pytalloc_get_ptr(obj);
     345             :         PyObject *py_count;
     346           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
     347           0 :         return py_count;
     348             : }
     349             : 
     350           0 : static int py_srvsvc_NetCharDevCtr0_set_count(PyObject *py_obj, PyObject *value, void *closure)
     351             : {
     352           0 :         struct srvsvc_NetCharDevCtr0 *object = (struct srvsvc_NetCharDevCtr0 *)pytalloc_get_ptr(py_obj);
     353           0 :         if (value == NULL) {
     354           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
     355           0 :                 return -1;
     356             :         }
     357             :         {
     358           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
     359           0 :                 if (PyLong_Check(value)) {
     360             :                         unsigned long long test_var;
     361           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     362           0 :                         if (PyErr_Occurred() != NULL) {
     363           0 :                                 return -1;
     364             :                         }
     365           0 :                         if (test_var > uint_max) {
     366           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     367             :                                   PyLong_Type.tp_name, uint_max, test_var);
     368           0 :                                 return -1;
     369             :                         }
     370           0 :                         object->count = test_var;
     371             :                 } else {
     372           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     373             :                           PyLong_Type.tp_name);
     374           0 :                         return -1;
     375             :                 }
     376             :         }
     377           0 :         return 0;
     378             : }
     379             : 
     380           0 : static PyObject *py_srvsvc_NetCharDevCtr0_get_array(PyObject *obj, void *closure)
     381             : {
     382           0 :         struct srvsvc_NetCharDevCtr0 *object = (struct srvsvc_NetCharDevCtr0 *)pytalloc_get_ptr(obj);
     383             :         PyObject *py_array;
     384           0 :         if (object->array == NULL) {
     385           0 :                 Py_RETURN_NONE;
     386             :         }
     387           0 :         if (object->array == NULL) {
     388           0 :                 py_array = Py_None;
     389           0 :                 Py_INCREF(py_array);
     390             :         } else {
     391           0 :                 py_array = PyList_New(object->count);
     392           0 :                 if (py_array == NULL) {
     393           0 :                         return NULL;
     394             :                 }
     395             :                 {
     396             :                         int array_cntr_1;
     397           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
     398             :                                 PyObject *py_array_1;
     399           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetCharDevInfo0_Type, object->array, &object->array[array_cntr_1]);
     400           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
     401             :                         }
     402             :                 }
     403             :         }
     404           0 :         return py_array;
     405             : }
     406             : 
     407           0 : static int py_srvsvc_NetCharDevCtr0_set_array(PyObject *py_obj, PyObject *value, void *closure)
     408             : {
     409           0 :         struct srvsvc_NetCharDevCtr0 *object = (struct srvsvc_NetCharDevCtr0 *)pytalloc_get_ptr(py_obj);
     410           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
     411           0 :         if (value == NULL) {
     412           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
     413           0 :                 return -1;
     414             :         }
     415           0 :         if (value == Py_None) {
     416           0 :                 object->array = NULL;
     417             :         } else {
     418           0 :                 object->array = NULL;
     419           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
     420             :                 {
     421             :                         int array_cntr_1;
     422           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
     423           0 :                         if (!object->array) { return -1;; }
     424           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
     425           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
     426           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
     427           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
     428           0 :                                         return -1;
     429             :                                 }
     430           0 :                                 PY_CHECK_TYPE(&srvsvc_NetCharDevInfo0_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
     431           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
     432           0 :                                         PyErr_NoMemory();
     433           0 :                                         return -1;
     434             :                                 }
     435           0 :                                 object->array[array_cntr_1] = *(struct srvsvc_NetCharDevInfo0 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
     436             :                         }
     437             :                 }
     438             :         }
     439           0 :         return 0;
     440             : }
     441             : 
     442             : static PyGetSetDef py_srvsvc_NetCharDevCtr0_getsetters[] = {
     443             :         {
     444             :                 .name = discard_const_p(char, "count"),
     445             :                 .get = py_srvsvc_NetCharDevCtr0_get_count,
     446             :                 .set = py_srvsvc_NetCharDevCtr0_set_count,
     447             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     448             :         },
     449             :         {
     450             :                 .name = discard_const_p(char, "array"),
     451             :                 .get = py_srvsvc_NetCharDevCtr0_get_array,
     452             :                 .set = py_srvsvc_NetCharDevCtr0_set_array,
     453             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetCharDevInfo0")
     454             :         },
     455             :         { .name = NULL }
     456             : };
     457             : 
     458           0 : static PyObject *py_srvsvc_NetCharDevCtr0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     459             : {
     460           0 :         return pytalloc_new(struct srvsvc_NetCharDevCtr0, type);
     461             : }
     462             : 
     463             : 
     464             : static PyTypeObject srvsvc_NetCharDevCtr0_Type = {
     465             :         PyVarObject_HEAD_INIT(NULL, 0)
     466             :         .tp_name = "srvsvc.NetCharDevCtr0",
     467             :         .tp_getset = py_srvsvc_NetCharDevCtr0_getsetters,
     468             :         .tp_methods = NULL,
     469             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
     470             :         .tp_new = py_srvsvc_NetCharDevCtr0_new,
     471             : };
     472             : 
     473             : 
     474           0 : static PyObject *py_srvsvc_NetCharDevInfo1_get_device(PyObject *obj, void *closure)
     475             : {
     476           0 :         struct srvsvc_NetCharDevInfo1 *object = (struct srvsvc_NetCharDevInfo1 *)pytalloc_get_ptr(obj);
     477             :         PyObject *py_device;
     478           0 :         if (object->device == NULL) {
     479           0 :                 Py_RETURN_NONE;
     480             :         }
     481           0 :         if (object->device == NULL) {
     482           0 :                 py_device = Py_None;
     483           0 :                 Py_INCREF(py_device);
     484             :         } else {
     485           0 :                 if (object->device == NULL) {
     486           0 :                         py_device = Py_None;
     487           0 :                         Py_INCREF(py_device);
     488             :                 } else {
     489           0 :                         py_device = PyUnicode_Decode(object->device, strlen(object->device), "utf-8", "ignore");
     490             :                 }
     491             :         }
     492           0 :         return py_device;
     493             : }
     494             : 
     495           0 : static int py_srvsvc_NetCharDevInfo1_set_device(PyObject *py_obj, PyObject *value, void *closure)
     496             : {
     497           0 :         struct srvsvc_NetCharDevInfo1 *object = (struct srvsvc_NetCharDevInfo1 *)pytalloc_get_ptr(py_obj);
     498           0 :         if (value == NULL) {
     499           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->device");
     500           0 :                 return -1;
     501             :         }
     502           0 :         if (value == Py_None) {
     503           0 :                 object->device = NULL;
     504             :         } else {
     505           0 :                 object->device = NULL;
     506             :                 {
     507             :                         const char *test_str;
     508             :                         const char *talloc_str;
     509           0 :                         PyObject *unicode = NULL;
     510           0 :                         if (PyUnicode_Check(value)) {
     511           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     512           0 :                                 if (unicode == NULL) {
     513           0 :                                         PyErr_NoMemory();
     514           0 :                                         return -1;
     515             :                                 }
     516           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     517           0 :                         } else if (PyBytes_Check(value)) {
     518           0 :                                 test_str = PyBytes_AS_STRING(value);
     519             :                         } else {
     520           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     521           0 :                                 return -1;
     522             :                         }
     523           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     524           0 :                         if (unicode != NULL) {
     525           0 :                                 Py_DECREF(unicode);
     526             :                         }
     527           0 :                         if (talloc_str == NULL) {
     528           0 :                                 PyErr_NoMemory();
     529           0 :                                 return -1;
     530             :                         }
     531           0 :                         object->device = talloc_str;
     532             :                 }
     533             :         }
     534           0 :         return 0;
     535             : }
     536             : 
     537           0 : static PyObject *py_srvsvc_NetCharDevInfo1_get_status(PyObject *obj, void *closure)
     538             : {
     539           0 :         struct srvsvc_NetCharDevInfo1 *object = (struct srvsvc_NetCharDevInfo1 *)pytalloc_get_ptr(obj);
     540             :         PyObject *py_status;
     541           0 :         py_status = PyLong_FromUnsignedLongLong((uint32_t)object->status);
     542           0 :         return py_status;
     543             : }
     544             : 
     545           0 : static int py_srvsvc_NetCharDevInfo1_set_status(PyObject *py_obj, PyObject *value, void *closure)
     546             : {
     547           0 :         struct srvsvc_NetCharDevInfo1 *object = (struct srvsvc_NetCharDevInfo1 *)pytalloc_get_ptr(py_obj);
     548           0 :         if (value == NULL) {
     549           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->status");
     550           0 :                 return -1;
     551             :         }
     552             :         {
     553           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->status));
     554           0 :                 if (PyLong_Check(value)) {
     555             :                         unsigned long long test_var;
     556           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     557           0 :                         if (PyErr_Occurred() != NULL) {
     558           0 :                                 return -1;
     559             :                         }
     560           0 :                         if (test_var > uint_max) {
     561           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     562             :                                   PyLong_Type.tp_name, uint_max, test_var);
     563           0 :                                 return -1;
     564             :                         }
     565           0 :                         object->status = test_var;
     566             :                 } else {
     567           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     568             :                           PyLong_Type.tp_name);
     569           0 :                         return -1;
     570             :                 }
     571             :         }
     572           0 :         return 0;
     573             : }
     574             : 
     575           0 : static PyObject *py_srvsvc_NetCharDevInfo1_get_user(PyObject *obj, void *closure)
     576             : {
     577           0 :         struct srvsvc_NetCharDevInfo1 *object = (struct srvsvc_NetCharDevInfo1 *)pytalloc_get_ptr(obj);
     578             :         PyObject *py_user;
     579           0 :         if (object->user == NULL) {
     580           0 :                 Py_RETURN_NONE;
     581             :         }
     582           0 :         if (object->user == NULL) {
     583           0 :                 py_user = Py_None;
     584           0 :                 Py_INCREF(py_user);
     585             :         } else {
     586           0 :                 if (object->user == NULL) {
     587           0 :                         py_user = Py_None;
     588           0 :                         Py_INCREF(py_user);
     589             :                 } else {
     590           0 :                         py_user = PyUnicode_Decode(object->user, strlen(object->user), "utf-8", "ignore");
     591             :                 }
     592             :         }
     593           0 :         return py_user;
     594             : }
     595             : 
     596           0 : static int py_srvsvc_NetCharDevInfo1_set_user(PyObject *py_obj, PyObject *value, void *closure)
     597             : {
     598           0 :         struct srvsvc_NetCharDevInfo1 *object = (struct srvsvc_NetCharDevInfo1 *)pytalloc_get_ptr(py_obj);
     599           0 :         if (value == NULL) {
     600           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user");
     601           0 :                 return -1;
     602             :         }
     603           0 :         if (value == Py_None) {
     604           0 :                 object->user = NULL;
     605             :         } else {
     606           0 :                 object->user = NULL;
     607             :                 {
     608             :                         const char *test_str;
     609             :                         const char *talloc_str;
     610           0 :                         PyObject *unicode = NULL;
     611           0 :                         if (PyUnicode_Check(value)) {
     612           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     613           0 :                                 if (unicode == NULL) {
     614           0 :                                         PyErr_NoMemory();
     615           0 :                                         return -1;
     616             :                                 }
     617           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     618           0 :                         } else if (PyBytes_Check(value)) {
     619           0 :                                 test_str = PyBytes_AS_STRING(value);
     620             :                         } else {
     621           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     622           0 :                                 return -1;
     623             :                         }
     624           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     625           0 :                         if (unicode != NULL) {
     626           0 :                                 Py_DECREF(unicode);
     627             :                         }
     628           0 :                         if (talloc_str == NULL) {
     629           0 :                                 PyErr_NoMemory();
     630           0 :                                 return -1;
     631             :                         }
     632           0 :                         object->user = talloc_str;
     633             :                 }
     634             :         }
     635           0 :         return 0;
     636             : }
     637             : 
     638           0 : static PyObject *py_srvsvc_NetCharDevInfo1_get_time(PyObject *obj, void *closure)
     639             : {
     640           0 :         struct srvsvc_NetCharDevInfo1 *object = (struct srvsvc_NetCharDevInfo1 *)pytalloc_get_ptr(obj);
     641             :         PyObject *py_time;
     642           0 :         py_time = PyLong_FromUnsignedLongLong((uint32_t)object->time);
     643           0 :         return py_time;
     644             : }
     645             : 
     646           0 : static int py_srvsvc_NetCharDevInfo1_set_time(PyObject *py_obj, PyObject *value, void *closure)
     647             : {
     648           0 :         struct srvsvc_NetCharDevInfo1 *object = (struct srvsvc_NetCharDevInfo1 *)pytalloc_get_ptr(py_obj);
     649           0 :         if (value == NULL) {
     650           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->time");
     651           0 :                 return -1;
     652             :         }
     653             :         {
     654           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->time));
     655           0 :                 if (PyLong_Check(value)) {
     656             :                         unsigned long long test_var;
     657           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     658           0 :                         if (PyErr_Occurred() != NULL) {
     659           0 :                                 return -1;
     660             :                         }
     661           0 :                         if (test_var > uint_max) {
     662           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     663             :                                   PyLong_Type.tp_name, uint_max, test_var);
     664           0 :                                 return -1;
     665             :                         }
     666           0 :                         object->time = test_var;
     667             :                 } else {
     668           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     669             :                           PyLong_Type.tp_name);
     670           0 :                         return -1;
     671             :                 }
     672             :         }
     673           0 :         return 0;
     674             : }
     675             : 
     676             : static PyGetSetDef py_srvsvc_NetCharDevInfo1_getsetters[] = {
     677             :         {
     678             :                 .name = discard_const_p(char, "device"),
     679             :                 .get = py_srvsvc_NetCharDevInfo1_get_device,
     680             :                 .set = py_srvsvc_NetCharDevInfo1_set_device,
     681             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
     682             :         },
     683             :         {
     684             :                 .name = discard_const_p(char, "status"),
     685             :                 .get = py_srvsvc_NetCharDevInfo1_get_status,
     686             :                 .set = py_srvsvc_NetCharDevInfo1_set_status,
     687             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     688             :         },
     689             :         {
     690             :                 .name = discard_const_p(char, "user"),
     691             :                 .get = py_srvsvc_NetCharDevInfo1_get_user,
     692             :                 .set = py_srvsvc_NetCharDevInfo1_set_user,
     693             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
     694             :         },
     695             :         {
     696             :                 .name = discard_const_p(char, "time"),
     697             :                 .get = py_srvsvc_NetCharDevInfo1_get_time,
     698             :                 .set = py_srvsvc_NetCharDevInfo1_set_time,
     699             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     700             :         },
     701             :         { .name = NULL }
     702             : };
     703             : 
     704           0 : static PyObject *py_srvsvc_NetCharDevInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     705             : {
     706           0 :         return pytalloc_new(struct srvsvc_NetCharDevInfo1, type);
     707             : }
     708             : 
     709             : 
     710             : static PyTypeObject srvsvc_NetCharDevInfo1_Type = {
     711             :         PyVarObject_HEAD_INIT(NULL, 0)
     712             :         .tp_name = "srvsvc.NetCharDevInfo1",
     713             :         .tp_getset = py_srvsvc_NetCharDevInfo1_getsetters,
     714             :         .tp_methods = NULL,
     715             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
     716             :         .tp_new = py_srvsvc_NetCharDevInfo1_new,
     717             : };
     718             : 
     719             : 
     720           0 : static PyObject *py_srvsvc_NetCharDevCtr1_get_count(PyObject *obj, void *closure)
     721             : {
     722           0 :         struct srvsvc_NetCharDevCtr1 *object = (struct srvsvc_NetCharDevCtr1 *)pytalloc_get_ptr(obj);
     723             :         PyObject *py_count;
     724           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
     725           0 :         return py_count;
     726             : }
     727             : 
     728           0 : static int py_srvsvc_NetCharDevCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
     729             : {
     730           0 :         struct srvsvc_NetCharDevCtr1 *object = (struct srvsvc_NetCharDevCtr1 *)pytalloc_get_ptr(py_obj);
     731           0 :         if (value == NULL) {
     732           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
     733           0 :                 return -1;
     734             :         }
     735             :         {
     736           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
     737           0 :                 if (PyLong_Check(value)) {
     738             :                         unsigned long long test_var;
     739           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     740           0 :                         if (PyErr_Occurred() != NULL) {
     741           0 :                                 return -1;
     742             :                         }
     743           0 :                         if (test_var > uint_max) {
     744           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     745             :                                   PyLong_Type.tp_name, uint_max, test_var);
     746           0 :                                 return -1;
     747             :                         }
     748           0 :                         object->count = test_var;
     749             :                 } else {
     750           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     751             :                           PyLong_Type.tp_name);
     752           0 :                         return -1;
     753             :                 }
     754             :         }
     755           0 :         return 0;
     756             : }
     757             : 
     758           0 : static PyObject *py_srvsvc_NetCharDevCtr1_get_array(PyObject *obj, void *closure)
     759             : {
     760           0 :         struct srvsvc_NetCharDevCtr1 *object = (struct srvsvc_NetCharDevCtr1 *)pytalloc_get_ptr(obj);
     761             :         PyObject *py_array;
     762           0 :         if (object->array == NULL) {
     763           0 :                 Py_RETURN_NONE;
     764             :         }
     765           0 :         if (object->array == NULL) {
     766           0 :                 py_array = Py_None;
     767           0 :                 Py_INCREF(py_array);
     768             :         } else {
     769           0 :                 py_array = PyList_New(object->count);
     770           0 :                 if (py_array == NULL) {
     771           0 :                         return NULL;
     772             :                 }
     773             :                 {
     774             :                         int array_cntr_1;
     775           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
     776             :                                 PyObject *py_array_1;
     777           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetCharDevInfo1_Type, object->array, &object->array[array_cntr_1]);
     778           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
     779             :                         }
     780             :                 }
     781             :         }
     782           0 :         return py_array;
     783             : }
     784             : 
     785           0 : static int py_srvsvc_NetCharDevCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
     786             : {
     787           0 :         struct srvsvc_NetCharDevCtr1 *object = (struct srvsvc_NetCharDevCtr1 *)pytalloc_get_ptr(py_obj);
     788           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
     789           0 :         if (value == NULL) {
     790           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
     791           0 :                 return -1;
     792             :         }
     793           0 :         if (value == Py_None) {
     794           0 :                 object->array = NULL;
     795             :         } else {
     796           0 :                 object->array = NULL;
     797           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
     798             :                 {
     799             :                         int array_cntr_1;
     800           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
     801           0 :                         if (!object->array) { return -1;; }
     802           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
     803           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
     804           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
     805           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
     806           0 :                                         return -1;
     807             :                                 }
     808           0 :                                 PY_CHECK_TYPE(&srvsvc_NetCharDevInfo1_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
     809           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
     810           0 :                                         PyErr_NoMemory();
     811           0 :                                         return -1;
     812             :                                 }
     813           0 :                                 object->array[array_cntr_1] = *(struct srvsvc_NetCharDevInfo1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
     814             :                         }
     815             :                 }
     816             :         }
     817           0 :         return 0;
     818             : }
     819             : 
     820             : static PyGetSetDef py_srvsvc_NetCharDevCtr1_getsetters[] = {
     821             :         {
     822             :                 .name = discard_const_p(char, "count"),
     823             :                 .get = py_srvsvc_NetCharDevCtr1_get_count,
     824             :                 .set = py_srvsvc_NetCharDevCtr1_set_count,
     825             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     826             :         },
     827             :         {
     828             :                 .name = discard_const_p(char, "array"),
     829             :                 .get = py_srvsvc_NetCharDevCtr1_get_array,
     830             :                 .set = py_srvsvc_NetCharDevCtr1_set_array,
     831             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetCharDevInfo1")
     832             :         },
     833             :         { .name = NULL }
     834             : };
     835             : 
     836           0 : static PyObject *py_srvsvc_NetCharDevCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     837             : {
     838           0 :         return pytalloc_new(struct srvsvc_NetCharDevCtr1, type);
     839             : }
     840             : 
     841             : 
     842             : static PyTypeObject srvsvc_NetCharDevCtr1_Type = {
     843             :         PyVarObject_HEAD_INIT(NULL, 0)
     844             :         .tp_name = "srvsvc.NetCharDevCtr1",
     845             :         .tp_getset = py_srvsvc_NetCharDevCtr1_getsetters,
     846             :         .tp_methods = NULL,
     847             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
     848             :         .tp_new = py_srvsvc_NetCharDevCtr1_new,
     849             : };
     850             : 
     851           0 : static PyObject *py_import_srvsvc_NetCharDevInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevInfo *in)
     852             : {
     853             :         PyObject *ret;
     854             : 
     855           0 :         switch (level) {
     856           0 :                 case 0:
     857           0 :                         if (in->info0 == NULL) {
     858           0 :                                 ret = Py_None;
     859           0 :                                 Py_INCREF(ret);
     860             :                         } else {
     861           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetCharDevInfo0_Type, in->info0, in->info0);
     862             :                         }
     863           0 :                         return ret;
     864             : 
     865           0 :                 case 1:
     866           0 :                         if (in->info1 == NULL) {
     867           0 :                                 ret = Py_None;
     868           0 :                                 Py_INCREF(ret);
     869             :                         } else {
     870           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetCharDevInfo1_Type, in->info1, in->info1);
     871             :                         }
     872           0 :                         return ret;
     873             : 
     874           0 :                 default:
     875           0 :                         ret = Py_None;
     876           0 :                         Py_INCREF(ret);
     877           0 :                         return ret;
     878             : 
     879             :         }
     880             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
     881             :         return NULL;
     882             : }
     883             : 
     884           0 : static union srvsvc_NetCharDevInfo *py_export_srvsvc_NetCharDevInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
     885             : {
     886           0 :         union srvsvc_NetCharDevInfo *ret = talloc_zero(mem_ctx, union srvsvc_NetCharDevInfo);
     887           0 :         switch (level) {
     888           0 :                 case 0:
     889           0 :                         if (in == NULL) {
     890           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info0");
     891           0 :                                 talloc_free(ret); return NULL;
     892             :                         }
     893           0 :                         if (in == Py_None) {
     894           0 :                                 ret->info0 = NULL;
     895             :                         } else {
     896           0 :                                 ret->info0 = NULL;
     897           0 :                                 PY_CHECK_TYPE(&srvsvc_NetCharDevInfo0_Type, in, talloc_free(ret); return NULL;);
     898           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
     899           0 :                                         PyErr_NoMemory();
     900           0 :                                         talloc_free(ret); return NULL;
     901             :                                 }
     902           0 :                                 ret->info0 = (struct srvsvc_NetCharDevInfo0 *)pytalloc_get_ptr(in);
     903             :                         }
     904           0 :                         break;
     905             : 
     906           0 :                 case 1:
     907           0 :                         if (in == NULL) {
     908           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1");
     909           0 :                                 talloc_free(ret); return NULL;
     910             :                         }
     911           0 :                         if (in == Py_None) {
     912           0 :                                 ret->info1 = NULL;
     913             :                         } else {
     914           0 :                                 ret->info1 = NULL;
     915           0 :                                 PY_CHECK_TYPE(&srvsvc_NetCharDevInfo1_Type, in, talloc_free(ret); return NULL;);
     916           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
     917           0 :                                         PyErr_NoMemory();
     918           0 :                                         talloc_free(ret); return NULL;
     919             :                                 }
     920           0 :                                 ret->info1 = (struct srvsvc_NetCharDevInfo1 *)pytalloc_get_ptr(in);
     921             :                         }
     922           0 :                         break;
     923             : 
     924           0 :                 default:
     925           0 :                         break;
     926             : 
     927             :         }
     928             : 
     929           0 :         return ret;
     930             : }
     931             : 
     932           0 : static PyObject *py_srvsvc_NetCharDevInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     933             : {
     934           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
     935           0 :         PyObject *mem_ctx_obj = NULL;
     936           0 :         TALLOC_CTX *mem_ctx = NULL;
     937           0 :         int level = 0;
     938           0 :         PyObject *in_obj = NULL;
     939           0 :         union srvsvc_NetCharDevInfo *in = NULL;
     940             : 
     941           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
     942             :                 discard_const_p(char *, kwnames),
     943             :                 &mem_ctx_obj,
     944             :                 &level,
     945             :                 &in_obj)) {
     946           0 :                 return NULL;
     947             :         }
     948           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
     949           0 :         if (mem_ctx == NULL) {
     950           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
     951           0 :                 return NULL;
     952             :         }
     953           0 :         in = (union srvsvc_NetCharDevInfo *)pytalloc_get_ptr(in_obj);
     954           0 :         if (in == NULL) {
     955           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union srvsvc_NetCharDevInfo!");
     956           0 :                 return NULL;
     957             :         }
     958             : 
     959           0 :         return py_import_srvsvc_NetCharDevInfo(mem_ctx, level, in);
     960             : }
     961             : 
     962           0 : static PyObject *py_srvsvc_NetCharDevInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     963             : {
     964           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
     965           0 :         PyObject *mem_ctx_obj = NULL;
     966           0 :         TALLOC_CTX *mem_ctx = NULL;
     967           0 :         int level = 0;
     968           0 :         PyObject *in = NULL;
     969           0 :         union srvsvc_NetCharDevInfo *out = NULL;
     970             : 
     971           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
     972             :                 discard_const_p(char *, kwnames),
     973             :                 &mem_ctx_obj,
     974             :                 &level,
     975             :                 &in)) {
     976           0 :                 return NULL;
     977             :         }
     978           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
     979           0 :         if (mem_ctx == NULL) {
     980           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
     981           0 :                 return NULL;
     982             :         }
     983             : 
     984           0 :         out = py_export_srvsvc_NetCharDevInfo(mem_ctx, level, in);
     985           0 :         if (out == NULL) {
     986           0 :                 return NULL;
     987             :         }
     988             : 
     989           0 :         return pytalloc_GenericObject_reference(out);
     990             : }
     991             : 
     992             : static PyMethodDef py_srvsvc_NetCharDevInfo_methods[] = {
     993             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevInfo_import),
     994             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
     995             :                 "T.__import__(mem_ctx, level, in) => ret." },
     996             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevInfo_export),
     997             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
     998             :                 "T.__export__(mem_ctx, level, in) => ret." },
     999             :         { NULL, NULL, 0, NULL }
    1000             : };
    1001             : 
    1002           0 : static PyObject *py_srvsvc_NetCharDevInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1003             : {
    1004           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    1005           0 :         return NULL;
    1006             : }
    1007             : 
    1008             : 
    1009             : static PyTypeObject srvsvc_NetCharDevInfo_Type = {
    1010             :         PyVarObject_HEAD_INIT(NULL, 0)
    1011             :         .tp_name = "srvsvc.NetCharDevInfo",
    1012             :         .tp_getset = NULL,
    1013             :         .tp_methods = py_srvsvc_NetCharDevInfo_methods,
    1014             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1015             :         .tp_new = py_srvsvc_NetCharDevInfo_new,
    1016             : };
    1017             : 
    1018           0 : static PyObject *py_import_srvsvc_NetCharDevCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevCtr *in)
    1019             : {
    1020             :         PyObject *ret;
    1021             : 
    1022           0 :         switch (level) {
    1023           0 :                 case 0:
    1024           0 :                         if (in->ctr0 == NULL) {
    1025           0 :                                 ret = Py_None;
    1026           0 :                                 Py_INCREF(ret);
    1027             :                         } else {
    1028           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetCharDevCtr0_Type, in->ctr0, in->ctr0);
    1029             :                         }
    1030           0 :                         return ret;
    1031             : 
    1032           0 :                 case 1:
    1033           0 :                         if (in->ctr1 == NULL) {
    1034           0 :                                 ret = Py_None;
    1035           0 :                                 Py_INCREF(ret);
    1036             :                         } else {
    1037           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetCharDevCtr1_Type, in->ctr1, in->ctr1);
    1038             :                         }
    1039           0 :                         return ret;
    1040             : 
    1041           0 :                 default:
    1042           0 :                         ret = Py_None;
    1043           0 :                         Py_INCREF(ret);
    1044           0 :                         return ret;
    1045             : 
    1046             :         }
    1047             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    1048             :         return NULL;
    1049             : }
    1050             : 
    1051           0 : static union srvsvc_NetCharDevCtr *py_export_srvsvc_NetCharDevCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    1052             : {
    1053           0 :         union srvsvc_NetCharDevCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetCharDevCtr);
    1054           0 :         switch (level) {
    1055           0 :                 case 0:
    1056           0 :                         if (in == NULL) {
    1057           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr0");
    1058           0 :                                 talloc_free(ret); return NULL;
    1059             :                         }
    1060           0 :                         if (in == Py_None) {
    1061           0 :                                 ret->ctr0 = NULL;
    1062             :                         } else {
    1063           0 :                                 ret->ctr0 = NULL;
    1064           0 :                                 PY_CHECK_TYPE(&srvsvc_NetCharDevCtr0_Type, in, talloc_free(ret); return NULL;);
    1065           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    1066           0 :                                         PyErr_NoMemory();
    1067           0 :                                         talloc_free(ret); return NULL;
    1068             :                                 }
    1069           0 :                                 ret->ctr0 = (struct srvsvc_NetCharDevCtr0 *)pytalloc_get_ptr(in);
    1070             :                         }
    1071           0 :                         break;
    1072             : 
    1073           0 :                 case 1:
    1074           0 :                         if (in == NULL) {
    1075           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
    1076           0 :                                 talloc_free(ret); return NULL;
    1077             :                         }
    1078           0 :                         if (in == Py_None) {
    1079           0 :                                 ret->ctr1 = NULL;
    1080             :                         } else {
    1081           0 :                                 ret->ctr1 = NULL;
    1082           0 :                                 PY_CHECK_TYPE(&srvsvc_NetCharDevCtr1_Type, in, talloc_free(ret); return NULL;);
    1083           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    1084           0 :                                         PyErr_NoMemory();
    1085           0 :                                         talloc_free(ret); return NULL;
    1086             :                                 }
    1087           0 :                                 ret->ctr1 = (struct srvsvc_NetCharDevCtr1 *)pytalloc_get_ptr(in);
    1088             :                         }
    1089           0 :                         break;
    1090             : 
    1091           0 :                 default:
    1092           0 :                         break;
    1093             : 
    1094             :         }
    1095             : 
    1096           0 :         return ret;
    1097             : }
    1098             : 
    1099           0 : static PyObject *py_srvsvc_NetCharDevCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1100             : {
    1101           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    1102           0 :         PyObject *mem_ctx_obj = NULL;
    1103           0 :         TALLOC_CTX *mem_ctx = NULL;
    1104           0 :         int level = 0;
    1105           0 :         PyObject *in_obj = NULL;
    1106           0 :         union srvsvc_NetCharDevCtr *in = NULL;
    1107             : 
    1108           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    1109             :                 discard_const_p(char *, kwnames),
    1110             :                 &mem_ctx_obj,
    1111             :                 &level,
    1112             :                 &in_obj)) {
    1113           0 :                 return NULL;
    1114             :         }
    1115           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    1116           0 :         if (mem_ctx == NULL) {
    1117           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    1118           0 :                 return NULL;
    1119             :         }
    1120           0 :         in = (union srvsvc_NetCharDevCtr *)pytalloc_get_ptr(in_obj);
    1121           0 :         if (in == NULL) {
    1122           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union srvsvc_NetCharDevCtr!");
    1123           0 :                 return NULL;
    1124             :         }
    1125             : 
    1126           0 :         return py_import_srvsvc_NetCharDevCtr(mem_ctx, level, in);
    1127             : }
    1128             : 
    1129           0 : static PyObject *py_srvsvc_NetCharDevCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1130             : {
    1131           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    1132           0 :         PyObject *mem_ctx_obj = NULL;
    1133           0 :         TALLOC_CTX *mem_ctx = NULL;
    1134           0 :         int level = 0;
    1135           0 :         PyObject *in = NULL;
    1136           0 :         union srvsvc_NetCharDevCtr *out = NULL;
    1137             : 
    1138           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    1139             :                 discard_const_p(char *, kwnames),
    1140             :                 &mem_ctx_obj,
    1141             :                 &level,
    1142             :                 &in)) {
    1143           0 :                 return NULL;
    1144             :         }
    1145           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    1146           0 :         if (mem_ctx == NULL) {
    1147           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    1148           0 :                 return NULL;
    1149             :         }
    1150             : 
    1151           0 :         out = py_export_srvsvc_NetCharDevCtr(mem_ctx, level, in);
    1152           0 :         if (out == NULL) {
    1153           0 :                 return NULL;
    1154             :         }
    1155             : 
    1156           0 :         return pytalloc_GenericObject_reference(out);
    1157             : }
    1158             : 
    1159             : static PyMethodDef py_srvsvc_NetCharDevCtr_methods[] = {
    1160             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevCtr_import),
    1161             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    1162             :                 "T.__import__(mem_ctx, level, in) => ret." },
    1163             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevCtr_export),
    1164             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    1165             :                 "T.__export__(mem_ctx, level, in) => ret." },
    1166             :         { NULL, NULL, 0, NULL }
    1167             : };
    1168             : 
    1169           0 : static PyObject *py_srvsvc_NetCharDevCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1170             : {
    1171           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    1172           0 :         return NULL;
    1173             : }
    1174             : 
    1175             : 
    1176             : static PyTypeObject srvsvc_NetCharDevCtr_Type = {
    1177             :         PyVarObject_HEAD_INIT(NULL, 0)
    1178             :         .tp_name = "srvsvc.NetCharDevCtr",
    1179             :         .tp_getset = NULL,
    1180             :         .tp_methods = py_srvsvc_NetCharDevCtr_methods,
    1181             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1182             :         .tp_new = py_srvsvc_NetCharDevCtr_new,
    1183             : };
    1184             : 
    1185             : 
    1186           0 : static PyObject *py_srvsvc_NetCharDevInfoCtr_get_level(PyObject *obj, void *closure)
    1187             : {
    1188           0 :         struct srvsvc_NetCharDevInfoCtr *object = (struct srvsvc_NetCharDevInfoCtr *)pytalloc_get_ptr(obj);
    1189             :         PyObject *py_level;
    1190           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->level);
    1191           0 :         return py_level;
    1192             : }
    1193             : 
    1194           0 : static int py_srvsvc_NetCharDevInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
    1195             : {
    1196           0 :         struct srvsvc_NetCharDevInfoCtr *object = (struct srvsvc_NetCharDevInfoCtr *)pytalloc_get_ptr(py_obj);
    1197           0 :         if (value == NULL) {
    1198           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->level");
    1199           0 :                 return -1;
    1200             :         }
    1201             :         {
    1202           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
    1203           0 :                 if (PyLong_Check(value)) {
    1204             :                         unsigned long long test_var;
    1205           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1206           0 :                         if (PyErr_Occurred() != NULL) {
    1207           0 :                                 return -1;
    1208             :                         }
    1209           0 :                         if (test_var > uint_max) {
    1210           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1211             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1212           0 :                                 return -1;
    1213             :                         }
    1214           0 :                         object->level = test_var;
    1215             :                 } else {
    1216           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1217             :                           PyLong_Type.tp_name);
    1218           0 :                         return -1;
    1219             :                 }
    1220             :         }
    1221           0 :         return 0;
    1222             : }
    1223             : 
    1224           0 : static PyObject *py_srvsvc_NetCharDevInfoCtr_get_ctr(PyObject *obj, void *closure)
    1225             : {
    1226           0 :         struct srvsvc_NetCharDevInfoCtr *object = (struct srvsvc_NetCharDevInfoCtr *)pytalloc_get_ptr(obj);
    1227             :         PyObject *py_ctr;
    1228           0 :         py_ctr = pyrpc_import_union(&srvsvc_NetCharDevCtr_Type, pytalloc_get_mem_ctx(obj), object->level, &object->ctr, "union srvsvc_NetCharDevCtr");
    1229           0 :         if (py_ctr == NULL) {
    1230           0 :                 return NULL;
    1231             :         }
    1232           0 :         return py_ctr;
    1233             : }
    1234             : 
    1235           0 : static int py_srvsvc_NetCharDevInfoCtr_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
    1236             : {
    1237           0 :         struct srvsvc_NetCharDevInfoCtr *object = (struct srvsvc_NetCharDevInfoCtr *)pytalloc_get_ptr(py_obj);
    1238           0 :         if (value == NULL) {
    1239           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctr");
    1240           0 :                 return -1;
    1241             :         }
    1242             :         {
    1243             :                 union srvsvc_NetCharDevCtr *ctr_switch_0;
    1244           0 :                 ctr_switch_0 = (union srvsvc_NetCharDevCtr *)pyrpc_export_union(&srvsvc_NetCharDevCtr_Type, pytalloc_get_mem_ctx(py_obj), object->level, value, "union srvsvc_NetCharDevCtr");
    1245           0 :                 if (ctr_switch_0 == NULL) {
    1246           0 :                         return -1;
    1247             :                 }
    1248           0 :                 object->ctr = *ctr_switch_0;
    1249             :         }
    1250           0 :         return 0;
    1251             : }
    1252             : 
    1253             : static PyGetSetDef py_srvsvc_NetCharDevInfoCtr_getsetters[] = {
    1254             :         {
    1255             :                 .name = discard_const_p(char, "level"),
    1256             :                 .get = py_srvsvc_NetCharDevInfoCtr_get_level,
    1257             :                 .set = py_srvsvc_NetCharDevInfoCtr_set_level,
    1258             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1259             :         },
    1260             :         {
    1261             :                 .name = discard_const_p(char, "ctr"),
    1262             :                 .get = py_srvsvc_NetCharDevInfoCtr_get_ctr,
    1263             :                 .set = py_srvsvc_NetCharDevInfoCtr_set_ctr,
    1264             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetCharDevCtr")
    1265             :         },
    1266             :         { .name = NULL }
    1267             : };
    1268             : 
    1269           0 : static PyObject *py_srvsvc_NetCharDevInfoCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1270             : {
    1271           0 :         return pytalloc_new(struct srvsvc_NetCharDevInfoCtr, type);
    1272             : }
    1273             : 
    1274             : 
    1275             : static PyTypeObject srvsvc_NetCharDevInfoCtr_Type = {
    1276             :         PyVarObject_HEAD_INIT(NULL, 0)
    1277             :         .tp_name = "srvsvc.NetCharDevInfoCtr",
    1278             :         .tp_getset = py_srvsvc_NetCharDevInfoCtr_getsetters,
    1279             :         .tp_methods = NULL,
    1280             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1281             :         .tp_new = py_srvsvc_NetCharDevInfoCtr_new,
    1282             : };
    1283             : 
    1284             : 
    1285           0 : static PyObject *py_srvsvc_NetCharDevQInfo0_get_device(PyObject *obj, void *closure)
    1286             : {
    1287           0 :         struct srvsvc_NetCharDevQInfo0 *object = (struct srvsvc_NetCharDevQInfo0 *)pytalloc_get_ptr(obj);
    1288             :         PyObject *py_device;
    1289           0 :         if (object->device == NULL) {
    1290           0 :                 Py_RETURN_NONE;
    1291             :         }
    1292           0 :         if (object->device == NULL) {
    1293           0 :                 py_device = Py_None;
    1294           0 :                 Py_INCREF(py_device);
    1295             :         } else {
    1296           0 :                 if (object->device == NULL) {
    1297           0 :                         py_device = Py_None;
    1298           0 :                         Py_INCREF(py_device);
    1299             :                 } else {
    1300           0 :                         py_device = PyUnicode_Decode(object->device, strlen(object->device), "utf-8", "ignore");
    1301             :                 }
    1302             :         }
    1303           0 :         return py_device;
    1304             : }
    1305             : 
    1306           0 : static int py_srvsvc_NetCharDevQInfo0_set_device(PyObject *py_obj, PyObject *value, void *closure)
    1307             : {
    1308           0 :         struct srvsvc_NetCharDevQInfo0 *object = (struct srvsvc_NetCharDevQInfo0 *)pytalloc_get_ptr(py_obj);
    1309           0 :         if (value == NULL) {
    1310           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->device");
    1311           0 :                 return -1;
    1312             :         }
    1313           0 :         if (value == Py_None) {
    1314           0 :                 object->device = NULL;
    1315             :         } else {
    1316           0 :                 object->device = NULL;
    1317             :                 {
    1318             :                         const char *test_str;
    1319             :                         const char *talloc_str;
    1320           0 :                         PyObject *unicode = NULL;
    1321           0 :                         if (PyUnicode_Check(value)) {
    1322           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    1323           0 :                                 if (unicode == NULL) {
    1324           0 :                                         PyErr_NoMemory();
    1325           0 :                                         return -1;
    1326             :                                 }
    1327           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    1328           0 :                         } else if (PyBytes_Check(value)) {
    1329           0 :                                 test_str = PyBytes_AS_STRING(value);
    1330             :                         } else {
    1331           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    1332           0 :                                 return -1;
    1333             :                         }
    1334           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    1335           0 :                         if (unicode != NULL) {
    1336           0 :                                 Py_DECREF(unicode);
    1337             :                         }
    1338           0 :                         if (talloc_str == NULL) {
    1339           0 :                                 PyErr_NoMemory();
    1340           0 :                                 return -1;
    1341             :                         }
    1342           0 :                         object->device = talloc_str;
    1343             :                 }
    1344             :         }
    1345           0 :         return 0;
    1346             : }
    1347             : 
    1348             : static PyGetSetDef py_srvsvc_NetCharDevQInfo0_getsetters[] = {
    1349             :         {
    1350             :                 .name = discard_const_p(char, "device"),
    1351             :                 .get = py_srvsvc_NetCharDevQInfo0_get_device,
    1352             :                 .set = py_srvsvc_NetCharDevQInfo0_set_device,
    1353             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1354             :         },
    1355             :         { .name = NULL }
    1356             : };
    1357             : 
    1358           0 : static PyObject *py_srvsvc_NetCharDevQInfo0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1359             : {
    1360           0 :         return pytalloc_new(struct srvsvc_NetCharDevQInfo0, type);
    1361             : }
    1362             : 
    1363             : 
    1364             : static PyTypeObject srvsvc_NetCharDevQInfo0_Type = {
    1365             :         PyVarObject_HEAD_INIT(NULL, 0)
    1366             :         .tp_name = "srvsvc.NetCharDevQInfo0",
    1367             :         .tp_getset = py_srvsvc_NetCharDevQInfo0_getsetters,
    1368             :         .tp_methods = NULL,
    1369             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1370             :         .tp_new = py_srvsvc_NetCharDevQInfo0_new,
    1371             : };
    1372             : 
    1373             : 
    1374           0 : static PyObject *py_srvsvc_NetCharDevQCtr0_get_count(PyObject *obj, void *closure)
    1375             : {
    1376           0 :         struct srvsvc_NetCharDevQCtr0 *object = (struct srvsvc_NetCharDevQCtr0 *)pytalloc_get_ptr(obj);
    1377             :         PyObject *py_count;
    1378           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
    1379           0 :         return py_count;
    1380             : }
    1381             : 
    1382           0 : static int py_srvsvc_NetCharDevQCtr0_set_count(PyObject *py_obj, PyObject *value, void *closure)
    1383             : {
    1384           0 :         struct srvsvc_NetCharDevQCtr0 *object = (struct srvsvc_NetCharDevQCtr0 *)pytalloc_get_ptr(py_obj);
    1385           0 :         if (value == NULL) {
    1386           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
    1387           0 :                 return -1;
    1388             :         }
    1389             :         {
    1390           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    1391           0 :                 if (PyLong_Check(value)) {
    1392             :                         unsigned long long test_var;
    1393           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1394           0 :                         if (PyErr_Occurred() != NULL) {
    1395           0 :                                 return -1;
    1396             :                         }
    1397           0 :                         if (test_var > uint_max) {
    1398           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1399             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1400           0 :                                 return -1;
    1401             :                         }
    1402           0 :                         object->count = test_var;
    1403             :                 } else {
    1404           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1405             :                           PyLong_Type.tp_name);
    1406           0 :                         return -1;
    1407             :                 }
    1408             :         }
    1409           0 :         return 0;
    1410             : }
    1411             : 
    1412           0 : static PyObject *py_srvsvc_NetCharDevQCtr0_get_array(PyObject *obj, void *closure)
    1413             : {
    1414           0 :         struct srvsvc_NetCharDevQCtr0 *object = (struct srvsvc_NetCharDevQCtr0 *)pytalloc_get_ptr(obj);
    1415             :         PyObject *py_array;
    1416           0 :         if (object->array == NULL) {
    1417           0 :                 Py_RETURN_NONE;
    1418             :         }
    1419           0 :         if (object->array == NULL) {
    1420           0 :                 py_array = Py_None;
    1421           0 :                 Py_INCREF(py_array);
    1422             :         } else {
    1423           0 :                 py_array = PyList_New(object->count);
    1424           0 :                 if (py_array == NULL) {
    1425           0 :                         return NULL;
    1426             :                 }
    1427             :                 {
    1428             :                         int array_cntr_1;
    1429           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    1430             :                                 PyObject *py_array_1;
    1431           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetCharDevQInfo0_Type, object->array, &object->array[array_cntr_1]);
    1432           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    1433             :                         }
    1434             :                 }
    1435             :         }
    1436           0 :         return py_array;
    1437             : }
    1438             : 
    1439           0 : static int py_srvsvc_NetCharDevQCtr0_set_array(PyObject *py_obj, PyObject *value, void *closure)
    1440             : {
    1441           0 :         struct srvsvc_NetCharDevQCtr0 *object = (struct srvsvc_NetCharDevQCtr0 *)pytalloc_get_ptr(py_obj);
    1442           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    1443           0 :         if (value == NULL) {
    1444           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
    1445           0 :                 return -1;
    1446             :         }
    1447           0 :         if (value == Py_None) {
    1448           0 :                 object->array = NULL;
    1449             :         } else {
    1450           0 :                 object->array = NULL;
    1451           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    1452             :                 {
    1453             :                         int array_cntr_1;
    1454           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    1455           0 :                         if (!object->array) { return -1;; }
    1456           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    1457           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    1458           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    1459           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
    1460           0 :                                         return -1;
    1461             :                                 }
    1462           0 :                                 PY_CHECK_TYPE(&srvsvc_NetCharDevQInfo0_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    1463           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    1464           0 :                                         PyErr_NoMemory();
    1465           0 :                                         return -1;
    1466             :                                 }
    1467           0 :                                 object->array[array_cntr_1] = *(struct srvsvc_NetCharDevQInfo0 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    1468             :                         }
    1469             :                 }
    1470             :         }
    1471           0 :         return 0;
    1472             : }
    1473             : 
    1474             : static PyGetSetDef py_srvsvc_NetCharDevQCtr0_getsetters[] = {
    1475             :         {
    1476             :                 .name = discard_const_p(char, "count"),
    1477             :                 .get = py_srvsvc_NetCharDevQCtr0_get_count,
    1478             :                 .set = py_srvsvc_NetCharDevQCtr0_set_count,
    1479             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1480             :         },
    1481             :         {
    1482             :                 .name = discard_const_p(char, "array"),
    1483             :                 .get = py_srvsvc_NetCharDevQCtr0_get_array,
    1484             :                 .set = py_srvsvc_NetCharDevQCtr0_set_array,
    1485             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetCharDevQInfo0")
    1486             :         },
    1487             :         { .name = NULL }
    1488             : };
    1489             : 
    1490           0 : static PyObject *py_srvsvc_NetCharDevQCtr0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1491             : {
    1492           0 :         return pytalloc_new(struct srvsvc_NetCharDevQCtr0, type);
    1493             : }
    1494             : 
    1495             : 
    1496             : static PyTypeObject srvsvc_NetCharDevQCtr0_Type = {
    1497             :         PyVarObject_HEAD_INIT(NULL, 0)
    1498             :         .tp_name = "srvsvc.NetCharDevQCtr0",
    1499             :         .tp_getset = py_srvsvc_NetCharDevQCtr0_getsetters,
    1500             :         .tp_methods = NULL,
    1501             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1502             :         .tp_new = py_srvsvc_NetCharDevQCtr0_new,
    1503             : };
    1504             : 
    1505             : 
    1506           0 : static PyObject *py_srvsvc_NetCharDevQInfo1_get_device(PyObject *obj, void *closure)
    1507             : {
    1508           0 :         struct srvsvc_NetCharDevQInfo1 *object = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(obj);
    1509             :         PyObject *py_device;
    1510           0 :         if (object->device == NULL) {
    1511           0 :                 Py_RETURN_NONE;
    1512             :         }
    1513           0 :         if (object->device == NULL) {
    1514           0 :                 py_device = Py_None;
    1515           0 :                 Py_INCREF(py_device);
    1516             :         } else {
    1517           0 :                 if (object->device == NULL) {
    1518           0 :                         py_device = Py_None;
    1519           0 :                         Py_INCREF(py_device);
    1520             :                 } else {
    1521           0 :                         py_device = PyUnicode_Decode(object->device, strlen(object->device), "utf-8", "ignore");
    1522             :                 }
    1523             :         }
    1524           0 :         return py_device;
    1525             : }
    1526             : 
    1527           0 : static int py_srvsvc_NetCharDevQInfo1_set_device(PyObject *py_obj, PyObject *value, void *closure)
    1528             : {
    1529           0 :         struct srvsvc_NetCharDevQInfo1 *object = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(py_obj);
    1530           0 :         if (value == NULL) {
    1531           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->device");
    1532           0 :                 return -1;
    1533             :         }
    1534           0 :         if (value == Py_None) {
    1535           0 :                 object->device = NULL;
    1536             :         } else {
    1537           0 :                 object->device = NULL;
    1538             :                 {
    1539             :                         const char *test_str;
    1540             :                         const char *talloc_str;
    1541           0 :                         PyObject *unicode = NULL;
    1542           0 :                         if (PyUnicode_Check(value)) {
    1543           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    1544           0 :                                 if (unicode == NULL) {
    1545           0 :                                         PyErr_NoMemory();
    1546           0 :                                         return -1;
    1547             :                                 }
    1548           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    1549           0 :                         } else if (PyBytes_Check(value)) {
    1550           0 :                                 test_str = PyBytes_AS_STRING(value);
    1551             :                         } else {
    1552           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    1553           0 :                                 return -1;
    1554             :                         }
    1555           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    1556           0 :                         if (unicode != NULL) {
    1557           0 :                                 Py_DECREF(unicode);
    1558             :                         }
    1559           0 :                         if (talloc_str == NULL) {
    1560           0 :                                 PyErr_NoMemory();
    1561           0 :                                 return -1;
    1562             :                         }
    1563           0 :                         object->device = talloc_str;
    1564             :                 }
    1565             :         }
    1566           0 :         return 0;
    1567             : }
    1568             : 
    1569           0 : static PyObject *py_srvsvc_NetCharDevQInfo1_get_priority(PyObject *obj, void *closure)
    1570             : {
    1571           0 :         struct srvsvc_NetCharDevQInfo1 *object = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(obj);
    1572             :         PyObject *py_priority;
    1573           0 :         py_priority = PyLong_FromUnsignedLongLong((uint32_t)object->priority);
    1574           0 :         return py_priority;
    1575             : }
    1576             : 
    1577           0 : static int py_srvsvc_NetCharDevQInfo1_set_priority(PyObject *py_obj, PyObject *value, void *closure)
    1578             : {
    1579           0 :         struct srvsvc_NetCharDevQInfo1 *object = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(py_obj);
    1580           0 :         if (value == NULL) {
    1581           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->priority");
    1582           0 :                 return -1;
    1583             :         }
    1584             :         {
    1585           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->priority));
    1586           0 :                 if (PyLong_Check(value)) {
    1587             :                         unsigned long long test_var;
    1588           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1589           0 :                         if (PyErr_Occurred() != NULL) {
    1590           0 :                                 return -1;
    1591             :                         }
    1592           0 :                         if (test_var > uint_max) {
    1593           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1594             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1595           0 :                                 return -1;
    1596             :                         }
    1597           0 :                         object->priority = test_var;
    1598             :                 } else {
    1599           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1600             :                           PyLong_Type.tp_name);
    1601           0 :                         return -1;
    1602             :                 }
    1603             :         }
    1604           0 :         return 0;
    1605             : }
    1606             : 
    1607           0 : static PyObject *py_srvsvc_NetCharDevQInfo1_get_devices(PyObject *obj, void *closure)
    1608             : {
    1609           0 :         struct srvsvc_NetCharDevQInfo1 *object = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(obj);
    1610             :         PyObject *py_devices;
    1611           0 :         if (object->devices == NULL) {
    1612           0 :                 Py_RETURN_NONE;
    1613             :         }
    1614           0 :         if (object->devices == NULL) {
    1615           0 :                 py_devices = Py_None;
    1616           0 :                 Py_INCREF(py_devices);
    1617             :         } else {
    1618           0 :                 if (object->devices == NULL) {
    1619           0 :                         py_devices = Py_None;
    1620           0 :                         Py_INCREF(py_devices);
    1621             :                 } else {
    1622           0 :                         py_devices = PyUnicode_Decode(object->devices, strlen(object->devices), "utf-8", "ignore");
    1623             :                 }
    1624             :         }
    1625           0 :         return py_devices;
    1626             : }
    1627             : 
    1628           0 : static int py_srvsvc_NetCharDevQInfo1_set_devices(PyObject *py_obj, PyObject *value, void *closure)
    1629             : {
    1630           0 :         struct srvsvc_NetCharDevQInfo1 *object = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(py_obj);
    1631           0 :         if (value == NULL) {
    1632           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->devices");
    1633           0 :                 return -1;
    1634             :         }
    1635           0 :         if (value == Py_None) {
    1636           0 :                 object->devices = NULL;
    1637             :         } else {
    1638           0 :                 object->devices = NULL;
    1639             :                 {
    1640             :                         const char *test_str;
    1641             :                         const char *talloc_str;
    1642           0 :                         PyObject *unicode = NULL;
    1643           0 :                         if (PyUnicode_Check(value)) {
    1644           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    1645           0 :                                 if (unicode == NULL) {
    1646           0 :                                         PyErr_NoMemory();
    1647           0 :                                         return -1;
    1648             :                                 }
    1649           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    1650           0 :                         } else if (PyBytes_Check(value)) {
    1651           0 :                                 test_str = PyBytes_AS_STRING(value);
    1652             :                         } else {
    1653           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    1654           0 :                                 return -1;
    1655             :                         }
    1656           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    1657           0 :                         if (unicode != NULL) {
    1658           0 :                                 Py_DECREF(unicode);
    1659             :                         }
    1660           0 :                         if (talloc_str == NULL) {
    1661           0 :                                 PyErr_NoMemory();
    1662           0 :                                 return -1;
    1663             :                         }
    1664           0 :                         object->devices = talloc_str;
    1665             :                 }
    1666             :         }
    1667           0 :         return 0;
    1668             : }
    1669             : 
    1670           0 : static PyObject *py_srvsvc_NetCharDevQInfo1_get_users(PyObject *obj, void *closure)
    1671             : {
    1672           0 :         struct srvsvc_NetCharDevQInfo1 *object = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(obj);
    1673             :         PyObject *py_users;
    1674           0 :         py_users = PyLong_FromUnsignedLongLong((uint32_t)object->users);
    1675           0 :         return py_users;
    1676             : }
    1677             : 
    1678           0 : static int py_srvsvc_NetCharDevQInfo1_set_users(PyObject *py_obj, PyObject *value, void *closure)
    1679             : {
    1680           0 :         struct srvsvc_NetCharDevQInfo1 *object = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(py_obj);
    1681           0 :         if (value == NULL) {
    1682           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->users");
    1683           0 :                 return -1;
    1684             :         }
    1685             :         {
    1686           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->users));
    1687           0 :                 if (PyLong_Check(value)) {
    1688             :                         unsigned long long test_var;
    1689           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1690           0 :                         if (PyErr_Occurred() != NULL) {
    1691           0 :                                 return -1;
    1692             :                         }
    1693           0 :                         if (test_var > uint_max) {
    1694           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1695             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1696           0 :                                 return -1;
    1697             :                         }
    1698           0 :                         object->users = test_var;
    1699             :                 } else {
    1700           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1701             :                           PyLong_Type.tp_name);
    1702           0 :                         return -1;
    1703             :                 }
    1704             :         }
    1705           0 :         return 0;
    1706             : }
    1707             : 
    1708           0 : static PyObject *py_srvsvc_NetCharDevQInfo1_get_num_ahead(PyObject *obj, void *closure)
    1709             : {
    1710           0 :         struct srvsvc_NetCharDevQInfo1 *object = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(obj);
    1711             :         PyObject *py_num_ahead;
    1712           0 :         py_num_ahead = PyLong_FromUnsignedLongLong((uint32_t)object->num_ahead);
    1713           0 :         return py_num_ahead;
    1714             : }
    1715             : 
    1716           0 : static int py_srvsvc_NetCharDevQInfo1_set_num_ahead(PyObject *py_obj, PyObject *value, void *closure)
    1717             : {
    1718           0 :         struct srvsvc_NetCharDevQInfo1 *object = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(py_obj);
    1719           0 :         if (value == NULL) {
    1720           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_ahead");
    1721           0 :                 return -1;
    1722             :         }
    1723             :         {
    1724           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_ahead));
    1725           0 :                 if (PyLong_Check(value)) {
    1726             :                         unsigned long long test_var;
    1727           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1728           0 :                         if (PyErr_Occurred() != NULL) {
    1729           0 :                                 return -1;
    1730             :                         }
    1731           0 :                         if (test_var > uint_max) {
    1732           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1733             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1734           0 :                                 return -1;
    1735             :                         }
    1736           0 :                         object->num_ahead = test_var;
    1737             :                 } else {
    1738           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1739             :                           PyLong_Type.tp_name);
    1740           0 :                         return -1;
    1741             :                 }
    1742             :         }
    1743           0 :         return 0;
    1744             : }
    1745             : 
    1746             : static PyGetSetDef py_srvsvc_NetCharDevQInfo1_getsetters[] = {
    1747             :         {
    1748             :                 .name = discard_const_p(char, "device"),
    1749             :                 .get = py_srvsvc_NetCharDevQInfo1_get_device,
    1750             :                 .set = py_srvsvc_NetCharDevQInfo1_set_device,
    1751             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1752             :         },
    1753             :         {
    1754             :                 .name = discard_const_p(char, "priority"),
    1755             :                 .get = py_srvsvc_NetCharDevQInfo1_get_priority,
    1756             :                 .set = py_srvsvc_NetCharDevQInfo1_set_priority,
    1757             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1758             :         },
    1759             :         {
    1760             :                 .name = discard_const_p(char, "devices"),
    1761             :                 .get = py_srvsvc_NetCharDevQInfo1_get_devices,
    1762             :                 .set = py_srvsvc_NetCharDevQInfo1_set_devices,
    1763             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1764             :         },
    1765             :         {
    1766             :                 .name = discard_const_p(char, "users"),
    1767             :                 .get = py_srvsvc_NetCharDevQInfo1_get_users,
    1768             :                 .set = py_srvsvc_NetCharDevQInfo1_set_users,
    1769             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1770             :         },
    1771             :         {
    1772             :                 .name = discard_const_p(char, "num_ahead"),
    1773             :                 .get = py_srvsvc_NetCharDevQInfo1_get_num_ahead,
    1774             :                 .set = py_srvsvc_NetCharDevQInfo1_set_num_ahead,
    1775             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1776             :         },
    1777             :         { .name = NULL }
    1778             : };
    1779             : 
    1780           0 : static PyObject *py_srvsvc_NetCharDevQInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1781             : {
    1782           0 :         return pytalloc_new(struct srvsvc_NetCharDevQInfo1, type);
    1783             : }
    1784             : 
    1785             : 
    1786             : static PyTypeObject srvsvc_NetCharDevQInfo1_Type = {
    1787             :         PyVarObject_HEAD_INIT(NULL, 0)
    1788             :         .tp_name = "srvsvc.NetCharDevQInfo1",
    1789             :         .tp_getset = py_srvsvc_NetCharDevQInfo1_getsetters,
    1790             :         .tp_methods = NULL,
    1791             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1792             :         .tp_new = py_srvsvc_NetCharDevQInfo1_new,
    1793             : };
    1794             : 
    1795             : 
    1796           0 : static PyObject *py_srvsvc_NetCharDevQCtr1_get_count(PyObject *obj, void *closure)
    1797             : {
    1798           0 :         struct srvsvc_NetCharDevQCtr1 *object = (struct srvsvc_NetCharDevQCtr1 *)pytalloc_get_ptr(obj);
    1799             :         PyObject *py_count;
    1800           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
    1801           0 :         return py_count;
    1802             : }
    1803             : 
    1804           0 : static int py_srvsvc_NetCharDevQCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
    1805             : {
    1806           0 :         struct srvsvc_NetCharDevQCtr1 *object = (struct srvsvc_NetCharDevQCtr1 *)pytalloc_get_ptr(py_obj);
    1807           0 :         if (value == NULL) {
    1808           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
    1809           0 :                 return -1;
    1810             :         }
    1811             :         {
    1812           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    1813           0 :                 if (PyLong_Check(value)) {
    1814             :                         unsigned long long test_var;
    1815           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1816           0 :                         if (PyErr_Occurred() != NULL) {
    1817           0 :                                 return -1;
    1818             :                         }
    1819           0 :                         if (test_var > uint_max) {
    1820           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1821             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1822           0 :                                 return -1;
    1823             :                         }
    1824           0 :                         object->count = test_var;
    1825             :                 } else {
    1826           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1827             :                           PyLong_Type.tp_name);
    1828           0 :                         return -1;
    1829             :                 }
    1830             :         }
    1831           0 :         return 0;
    1832             : }
    1833             : 
    1834           0 : static PyObject *py_srvsvc_NetCharDevQCtr1_get_array(PyObject *obj, void *closure)
    1835             : {
    1836           0 :         struct srvsvc_NetCharDevQCtr1 *object = (struct srvsvc_NetCharDevQCtr1 *)pytalloc_get_ptr(obj);
    1837             :         PyObject *py_array;
    1838           0 :         if (object->array == NULL) {
    1839           0 :                 Py_RETURN_NONE;
    1840             :         }
    1841           0 :         if (object->array == NULL) {
    1842           0 :                 py_array = Py_None;
    1843           0 :                 Py_INCREF(py_array);
    1844             :         } else {
    1845           0 :                 py_array = PyList_New(object->count);
    1846           0 :                 if (py_array == NULL) {
    1847           0 :                         return NULL;
    1848             :                 }
    1849             :                 {
    1850             :                         int array_cntr_1;
    1851           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    1852             :                                 PyObject *py_array_1;
    1853           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetCharDevQInfo1_Type, object->array, &object->array[array_cntr_1]);
    1854           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    1855             :                         }
    1856             :                 }
    1857             :         }
    1858           0 :         return py_array;
    1859             : }
    1860             : 
    1861           0 : static int py_srvsvc_NetCharDevQCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
    1862             : {
    1863           0 :         struct srvsvc_NetCharDevQCtr1 *object = (struct srvsvc_NetCharDevQCtr1 *)pytalloc_get_ptr(py_obj);
    1864           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    1865           0 :         if (value == NULL) {
    1866           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
    1867           0 :                 return -1;
    1868             :         }
    1869           0 :         if (value == Py_None) {
    1870           0 :                 object->array = NULL;
    1871             :         } else {
    1872           0 :                 object->array = NULL;
    1873           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    1874             :                 {
    1875             :                         int array_cntr_1;
    1876           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    1877           0 :                         if (!object->array) { return -1;; }
    1878           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    1879           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    1880           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    1881           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
    1882           0 :                                         return -1;
    1883             :                                 }
    1884           0 :                                 PY_CHECK_TYPE(&srvsvc_NetCharDevQInfo1_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    1885           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    1886           0 :                                         PyErr_NoMemory();
    1887           0 :                                         return -1;
    1888             :                                 }
    1889           0 :                                 object->array[array_cntr_1] = *(struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    1890             :                         }
    1891             :                 }
    1892             :         }
    1893           0 :         return 0;
    1894             : }
    1895             : 
    1896             : static PyGetSetDef py_srvsvc_NetCharDevQCtr1_getsetters[] = {
    1897             :         {
    1898             :                 .name = discard_const_p(char, "count"),
    1899             :                 .get = py_srvsvc_NetCharDevQCtr1_get_count,
    1900             :                 .set = py_srvsvc_NetCharDevQCtr1_set_count,
    1901             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1902             :         },
    1903             :         {
    1904             :                 .name = discard_const_p(char, "array"),
    1905             :                 .get = py_srvsvc_NetCharDevQCtr1_get_array,
    1906             :                 .set = py_srvsvc_NetCharDevQCtr1_set_array,
    1907             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetCharDevQInfo1")
    1908             :         },
    1909             :         { .name = NULL }
    1910             : };
    1911             : 
    1912           0 : static PyObject *py_srvsvc_NetCharDevQCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1913             : {
    1914           0 :         return pytalloc_new(struct srvsvc_NetCharDevQCtr1, type);
    1915             : }
    1916             : 
    1917             : 
    1918             : static PyTypeObject srvsvc_NetCharDevQCtr1_Type = {
    1919             :         PyVarObject_HEAD_INIT(NULL, 0)
    1920             :         .tp_name = "srvsvc.NetCharDevQCtr1",
    1921             :         .tp_getset = py_srvsvc_NetCharDevQCtr1_getsetters,
    1922             :         .tp_methods = NULL,
    1923             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1924             :         .tp_new = py_srvsvc_NetCharDevQCtr1_new,
    1925             : };
    1926             : 
    1927           0 : static PyObject *py_import_srvsvc_NetCharDevQInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevQInfo *in)
    1928             : {
    1929             :         PyObject *ret;
    1930             : 
    1931           0 :         switch (level) {
    1932           0 :                 case 0:
    1933           0 :                         if (in->info0 == NULL) {
    1934           0 :                                 ret = Py_None;
    1935           0 :                                 Py_INCREF(ret);
    1936             :                         } else {
    1937           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetCharDevQInfo0_Type, in->info0, in->info0);
    1938             :                         }
    1939           0 :                         return ret;
    1940             : 
    1941           0 :                 case 1:
    1942           0 :                         if (in->info1 == NULL) {
    1943           0 :                                 ret = Py_None;
    1944           0 :                                 Py_INCREF(ret);
    1945             :                         } else {
    1946           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetCharDevQInfo1_Type, in->info1, in->info1);
    1947             :                         }
    1948           0 :                         return ret;
    1949             : 
    1950           0 :                 default:
    1951           0 :                         ret = Py_None;
    1952           0 :                         Py_INCREF(ret);
    1953           0 :                         return ret;
    1954             : 
    1955             :         }
    1956             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    1957             :         return NULL;
    1958             : }
    1959             : 
    1960           0 : static union srvsvc_NetCharDevQInfo *py_export_srvsvc_NetCharDevQInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    1961             : {
    1962           0 :         union srvsvc_NetCharDevQInfo *ret = talloc_zero(mem_ctx, union srvsvc_NetCharDevQInfo);
    1963           0 :         switch (level) {
    1964           0 :                 case 0:
    1965           0 :                         if (in == NULL) {
    1966           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info0");
    1967           0 :                                 talloc_free(ret); return NULL;
    1968             :                         }
    1969           0 :                         if (in == Py_None) {
    1970           0 :                                 ret->info0 = NULL;
    1971             :                         } else {
    1972           0 :                                 ret->info0 = NULL;
    1973           0 :                                 PY_CHECK_TYPE(&srvsvc_NetCharDevQInfo0_Type, in, talloc_free(ret); return NULL;);
    1974           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    1975           0 :                                         PyErr_NoMemory();
    1976           0 :                                         talloc_free(ret); return NULL;
    1977             :                                 }
    1978           0 :                                 ret->info0 = (struct srvsvc_NetCharDevQInfo0 *)pytalloc_get_ptr(in);
    1979             :                         }
    1980           0 :                         break;
    1981             : 
    1982           0 :                 case 1:
    1983           0 :                         if (in == NULL) {
    1984           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1");
    1985           0 :                                 talloc_free(ret); return NULL;
    1986             :                         }
    1987           0 :                         if (in == Py_None) {
    1988           0 :                                 ret->info1 = NULL;
    1989             :                         } else {
    1990           0 :                                 ret->info1 = NULL;
    1991           0 :                                 PY_CHECK_TYPE(&srvsvc_NetCharDevQInfo1_Type, in, talloc_free(ret); return NULL;);
    1992           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    1993           0 :                                         PyErr_NoMemory();
    1994           0 :                                         talloc_free(ret); return NULL;
    1995             :                                 }
    1996           0 :                                 ret->info1 = (struct srvsvc_NetCharDevQInfo1 *)pytalloc_get_ptr(in);
    1997             :                         }
    1998           0 :                         break;
    1999             : 
    2000           0 :                 default:
    2001           0 :                         break;
    2002             : 
    2003             :         }
    2004             : 
    2005           0 :         return ret;
    2006             : }
    2007             : 
    2008           0 : static PyObject *py_srvsvc_NetCharDevQInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2009             : {
    2010           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    2011           0 :         PyObject *mem_ctx_obj = NULL;
    2012           0 :         TALLOC_CTX *mem_ctx = NULL;
    2013           0 :         int level = 0;
    2014           0 :         PyObject *in_obj = NULL;
    2015           0 :         union srvsvc_NetCharDevQInfo *in = NULL;
    2016             : 
    2017           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    2018             :                 discard_const_p(char *, kwnames),
    2019             :                 &mem_ctx_obj,
    2020             :                 &level,
    2021             :                 &in_obj)) {
    2022           0 :                 return NULL;
    2023             :         }
    2024           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    2025           0 :         if (mem_ctx == NULL) {
    2026           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    2027           0 :                 return NULL;
    2028             :         }
    2029           0 :         in = (union srvsvc_NetCharDevQInfo *)pytalloc_get_ptr(in_obj);
    2030           0 :         if (in == NULL) {
    2031           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union srvsvc_NetCharDevQInfo!");
    2032           0 :                 return NULL;
    2033             :         }
    2034             : 
    2035           0 :         return py_import_srvsvc_NetCharDevQInfo(mem_ctx, level, in);
    2036             : }
    2037             : 
    2038           0 : static PyObject *py_srvsvc_NetCharDevQInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2039             : {
    2040           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    2041           0 :         PyObject *mem_ctx_obj = NULL;
    2042           0 :         TALLOC_CTX *mem_ctx = NULL;
    2043           0 :         int level = 0;
    2044           0 :         PyObject *in = NULL;
    2045           0 :         union srvsvc_NetCharDevQInfo *out = NULL;
    2046             : 
    2047           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    2048             :                 discard_const_p(char *, kwnames),
    2049             :                 &mem_ctx_obj,
    2050             :                 &level,
    2051             :                 &in)) {
    2052           0 :                 return NULL;
    2053             :         }
    2054           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    2055           0 :         if (mem_ctx == NULL) {
    2056           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    2057           0 :                 return NULL;
    2058             :         }
    2059             : 
    2060           0 :         out = py_export_srvsvc_NetCharDevQInfo(mem_ctx, level, in);
    2061           0 :         if (out == NULL) {
    2062           0 :                 return NULL;
    2063             :         }
    2064             : 
    2065           0 :         return pytalloc_GenericObject_reference(out);
    2066             : }
    2067             : 
    2068             : static PyMethodDef py_srvsvc_NetCharDevQInfo_methods[] = {
    2069             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQInfo_import),
    2070             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    2071             :                 "T.__import__(mem_ctx, level, in) => ret." },
    2072             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQInfo_export),
    2073             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    2074             :                 "T.__export__(mem_ctx, level, in) => ret." },
    2075             :         { NULL, NULL, 0, NULL }
    2076             : };
    2077             : 
    2078           0 : static PyObject *py_srvsvc_NetCharDevQInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2079             : {
    2080           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    2081           0 :         return NULL;
    2082             : }
    2083             : 
    2084             : 
    2085             : static PyTypeObject srvsvc_NetCharDevQInfo_Type = {
    2086             :         PyVarObject_HEAD_INIT(NULL, 0)
    2087             :         .tp_name = "srvsvc.NetCharDevQInfo",
    2088             :         .tp_getset = NULL,
    2089             :         .tp_methods = py_srvsvc_NetCharDevQInfo_methods,
    2090             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2091             :         .tp_new = py_srvsvc_NetCharDevQInfo_new,
    2092             : };
    2093             : 
    2094           0 : static PyObject *py_import_srvsvc_NetCharDevQCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetCharDevQCtr *in)
    2095             : {
    2096             :         PyObject *ret;
    2097             : 
    2098           0 :         switch (level) {
    2099           0 :                 case 0:
    2100           0 :                         if (in->ctr0 == NULL) {
    2101           0 :                                 ret = Py_None;
    2102           0 :                                 Py_INCREF(ret);
    2103             :                         } else {
    2104           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetCharDevQCtr0_Type, in->ctr0, in->ctr0);
    2105             :                         }
    2106           0 :                         return ret;
    2107             : 
    2108           0 :                 case 1:
    2109           0 :                         if (in->ctr1 == NULL) {
    2110           0 :                                 ret = Py_None;
    2111           0 :                                 Py_INCREF(ret);
    2112             :                         } else {
    2113           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetCharDevQCtr1_Type, in->ctr1, in->ctr1);
    2114             :                         }
    2115           0 :                         return ret;
    2116             : 
    2117           0 :                 default:
    2118           0 :                         ret = Py_None;
    2119           0 :                         Py_INCREF(ret);
    2120           0 :                         return ret;
    2121             : 
    2122             :         }
    2123             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    2124             :         return NULL;
    2125             : }
    2126             : 
    2127           0 : static union srvsvc_NetCharDevQCtr *py_export_srvsvc_NetCharDevQCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    2128             : {
    2129           0 :         union srvsvc_NetCharDevQCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetCharDevQCtr);
    2130           0 :         switch (level) {
    2131           0 :                 case 0:
    2132           0 :                         if (in == NULL) {
    2133           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr0");
    2134           0 :                                 talloc_free(ret); return NULL;
    2135             :                         }
    2136           0 :                         if (in == Py_None) {
    2137           0 :                                 ret->ctr0 = NULL;
    2138             :                         } else {
    2139           0 :                                 ret->ctr0 = NULL;
    2140           0 :                                 PY_CHECK_TYPE(&srvsvc_NetCharDevQCtr0_Type, in, talloc_free(ret); return NULL;);
    2141           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2142           0 :                                         PyErr_NoMemory();
    2143           0 :                                         talloc_free(ret); return NULL;
    2144             :                                 }
    2145           0 :                                 ret->ctr0 = (struct srvsvc_NetCharDevQCtr0 *)pytalloc_get_ptr(in);
    2146             :                         }
    2147           0 :                         break;
    2148             : 
    2149           0 :                 case 1:
    2150           0 :                         if (in == NULL) {
    2151           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
    2152           0 :                                 talloc_free(ret); return NULL;
    2153             :                         }
    2154           0 :                         if (in == Py_None) {
    2155           0 :                                 ret->ctr1 = NULL;
    2156             :                         } else {
    2157           0 :                                 ret->ctr1 = NULL;
    2158           0 :                                 PY_CHECK_TYPE(&srvsvc_NetCharDevQCtr1_Type, in, talloc_free(ret); return NULL;);
    2159           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2160           0 :                                         PyErr_NoMemory();
    2161           0 :                                         talloc_free(ret); return NULL;
    2162             :                                 }
    2163           0 :                                 ret->ctr1 = (struct srvsvc_NetCharDevQCtr1 *)pytalloc_get_ptr(in);
    2164             :                         }
    2165           0 :                         break;
    2166             : 
    2167           0 :                 default:
    2168           0 :                         break;
    2169             : 
    2170             :         }
    2171             : 
    2172           0 :         return ret;
    2173             : }
    2174             : 
    2175           0 : static PyObject *py_srvsvc_NetCharDevQCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2176             : {
    2177           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    2178           0 :         PyObject *mem_ctx_obj = NULL;
    2179           0 :         TALLOC_CTX *mem_ctx = NULL;
    2180           0 :         int level = 0;
    2181           0 :         PyObject *in_obj = NULL;
    2182           0 :         union srvsvc_NetCharDevQCtr *in = NULL;
    2183             : 
    2184           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    2185             :                 discard_const_p(char *, kwnames),
    2186             :                 &mem_ctx_obj,
    2187             :                 &level,
    2188             :                 &in_obj)) {
    2189           0 :                 return NULL;
    2190             :         }
    2191           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    2192           0 :         if (mem_ctx == NULL) {
    2193           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    2194           0 :                 return NULL;
    2195             :         }
    2196           0 :         in = (union srvsvc_NetCharDevQCtr *)pytalloc_get_ptr(in_obj);
    2197           0 :         if (in == NULL) {
    2198           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union srvsvc_NetCharDevQCtr!");
    2199           0 :                 return NULL;
    2200             :         }
    2201             : 
    2202           0 :         return py_import_srvsvc_NetCharDevQCtr(mem_ctx, level, in);
    2203             : }
    2204             : 
    2205           0 : static PyObject *py_srvsvc_NetCharDevQCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2206             : {
    2207           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    2208           0 :         PyObject *mem_ctx_obj = NULL;
    2209           0 :         TALLOC_CTX *mem_ctx = NULL;
    2210           0 :         int level = 0;
    2211           0 :         PyObject *in = NULL;
    2212           0 :         union srvsvc_NetCharDevQCtr *out = NULL;
    2213             : 
    2214           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    2215             :                 discard_const_p(char *, kwnames),
    2216             :                 &mem_ctx_obj,
    2217             :                 &level,
    2218             :                 &in)) {
    2219           0 :                 return NULL;
    2220             :         }
    2221           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    2222           0 :         if (mem_ctx == NULL) {
    2223           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    2224           0 :                 return NULL;
    2225             :         }
    2226             : 
    2227           0 :         out = py_export_srvsvc_NetCharDevQCtr(mem_ctx, level, in);
    2228           0 :         if (out == NULL) {
    2229           0 :                 return NULL;
    2230             :         }
    2231             : 
    2232           0 :         return pytalloc_GenericObject_reference(out);
    2233             : }
    2234             : 
    2235             : static PyMethodDef py_srvsvc_NetCharDevQCtr_methods[] = {
    2236             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQCtr_import),
    2237             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    2238             :                 "T.__import__(mem_ctx, level, in) => ret." },
    2239             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQCtr_export),
    2240             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    2241             :                 "T.__export__(mem_ctx, level, in) => ret." },
    2242             :         { NULL, NULL, 0, NULL }
    2243             : };
    2244             : 
    2245           0 : static PyObject *py_srvsvc_NetCharDevQCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2246             : {
    2247           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    2248           0 :         return NULL;
    2249             : }
    2250             : 
    2251             : 
    2252             : static PyTypeObject srvsvc_NetCharDevQCtr_Type = {
    2253             :         PyVarObject_HEAD_INIT(NULL, 0)
    2254             :         .tp_name = "srvsvc.NetCharDevQCtr",
    2255             :         .tp_getset = NULL,
    2256             :         .tp_methods = py_srvsvc_NetCharDevQCtr_methods,
    2257             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2258             :         .tp_new = py_srvsvc_NetCharDevQCtr_new,
    2259             : };
    2260             : 
    2261             : 
    2262           0 : static PyObject *py_srvsvc_NetCharDevQInfoCtr_get_level(PyObject *obj, void *closure)
    2263             : {
    2264           0 :         struct srvsvc_NetCharDevQInfoCtr *object = (struct srvsvc_NetCharDevQInfoCtr *)pytalloc_get_ptr(obj);
    2265             :         PyObject *py_level;
    2266           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->level);
    2267           0 :         return py_level;
    2268             : }
    2269             : 
    2270           0 : static int py_srvsvc_NetCharDevQInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
    2271             : {
    2272           0 :         struct srvsvc_NetCharDevQInfoCtr *object = (struct srvsvc_NetCharDevQInfoCtr *)pytalloc_get_ptr(py_obj);
    2273           0 :         if (value == NULL) {
    2274           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->level");
    2275           0 :                 return -1;
    2276             :         }
    2277             :         {
    2278           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
    2279           0 :                 if (PyLong_Check(value)) {
    2280             :                         unsigned long long test_var;
    2281           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2282           0 :                         if (PyErr_Occurred() != NULL) {
    2283           0 :                                 return -1;
    2284             :                         }
    2285           0 :                         if (test_var > uint_max) {
    2286           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2287             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2288           0 :                                 return -1;
    2289             :                         }
    2290           0 :                         object->level = test_var;
    2291             :                 } else {
    2292           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2293             :                           PyLong_Type.tp_name);
    2294           0 :                         return -1;
    2295             :                 }
    2296             :         }
    2297           0 :         return 0;
    2298             : }
    2299             : 
    2300           0 : static PyObject *py_srvsvc_NetCharDevQInfoCtr_get_ctr(PyObject *obj, void *closure)
    2301             : {
    2302           0 :         struct srvsvc_NetCharDevQInfoCtr *object = (struct srvsvc_NetCharDevQInfoCtr *)pytalloc_get_ptr(obj);
    2303             :         PyObject *py_ctr;
    2304           0 :         py_ctr = pyrpc_import_union(&srvsvc_NetCharDevQCtr_Type, pytalloc_get_mem_ctx(obj), object->level, &object->ctr, "union srvsvc_NetCharDevQCtr");
    2305           0 :         if (py_ctr == NULL) {
    2306           0 :                 return NULL;
    2307             :         }
    2308           0 :         return py_ctr;
    2309             : }
    2310             : 
    2311           0 : static int py_srvsvc_NetCharDevQInfoCtr_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
    2312             : {
    2313           0 :         struct srvsvc_NetCharDevQInfoCtr *object = (struct srvsvc_NetCharDevQInfoCtr *)pytalloc_get_ptr(py_obj);
    2314           0 :         if (value == NULL) {
    2315           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctr");
    2316           0 :                 return -1;
    2317             :         }
    2318             :         {
    2319             :                 union srvsvc_NetCharDevQCtr *ctr_switch_0;
    2320           0 :                 ctr_switch_0 = (union srvsvc_NetCharDevQCtr *)pyrpc_export_union(&srvsvc_NetCharDevQCtr_Type, pytalloc_get_mem_ctx(py_obj), object->level, value, "union srvsvc_NetCharDevQCtr");
    2321           0 :                 if (ctr_switch_0 == NULL) {
    2322           0 :                         return -1;
    2323             :                 }
    2324           0 :                 object->ctr = *ctr_switch_0;
    2325             :         }
    2326           0 :         return 0;
    2327             : }
    2328             : 
    2329             : static PyGetSetDef py_srvsvc_NetCharDevQInfoCtr_getsetters[] = {
    2330             :         {
    2331             :                 .name = discard_const_p(char, "level"),
    2332             :                 .get = py_srvsvc_NetCharDevQInfoCtr_get_level,
    2333             :                 .set = py_srvsvc_NetCharDevQInfoCtr_set_level,
    2334             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2335             :         },
    2336             :         {
    2337             :                 .name = discard_const_p(char, "ctr"),
    2338             :                 .get = py_srvsvc_NetCharDevQInfoCtr_get_ctr,
    2339             :                 .set = py_srvsvc_NetCharDevQInfoCtr_set_ctr,
    2340             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetCharDevQCtr")
    2341             :         },
    2342             :         { .name = NULL }
    2343             : };
    2344             : 
    2345           0 : static PyObject *py_srvsvc_NetCharDevQInfoCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2346             : {
    2347           0 :         return pytalloc_new(struct srvsvc_NetCharDevQInfoCtr, type);
    2348             : }
    2349             : 
    2350             : 
    2351             : static PyTypeObject srvsvc_NetCharDevQInfoCtr_Type = {
    2352             :         PyVarObject_HEAD_INIT(NULL, 0)
    2353             :         .tp_name = "srvsvc.NetCharDevQInfoCtr",
    2354             :         .tp_getset = py_srvsvc_NetCharDevQInfoCtr_getsetters,
    2355             :         .tp_methods = NULL,
    2356             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2357             :         .tp_new = py_srvsvc_NetCharDevQInfoCtr_new,
    2358             : };
    2359             : 
    2360             : 
    2361           0 : static PyObject *py_srvsvc_NetConnInfo0_get_conn_id(PyObject *obj, void *closure)
    2362             : {
    2363           0 :         struct srvsvc_NetConnInfo0 *object = (struct srvsvc_NetConnInfo0 *)pytalloc_get_ptr(obj);
    2364             :         PyObject *py_conn_id;
    2365           0 :         py_conn_id = PyLong_FromUnsignedLongLong((uint32_t)object->conn_id);
    2366           0 :         return py_conn_id;
    2367             : }
    2368             : 
    2369           0 : static int py_srvsvc_NetConnInfo0_set_conn_id(PyObject *py_obj, PyObject *value, void *closure)
    2370             : {
    2371           0 :         struct srvsvc_NetConnInfo0 *object = (struct srvsvc_NetConnInfo0 *)pytalloc_get_ptr(py_obj);
    2372           0 :         if (value == NULL) {
    2373           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->conn_id");
    2374           0 :                 return -1;
    2375             :         }
    2376             :         {
    2377           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->conn_id));
    2378           0 :                 if (PyLong_Check(value)) {
    2379             :                         unsigned long long test_var;
    2380           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2381           0 :                         if (PyErr_Occurred() != NULL) {
    2382           0 :                                 return -1;
    2383             :                         }
    2384           0 :                         if (test_var > uint_max) {
    2385           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2386             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2387           0 :                                 return -1;
    2388             :                         }
    2389           0 :                         object->conn_id = test_var;
    2390             :                 } else {
    2391           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2392             :                           PyLong_Type.tp_name);
    2393           0 :                         return -1;
    2394             :                 }
    2395             :         }
    2396           0 :         return 0;
    2397             : }
    2398             : 
    2399             : static PyGetSetDef py_srvsvc_NetConnInfo0_getsetters[] = {
    2400             :         {
    2401             :                 .name = discard_const_p(char, "conn_id"),
    2402             :                 .get = py_srvsvc_NetConnInfo0_get_conn_id,
    2403             :                 .set = py_srvsvc_NetConnInfo0_set_conn_id,
    2404             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2405             :         },
    2406             :         { .name = NULL }
    2407             : };
    2408             : 
    2409           0 : static PyObject *py_srvsvc_NetConnInfo0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2410             : {
    2411           0 :         return pytalloc_new(struct srvsvc_NetConnInfo0, type);
    2412             : }
    2413             : 
    2414             : 
    2415             : static PyTypeObject srvsvc_NetConnInfo0_Type = {
    2416             :         PyVarObject_HEAD_INIT(NULL, 0)
    2417             :         .tp_name = "srvsvc.NetConnInfo0",
    2418             :         .tp_getset = py_srvsvc_NetConnInfo0_getsetters,
    2419             :         .tp_methods = NULL,
    2420             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2421             :         .tp_new = py_srvsvc_NetConnInfo0_new,
    2422             : };
    2423             : 
    2424             : 
    2425           0 : static PyObject *py_srvsvc_NetConnCtr0_get_count(PyObject *obj, void *closure)
    2426             : {
    2427           0 :         struct srvsvc_NetConnCtr0 *object = (struct srvsvc_NetConnCtr0 *)pytalloc_get_ptr(obj);
    2428             :         PyObject *py_count;
    2429           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
    2430           0 :         return py_count;
    2431             : }
    2432             : 
    2433           0 : static int py_srvsvc_NetConnCtr0_set_count(PyObject *py_obj, PyObject *value, void *closure)
    2434             : {
    2435           0 :         struct srvsvc_NetConnCtr0 *object = (struct srvsvc_NetConnCtr0 *)pytalloc_get_ptr(py_obj);
    2436           0 :         if (value == NULL) {
    2437           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
    2438           0 :                 return -1;
    2439             :         }
    2440             :         {
    2441           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    2442           0 :                 if (PyLong_Check(value)) {
    2443             :                         unsigned long long test_var;
    2444           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2445           0 :                         if (PyErr_Occurred() != NULL) {
    2446           0 :                                 return -1;
    2447             :                         }
    2448           0 :                         if (test_var > uint_max) {
    2449           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2450             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2451           0 :                                 return -1;
    2452             :                         }
    2453           0 :                         object->count = test_var;
    2454             :                 } else {
    2455           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2456             :                           PyLong_Type.tp_name);
    2457           0 :                         return -1;
    2458             :                 }
    2459             :         }
    2460           0 :         return 0;
    2461             : }
    2462             : 
    2463           0 : static PyObject *py_srvsvc_NetConnCtr0_get_array(PyObject *obj, void *closure)
    2464             : {
    2465           0 :         struct srvsvc_NetConnCtr0 *object = (struct srvsvc_NetConnCtr0 *)pytalloc_get_ptr(obj);
    2466             :         PyObject *py_array;
    2467           0 :         if (object->array == NULL) {
    2468           0 :                 Py_RETURN_NONE;
    2469             :         }
    2470           0 :         if (object->array == NULL) {
    2471           0 :                 py_array = Py_None;
    2472           0 :                 Py_INCREF(py_array);
    2473             :         } else {
    2474           0 :                 py_array = PyList_New(object->count);
    2475           0 :                 if (py_array == NULL) {
    2476           0 :                         return NULL;
    2477             :                 }
    2478             :                 {
    2479             :                         int array_cntr_1;
    2480           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    2481             :                                 PyObject *py_array_1;
    2482           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetConnInfo0_Type, object->array, &object->array[array_cntr_1]);
    2483           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    2484             :                         }
    2485             :                 }
    2486             :         }
    2487           0 :         return py_array;
    2488             : }
    2489             : 
    2490           0 : static int py_srvsvc_NetConnCtr0_set_array(PyObject *py_obj, PyObject *value, void *closure)
    2491             : {
    2492           0 :         struct srvsvc_NetConnCtr0 *object = (struct srvsvc_NetConnCtr0 *)pytalloc_get_ptr(py_obj);
    2493           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    2494           0 :         if (value == NULL) {
    2495           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
    2496           0 :                 return -1;
    2497             :         }
    2498           0 :         if (value == Py_None) {
    2499           0 :                 object->array = NULL;
    2500             :         } else {
    2501           0 :                 object->array = NULL;
    2502           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    2503             :                 {
    2504             :                         int array_cntr_1;
    2505           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    2506           0 :                         if (!object->array) { return -1;; }
    2507           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    2508           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    2509           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    2510           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
    2511           0 :                                         return -1;
    2512             :                                 }
    2513           0 :                                 PY_CHECK_TYPE(&srvsvc_NetConnInfo0_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    2514           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    2515           0 :                                         PyErr_NoMemory();
    2516           0 :                                         return -1;
    2517             :                                 }
    2518           0 :                                 object->array[array_cntr_1] = *(struct srvsvc_NetConnInfo0 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    2519             :                         }
    2520             :                 }
    2521             :         }
    2522           0 :         return 0;
    2523             : }
    2524             : 
    2525             : static PyGetSetDef py_srvsvc_NetConnCtr0_getsetters[] = {
    2526             :         {
    2527             :                 .name = discard_const_p(char, "count"),
    2528             :                 .get = py_srvsvc_NetConnCtr0_get_count,
    2529             :                 .set = py_srvsvc_NetConnCtr0_set_count,
    2530             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2531             :         },
    2532             :         {
    2533             :                 .name = discard_const_p(char, "array"),
    2534             :                 .get = py_srvsvc_NetConnCtr0_get_array,
    2535             :                 .set = py_srvsvc_NetConnCtr0_set_array,
    2536             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetConnInfo0")
    2537             :         },
    2538             :         { .name = NULL }
    2539             : };
    2540             : 
    2541           0 : static PyObject *py_srvsvc_NetConnCtr0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2542             : {
    2543           0 :         return pytalloc_new(struct srvsvc_NetConnCtr0, type);
    2544             : }
    2545             : 
    2546             : 
    2547             : static PyTypeObject srvsvc_NetConnCtr0_Type = {
    2548             :         PyVarObject_HEAD_INIT(NULL, 0)
    2549             :         .tp_name = "srvsvc.NetConnCtr0",
    2550             :         .tp_getset = py_srvsvc_NetConnCtr0_getsetters,
    2551             :         .tp_methods = NULL,
    2552             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2553             :         .tp_new = py_srvsvc_NetConnCtr0_new,
    2554             : };
    2555             : 
    2556             : 
    2557           0 : static PyObject *py_srvsvc_NetConnInfo1_get_conn_id(PyObject *obj, void *closure)
    2558             : {
    2559           0 :         struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(obj);
    2560             :         PyObject *py_conn_id;
    2561           0 :         py_conn_id = PyLong_FromUnsignedLongLong((uint32_t)object->conn_id);
    2562           0 :         return py_conn_id;
    2563             : }
    2564             : 
    2565           0 : static int py_srvsvc_NetConnInfo1_set_conn_id(PyObject *py_obj, PyObject *value, void *closure)
    2566             : {
    2567           0 :         struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(py_obj);
    2568           0 :         if (value == NULL) {
    2569           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->conn_id");
    2570           0 :                 return -1;
    2571             :         }
    2572             :         {
    2573           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->conn_id));
    2574           0 :                 if (PyLong_Check(value)) {
    2575             :                         unsigned long long test_var;
    2576           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2577           0 :                         if (PyErr_Occurred() != NULL) {
    2578           0 :                                 return -1;
    2579             :                         }
    2580           0 :                         if (test_var > uint_max) {
    2581           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2582             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2583           0 :                                 return -1;
    2584             :                         }
    2585           0 :                         object->conn_id = test_var;
    2586             :                 } else {
    2587           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2588             :                           PyLong_Type.tp_name);
    2589           0 :                         return -1;
    2590             :                 }
    2591             :         }
    2592           0 :         return 0;
    2593             : }
    2594             : 
    2595           0 : static PyObject *py_srvsvc_NetConnInfo1_get_conn_type(PyObject *obj, void *closure)
    2596             : {
    2597           0 :         struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(obj);
    2598             :         PyObject *py_conn_type;
    2599           0 :         py_conn_type = PyLong_FromUnsignedLongLong((uint32_t)object->conn_type);
    2600           0 :         return py_conn_type;
    2601             : }
    2602             : 
    2603           0 : static int py_srvsvc_NetConnInfo1_set_conn_type(PyObject *py_obj, PyObject *value, void *closure)
    2604             : {
    2605           0 :         struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(py_obj);
    2606           0 :         if (value == NULL) {
    2607           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->conn_type");
    2608           0 :                 return -1;
    2609             :         }
    2610             :         {
    2611           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->conn_type));
    2612           0 :                 if (PyLong_Check(value)) {
    2613             :                         unsigned long long test_var;
    2614           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2615           0 :                         if (PyErr_Occurred() != NULL) {
    2616           0 :                                 return -1;
    2617             :                         }
    2618           0 :                         if (test_var > uint_max) {
    2619           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2620             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2621           0 :                                 return -1;
    2622             :                         }
    2623           0 :                         object->conn_type = test_var;
    2624             :                 } else {
    2625           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2626             :                           PyLong_Type.tp_name);
    2627           0 :                         return -1;
    2628             :                 }
    2629             :         }
    2630           0 :         return 0;
    2631             : }
    2632             : 
    2633           0 : static PyObject *py_srvsvc_NetConnInfo1_get_num_open(PyObject *obj, void *closure)
    2634             : {
    2635           0 :         struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(obj);
    2636             :         PyObject *py_num_open;
    2637           0 :         py_num_open = PyLong_FromUnsignedLongLong((uint32_t)object->num_open);
    2638           0 :         return py_num_open;
    2639             : }
    2640             : 
    2641           0 : static int py_srvsvc_NetConnInfo1_set_num_open(PyObject *py_obj, PyObject *value, void *closure)
    2642             : {
    2643           0 :         struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(py_obj);
    2644           0 :         if (value == NULL) {
    2645           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_open");
    2646           0 :                 return -1;
    2647             :         }
    2648             :         {
    2649           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_open));
    2650           0 :                 if (PyLong_Check(value)) {
    2651             :                         unsigned long long test_var;
    2652           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2653           0 :                         if (PyErr_Occurred() != NULL) {
    2654           0 :                                 return -1;
    2655             :                         }
    2656           0 :                         if (test_var > uint_max) {
    2657           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2658             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2659           0 :                                 return -1;
    2660             :                         }
    2661           0 :                         object->num_open = test_var;
    2662             :                 } else {
    2663           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2664             :                           PyLong_Type.tp_name);
    2665           0 :                         return -1;
    2666             :                 }
    2667             :         }
    2668           0 :         return 0;
    2669             : }
    2670             : 
    2671           0 : static PyObject *py_srvsvc_NetConnInfo1_get_num_users(PyObject *obj, void *closure)
    2672             : {
    2673           0 :         struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(obj);
    2674             :         PyObject *py_num_users;
    2675           0 :         py_num_users = PyLong_FromUnsignedLongLong((uint32_t)object->num_users);
    2676           0 :         return py_num_users;
    2677             : }
    2678             : 
    2679           0 : static int py_srvsvc_NetConnInfo1_set_num_users(PyObject *py_obj, PyObject *value, void *closure)
    2680             : {
    2681           0 :         struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(py_obj);
    2682           0 :         if (value == NULL) {
    2683           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_users");
    2684           0 :                 return -1;
    2685             :         }
    2686             :         {
    2687           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_users));
    2688           0 :                 if (PyLong_Check(value)) {
    2689             :                         unsigned long long test_var;
    2690           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2691           0 :                         if (PyErr_Occurred() != NULL) {
    2692           0 :                                 return -1;
    2693             :                         }
    2694           0 :                         if (test_var > uint_max) {
    2695           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2696             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2697           0 :                                 return -1;
    2698             :                         }
    2699           0 :                         object->num_users = test_var;
    2700             :                 } else {
    2701           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2702             :                           PyLong_Type.tp_name);
    2703           0 :                         return -1;
    2704             :                 }
    2705             :         }
    2706           0 :         return 0;
    2707             : }
    2708             : 
    2709           0 : static PyObject *py_srvsvc_NetConnInfo1_get_conn_time(PyObject *obj, void *closure)
    2710             : {
    2711           0 :         struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(obj);
    2712             :         PyObject *py_conn_time;
    2713           0 :         py_conn_time = PyLong_FromUnsignedLongLong((uint32_t)object->conn_time);
    2714           0 :         return py_conn_time;
    2715             : }
    2716             : 
    2717           0 : static int py_srvsvc_NetConnInfo1_set_conn_time(PyObject *py_obj, PyObject *value, void *closure)
    2718             : {
    2719           0 :         struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(py_obj);
    2720           0 :         if (value == NULL) {
    2721           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->conn_time");
    2722           0 :                 return -1;
    2723             :         }
    2724             :         {
    2725           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->conn_time));
    2726           0 :                 if (PyLong_Check(value)) {
    2727             :                         unsigned long long test_var;
    2728           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2729           0 :                         if (PyErr_Occurred() != NULL) {
    2730           0 :                                 return -1;
    2731             :                         }
    2732           0 :                         if (test_var > uint_max) {
    2733           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2734             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2735           0 :                                 return -1;
    2736             :                         }
    2737           0 :                         object->conn_time = test_var;
    2738             :                 } else {
    2739           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2740             :                           PyLong_Type.tp_name);
    2741           0 :                         return -1;
    2742             :                 }
    2743             :         }
    2744           0 :         return 0;
    2745             : }
    2746             : 
    2747           0 : static PyObject *py_srvsvc_NetConnInfo1_get_user(PyObject *obj, void *closure)
    2748             : {
    2749           0 :         struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(obj);
    2750             :         PyObject *py_user;
    2751           0 :         if (object->user == NULL) {
    2752           0 :                 Py_RETURN_NONE;
    2753             :         }
    2754           0 :         if (object->user == NULL) {
    2755           0 :                 py_user = Py_None;
    2756           0 :                 Py_INCREF(py_user);
    2757             :         } else {
    2758           0 :                 if (object->user == NULL) {
    2759           0 :                         py_user = Py_None;
    2760           0 :                         Py_INCREF(py_user);
    2761             :                 } else {
    2762           0 :                         py_user = PyUnicode_Decode(object->user, strlen(object->user), "utf-8", "ignore");
    2763             :                 }
    2764             :         }
    2765           0 :         return py_user;
    2766             : }
    2767             : 
    2768           0 : static int py_srvsvc_NetConnInfo1_set_user(PyObject *py_obj, PyObject *value, void *closure)
    2769             : {
    2770           0 :         struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(py_obj);
    2771           0 :         if (value == NULL) {
    2772           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user");
    2773           0 :                 return -1;
    2774             :         }
    2775           0 :         if (value == Py_None) {
    2776           0 :                 object->user = NULL;
    2777             :         } else {
    2778           0 :                 object->user = NULL;
    2779             :                 {
    2780             :                         const char *test_str;
    2781             :                         const char *talloc_str;
    2782           0 :                         PyObject *unicode = NULL;
    2783           0 :                         if (PyUnicode_Check(value)) {
    2784           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    2785           0 :                                 if (unicode == NULL) {
    2786           0 :                                         PyErr_NoMemory();
    2787           0 :                                         return -1;
    2788             :                                 }
    2789           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    2790           0 :                         } else if (PyBytes_Check(value)) {
    2791           0 :                                 test_str = PyBytes_AS_STRING(value);
    2792             :                         } else {
    2793           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    2794           0 :                                 return -1;
    2795             :                         }
    2796           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    2797           0 :                         if (unicode != NULL) {
    2798           0 :                                 Py_DECREF(unicode);
    2799             :                         }
    2800           0 :                         if (talloc_str == NULL) {
    2801           0 :                                 PyErr_NoMemory();
    2802           0 :                                 return -1;
    2803             :                         }
    2804           0 :                         object->user = talloc_str;
    2805             :                 }
    2806             :         }
    2807           0 :         return 0;
    2808             : }
    2809             : 
    2810           0 : static PyObject *py_srvsvc_NetConnInfo1_get_share(PyObject *obj, void *closure)
    2811             : {
    2812           0 :         struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(obj);
    2813             :         PyObject *py_share;
    2814           0 :         if (object->share == NULL) {
    2815           0 :                 Py_RETURN_NONE;
    2816             :         }
    2817           0 :         if (object->share == NULL) {
    2818           0 :                 py_share = Py_None;
    2819           0 :                 Py_INCREF(py_share);
    2820             :         } else {
    2821           0 :                 if (object->share == NULL) {
    2822           0 :                         py_share = Py_None;
    2823           0 :                         Py_INCREF(py_share);
    2824             :                 } else {
    2825           0 :                         py_share = PyUnicode_Decode(object->share, strlen(object->share), "utf-8", "ignore");
    2826             :                 }
    2827             :         }
    2828           0 :         return py_share;
    2829             : }
    2830             : 
    2831           0 : static int py_srvsvc_NetConnInfo1_set_share(PyObject *py_obj, PyObject *value, void *closure)
    2832             : {
    2833           0 :         struct srvsvc_NetConnInfo1 *object = (struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(py_obj);
    2834           0 :         if (value == NULL) {
    2835           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->share");
    2836           0 :                 return -1;
    2837             :         }
    2838           0 :         if (value == Py_None) {
    2839           0 :                 object->share = NULL;
    2840             :         } else {
    2841           0 :                 object->share = NULL;
    2842             :                 {
    2843             :                         const char *test_str;
    2844             :                         const char *talloc_str;
    2845           0 :                         PyObject *unicode = NULL;
    2846           0 :                         if (PyUnicode_Check(value)) {
    2847           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    2848           0 :                                 if (unicode == NULL) {
    2849           0 :                                         PyErr_NoMemory();
    2850           0 :                                         return -1;
    2851             :                                 }
    2852           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    2853           0 :                         } else if (PyBytes_Check(value)) {
    2854           0 :                                 test_str = PyBytes_AS_STRING(value);
    2855             :                         } else {
    2856           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    2857           0 :                                 return -1;
    2858             :                         }
    2859           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    2860           0 :                         if (unicode != NULL) {
    2861           0 :                                 Py_DECREF(unicode);
    2862             :                         }
    2863           0 :                         if (talloc_str == NULL) {
    2864           0 :                                 PyErr_NoMemory();
    2865           0 :                                 return -1;
    2866             :                         }
    2867           0 :                         object->share = talloc_str;
    2868             :                 }
    2869             :         }
    2870           0 :         return 0;
    2871             : }
    2872             : 
    2873             : static PyGetSetDef py_srvsvc_NetConnInfo1_getsetters[] = {
    2874             :         {
    2875             :                 .name = discard_const_p(char, "conn_id"),
    2876             :                 .get = py_srvsvc_NetConnInfo1_get_conn_id,
    2877             :                 .set = py_srvsvc_NetConnInfo1_set_conn_id,
    2878             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2879             :         },
    2880             :         {
    2881             :                 .name = discard_const_p(char, "conn_type"),
    2882             :                 .get = py_srvsvc_NetConnInfo1_get_conn_type,
    2883             :                 .set = py_srvsvc_NetConnInfo1_set_conn_type,
    2884             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2885             :         },
    2886             :         {
    2887             :                 .name = discard_const_p(char, "num_open"),
    2888             :                 .get = py_srvsvc_NetConnInfo1_get_num_open,
    2889             :                 .set = py_srvsvc_NetConnInfo1_set_num_open,
    2890             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2891             :         },
    2892             :         {
    2893             :                 .name = discard_const_p(char, "num_users"),
    2894             :                 .get = py_srvsvc_NetConnInfo1_get_num_users,
    2895             :                 .set = py_srvsvc_NetConnInfo1_set_num_users,
    2896             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2897             :         },
    2898             :         {
    2899             :                 .name = discard_const_p(char, "conn_time"),
    2900             :                 .get = py_srvsvc_NetConnInfo1_get_conn_time,
    2901             :                 .set = py_srvsvc_NetConnInfo1_set_conn_time,
    2902             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2903             :         },
    2904             :         {
    2905             :                 .name = discard_const_p(char, "user"),
    2906             :                 .get = py_srvsvc_NetConnInfo1_get_user,
    2907             :                 .set = py_srvsvc_NetConnInfo1_set_user,
    2908             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    2909             :         },
    2910             :         {
    2911             :                 .name = discard_const_p(char, "share"),
    2912             :                 .get = py_srvsvc_NetConnInfo1_get_share,
    2913             :                 .set = py_srvsvc_NetConnInfo1_set_share,
    2914             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    2915             :         },
    2916             :         { .name = NULL }
    2917             : };
    2918             : 
    2919           0 : static PyObject *py_srvsvc_NetConnInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2920             : {
    2921           0 :         return pytalloc_new(struct srvsvc_NetConnInfo1, type);
    2922             : }
    2923             : 
    2924             : 
    2925             : static PyTypeObject srvsvc_NetConnInfo1_Type = {
    2926             :         PyVarObject_HEAD_INIT(NULL, 0)
    2927             :         .tp_name = "srvsvc.NetConnInfo1",
    2928             :         .tp_getset = py_srvsvc_NetConnInfo1_getsetters,
    2929             :         .tp_methods = NULL,
    2930             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2931             :         .tp_new = py_srvsvc_NetConnInfo1_new,
    2932             : };
    2933             : 
    2934             : 
    2935           0 : static PyObject *py_srvsvc_NetConnCtr1_get_count(PyObject *obj, void *closure)
    2936             : {
    2937           0 :         struct srvsvc_NetConnCtr1 *object = (struct srvsvc_NetConnCtr1 *)pytalloc_get_ptr(obj);
    2938             :         PyObject *py_count;
    2939           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
    2940           0 :         return py_count;
    2941             : }
    2942             : 
    2943           0 : static int py_srvsvc_NetConnCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
    2944             : {
    2945           0 :         struct srvsvc_NetConnCtr1 *object = (struct srvsvc_NetConnCtr1 *)pytalloc_get_ptr(py_obj);
    2946           0 :         if (value == NULL) {
    2947           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
    2948           0 :                 return -1;
    2949             :         }
    2950             :         {
    2951           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    2952           0 :                 if (PyLong_Check(value)) {
    2953             :                         unsigned long long test_var;
    2954           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2955           0 :                         if (PyErr_Occurred() != NULL) {
    2956           0 :                                 return -1;
    2957             :                         }
    2958           0 :                         if (test_var > uint_max) {
    2959           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2960             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2961           0 :                                 return -1;
    2962             :                         }
    2963           0 :                         object->count = test_var;
    2964             :                 } else {
    2965           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2966             :                           PyLong_Type.tp_name);
    2967           0 :                         return -1;
    2968             :                 }
    2969             :         }
    2970           0 :         return 0;
    2971             : }
    2972             : 
    2973           0 : static PyObject *py_srvsvc_NetConnCtr1_get_array(PyObject *obj, void *closure)
    2974             : {
    2975           0 :         struct srvsvc_NetConnCtr1 *object = (struct srvsvc_NetConnCtr1 *)pytalloc_get_ptr(obj);
    2976             :         PyObject *py_array;
    2977           0 :         if (object->array == NULL) {
    2978           0 :                 Py_RETURN_NONE;
    2979             :         }
    2980           0 :         if (object->array == NULL) {
    2981           0 :                 py_array = Py_None;
    2982           0 :                 Py_INCREF(py_array);
    2983             :         } else {
    2984           0 :                 py_array = PyList_New(object->count);
    2985           0 :                 if (py_array == NULL) {
    2986           0 :                         return NULL;
    2987             :                 }
    2988             :                 {
    2989             :                         int array_cntr_1;
    2990           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    2991             :                                 PyObject *py_array_1;
    2992           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetConnInfo1_Type, object->array, &object->array[array_cntr_1]);
    2993           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    2994             :                         }
    2995             :                 }
    2996             :         }
    2997           0 :         return py_array;
    2998             : }
    2999             : 
    3000           0 : static int py_srvsvc_NetConnCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
    3001             : {
    3002           0 :         struct srvsvc_NetConnCtr1 *object = (struct srvsvc_NetConnCtr1 *)pytalloc_get_ptr(py_obj);
    3003           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    3004           0 :         if (value == NULL) {
    3005           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
    3006           0 :                 return -1;
    3007             :         }
    3008           0 :         if (value == Py_None) {
    3009           0 :                 object->array = NULL;
    3010             :         } else {
    3011           0 :                 object->array = NULL;
    3012           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    3013             :                 {
    3014             :                         int array_cntr_1;
    3015           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    3016           0 :                         if (!object->array) { return -1;; }
    3017           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    3018           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    3019           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    3020           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
    3021           0 :                                         return -1;
    3022             :                                 }
    3023           0 :                                 PY_CHECK_TYPE(&srvsvc_NetConnInfo1_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    3024           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    3025           0 :                                         PyErr_NoMemory();
    3026           0 :                                         return -1;
    3027             :                                 }
    3028           0 :                                 object->array[array_cntr_1] = *(struct srvsvc_NetConnInfo1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    3029             :                         }
    3030             :                 }
    3031             :         }
    3032           0 :         return 0;
    3033             : }
    3034             : 
    3035             : static PyGetSetDef py_srvsvc_NetConnCtr1_getsetters[] = {
    3036             :         {
    3037             :                 .name = discard_const_p(char, "count"),
    3038             :                 .get = py_srvsvc_NetConnCtr1_get_count,
    3039             :                 .set = py_srvsvc_NetConnCtr1_set_count,
    3040             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3041             :         },
    3042             :         {
    3043             :                 .name = discard_const_p(char, "array"),
    3044             :                 .get = py_srvsvc_NetConnCtr1_get_array,
    3045             :                 .set = py_srvsvc_NetConnCtr1_set_array,
    3046             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetConnInfo1")
    3047             :         },
    3048             :         { .name = NULL }
    3049             : };
    3050             : 
    3051           0 : static PyObject *py_srvsvc_NetConnCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3052             : {
    3053           0 :         return pytalloc_new(struct srvsvc_NetConnCtr1, type);
    3054             : }
    3055             : 
    3056             : 
    3057             : static PyTypeObject srvsvc_NetConnCtr1_Type = {
    3058             :         PyVarObject_HEAD_INIT(NULL, 0)
    3059             :         .tp_name = "srvsvc.NetConnCtr1",
    3060             :         .tp_getset = py_srvsvc_NetConnCtr1_getsetters,
    3061             :         .tp_methods = NULL,
    3062             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3063             :         .tp_new = py_srvsvc_NetConnCtr1_new,
    3064             : };
    3065             : 
    3066           0 : static PyObject *py_import_srvsvc_NetConnCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetConnCtr *in)
    3067             : {
    3068             :         PyObject *ret;
    3069             : 
    3070           0 :         switch (level) {
    3071           0 :                 case 0:
    3072           0 :                         if (in->ctr0 == NULL) {
    3073           0 :                                 ret = Py_None;
    3074           0 :                                 Py_INCREF(ret);
    3075             :                         } else {
    3076           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetConnCtr0_Type, in->ctr0, in->ctr0);
    3077             :                         }
    3078           0 :                         return ret;
    3079             : 
    3080           0 :                 case 1:
    3081           0 :                         if (in->ctr1 == NULL) {
    3082           0 :                                 ret = Py_None;
    3083           0 :                                 Py_INCREF(ret);
    3084             :                         } else {
    3085           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetConnCtr1_Type, in->ctr1, in->ctr1);
    3086             :                         }
    3087           0 :                         return ret;
    3088             : 
    3089           0 :                 default:
    3090           0 :                         ret = Py_None;
    3091           0 :                         Py_INCREF(ret);
    3092           0 :                         return ret;
    3093             : 
    3094             :         }
    3095             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    3096             :         return NULL;
    3097             : }
    3098             : 
    3099           0 : static union srvsvc_NetConnCtr *py_export_srvsvc_NetConnCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    3100             : {
    3101           0 :         union srvsvc_NetConnCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetConnCtr);
    3102           0 :         switch (level) {
    3103           0 :                 case 0:
    3104           0 :                         if (in == NULL) {
    3105           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr0");
    3106           0 :                                 talloc_free(ret); return NULL;
    3107             :                         }
    3108           0 :                         if (in == Py_None) {
    3109           0 :                                 ret->ctr0 = NULL;
    3110             :                         } else {
    3111           0 :                                 ret->ctr0 = NULL;
    3112           0 :                                 PY_CHECK_TYPE(&srvsvc_NetConnCtr0_Type, in, talloc_free(ret); return NULL;);
    3113           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    3114           0 :                                         PyErr_NoMemory();
    3115           0 :                                         talloc_free(ret); return NULL;
    3116             :                                 }
    3117           0 :                                 ret->ctr0 = (struct srvsvc_NetConnCtr0 *)pytalloc_get_ptr(in);
    3118             :                         }
    3119           0 :                         break;
    3120             : 
    3121           0 :                 case 1:
    3122           0 :                         if (in == NULL) {
    3123           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
    3124           0 :                                 talloc_free(ret); return NULL;
    3125             :                         }
    3126           0 :                         if (in == Py_None) {
    3127           0 :                                 ret->ctr1 = NULL;
    3128             :                         } else {
    3129           0 :                                 ret->ctr1 = NULL;
    3130           0 :                                 PY_CHECK_TYPE(&srvsvc_NetConnCtr1_Type, in, talloc_free(ret); return NULL;);
    3131           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    3132           0 :                                         PyErr_NoMemory();
    3133           0 :                                         talloc_free(ret); return NULL;
    3134             :                                 }
    3135           0 :                                 ret->ctr1 = (struct srvsvc_NetConnCtr1 *)pytalloc_get_ptr(in);
    3136             :                         }
    3137           0 :                         break;
    3138             : 
    3139           0 :                 default:
    3140           0 :                         break;
    3141             : 
    3142             :         }
    3143             : 
    3144           0 :         return ret;
    3145             : }
    3146             : 
    3147           0 : static PyObject *py_srvsvc_NetConnCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3148             : {
    3149           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    3150           0 :         PyObject *mem_ctx_obj = NULL;
    3151           0 :         TALLOC_CTX *mem_ctx = NULL;
    3152           0 :         int level = 0;
    3153           0 :         PyObject *in_obj = NULL;
    3154           0 :         union srvsvc_NetConnCtr *in = NULL;
    3155             : 
    3156           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    3157             :                 discard_const_p(char *, kwnames),
    3158             :                 &mem_ctx_obj,
    3159             :                 &level,
    3160             :                 &in_obj)) {
    3161           0 :                 return NULL;
    3162             :         }
    3163           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    3164           0 :         if (mem_ctx == NULL) {
    3165           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    3166           0 :                 return NULL;
    3167             :         }
    3168           0 :         in = (union srvsvc_NetConnCtr *)pytalloc_get_ptr(in_obj);
    3169           0 :         if (in == NULL) {
    3170           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union srvsvc_NetConnCtr!");
    3171           0 :                 return NULL;
    3172             :         }
    3173             : 
    3174           0 :         return py_import_srvsvc_NetConnCtr(mem_ctx, level, in);
    3175             : }
    3176             : 
    3177           0 : static PyObject *py_srvsvc_NetConnCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3178             : {
    3179           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    3180           0 :         PyObject *mem_ctx_obj = NULL;
    3181           0 :         TALLOC_CTX *mem_ctx = NULL;
    3182           0 :         int level = 0;
    3183           0 :         PyObject *in = NULL;
    3184           0 :         union srvsvc_NetConnCtr *out = NULL;
    3185             : 
    3186           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    3187             :                 discard_const_p(char *, kwnames),
    3188             :                 &mem_ctx_obj,
    3189             :                 &level,
    3190             :                 &in)) {
    3191           0 :                 return NULL;
    3192             :         }
    3193           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    3194           0 :         if (mem_ctx == NULL) {
    3195           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    3196           0 :                 return NULL;
    3197             :         }
    3198             : 
    3199           0 :         out = py_export_srvsvc_NetConnCtr(mem_ctx, level, in);
    3200           0 :         if (out == NULL) {
    3201           0 :                 return NULL;
    3202             :         }
    3203             : 
    3204           0 :         return pytalloc_GenericObject_reference(out);
    3205             : }
    3206             : 
    3207             : static PyMethodDef py_srvsvc_NetConnCtr_methods[] = {
    3208             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetConnCtr_import),
    3209             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    3210             :                 "T.__import__(mem_ctx, level, in) => ret." },
    3211             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetConnCtr_export),
    3212             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    3213             :                 "T.__export__(mem_ctx, level, in) => ret." },
    3214             :         { NULL, NULL, 0, NULL }
    3215             : };
    3216             : 
    3217           0 : static PyObject *py_srvsvc_NetConnCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3218             : {
    3219           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    3220           0 :         return NULL;
    3221             : }
    3222             : 
    3223             : 
    3224             : static PyTypeObject srvsvc_NetConnCtr_Type = {
    3225             :         PyVarObject_HEAD_INIT(NULL, 0)
    3226             :         .tp_name = "srvsvc.NetConnCtr",
    3227             :         .tp_getset = NULL,
    3228             :         .tp_methods = py_srvsvc_NetConnCtr_methods,
    3229             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3230             :         .tp_new = py_srvsvc_NetConnCtr_new,
    3231             : };
    3232             : 
    3233             : 
    3234           0 : static PyObject *py_srvsvc_NetConnInfoCtr_get_level(PyObject *obj, void *closure)
    3235             : {
    3236           0 :         struct srvsvc_NetConnInfoCtr *object = (struct srvsvc_NetConnInfoCtr *)pytalloc_get_ptr(obj);
    3237             :         PyObject *py_level;
    3238           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->level);
    3239           0 :         return py_level;
    3240             : }
    3241             : 
    3242           0 : static int py_srvsvc_NetConnInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
    3243             : {
    3244           0 :         struct srvsvc_NetConnInfoCtr *object = (struct srvsvc_NetConnInfoCtr *)pytalloc_get_ptr(py_obj);
    3245           0 :         if (value == NULL) {
    3246           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->level");
    3247           0 :                 return -1;
    3248             :         }
    3249             :         {
    3250           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
    3251           0 :                 if (PyLong_Check(value)) {
    3252             :                         unsigned long long test_var;
    3253           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3254           0 :                         if (PyErr_Occurred() != NULL) {
    3255           0 :                                 return -1;
    3256             :                         }
    3257           0 :                         if (test_var > uint_max) {
    3258           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3259             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3260           0 :                                 return -1;
    3261             :                         }
    3262           0 :                         object->level = test_var;
    3263             :                 } else {
    3264           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3265             :                           PyLong_Type.tp_name);
    3266           0 :                         return -1;
    3267             :                 }
    3268             :         }
    3269           0 :         return 0;
    3270             : }
    3271             : 
    3272           0 : static PyObject *py_srvsvc_NetConnInfoCtr_get_ctr(PyObject *obj, void *closure)
    3273             : {
    3274           0 :         struct srvsvc_NetConnInfoCtr *object = (struct srvsvc_NetConnInfoCtr *)pytalloc_get_ptr(obj);
    3275             :         PyObject *py_ctr;
    3276           0 :         py_ctr = pyrpc_import_union(&srvsvc_NetConnCtr_Type, pytalloc_get_mem_ctx(obj), object->level, &object->ctr, "union srvsvc_NetConnCtr");
    3277           0 :         if (py_ctr == NULL) {
    3278           0 :                 return NULL;
    3279             :         }
    3280           0 :         return py_ctr;
    3281             : }
    3282             : 
    3283           0 : static int py_srvsvc_NetConnInfoCtr_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
    3284             : {
    3285           0 :         struct srvsvc_NetConnInfoCtr *object = (struct srvsvc_NetConnInfoCtr *)pytalloc_get_ptr(py_obj);
    3286           0 :         if (value == NULL) {
    3287           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctr");
    3288           0 :                 return -1;
    3289             :         }
    3290             :         {
    3291             :                 union srvsvc_NetConnCtr *ctr_switch_0;
    3292           0 :                 ctr_switch_0 = (union srvsvc_NetConnCtr *)pyrpc_export_union(&srvsvc_NetConnCtr_Type, pytalloc_get_mem_ctx(py_obj), object->level, value, "union srvsvc_NetConnCtr");
    3293           0 :                 if (ctr_switch_0 == NULL) {
    3294           0 :                         return -1;
    3295             :                 }
    3296           0 :                 object->ctr = *ctr_switch_0;
    3297             :         }
    3298           0 :         return 0;
    3299             : }
    3300             : 
    3301             : static PyGetSetDef py_srvsvc_NetConnInfoCtr_getsetters[] = {
    3302             :         {
    3303             :                 .name = discard_const_p(char, "level"),
    3304             :                 .get = py_srvsvc_NetConnInfoCtr_get_level,
    3305             :                 .set = py_srvsvc_NetConnInfoCtr_set_level,
    3306             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3307             :         },
    3308             :         {
    3309             :                 .name = discard_const_p(char, "ctr"),
    3310             :                 .get = py_srvsvc_NetConnInfoCtr_get_ctr,
    3311             :                 .set = py_srvsvc_NetConnInfoCtr_set_ctr,
    3312             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetConnCtr")
    3313             :         },
    3314             :         { .name = NULL }
    3315             : };
    3316             : 
    3317           0 : static PyObject *py_srvsvc_NetConnInfoCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3318             : {
    3319           0 :         return pytalloc_new(struct srvsvc_NetConnInfoCtr, type);
    3320             : }
    3321             : 
    3322             : 
    3323             : static PyTypeObject srvsvc_NetConnInfoCtr_Type = {
    3324             :         PyVarObject_HEAD_INIT(NULL, 0)
    3325             :         .tp_name = "srvsvc.NetConnInfoCtr",
    3326             :         .tp_getset = py_srvsvc_NetConnInfoCtr_getsetters,
    3327             :         .tp_methods = NULL,
    3328             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3329             :         .tp_new = py_srvsvc_NetConnInfoCtr_new,
    3330             : };
    3331             : 
    3332             : 
    3333           0 : static PyObject *py_srvsvc_NetFileInfo2_get_fid(PyObject *obj, void *closure)
    3334             : {
    3335           0 :         struct srvsvc_NetFileInfo2 *object = (struct srvsvc_NetFileInfo2 *)pytalloc_get_ptr(obj);
    3336             :         PyObject *py_fid;
    3337           0 :         py_fid = PyLong_FromUnsignedLongLong((uint32_t)object->fid);
    3338           0 :         return py_fid;
    3339             : }
    3340             : 
    3341           0 : static int py_srvsvc_NetFileInfo2_set_fid(PyObject *py_obj, PyObject *value, void *closure)
    3342             : {
    3343           0 :         struct srvsvc_NetFileInfo2 *object = (struct srvsvc_NetFileInfo2 *)pytalloc_get_ptr(py_obj);
    3344           0 :         if (value == NULL) {
    3345           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fid");
    3346           0 :                 return -1;
    3347             :         }
    3348             :         {
    3349           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fid));
    3350           0 :                 if (PyLong_Check(value)) {
    3351             :                         unsigned long long test_var;
    3352           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3353           0 :                         if (PyErr_Occurred() != NULL) {
    3354           0 :                                 return -1;
    3355             :                         }
    3356           0 :                         if (test_var > uint_max) {
    3357           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3358             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3359           0 :                                 return -1;
    3360             :                         }
    3361           0 :                         object->fid = test_var;
    3362             :                 } else {
    3363           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3364             :                           PyLong_Type.tp_name);
    3365           0 :                         return -1;
    3366             :                 }
    3367             :         }
    3368           0 :         return 0;
    3369             : }
    3370             : 
    3371             : static PyGetSetDef py_srvsvc_NetFileInfo2_getsetters[] = {
    3372             :         {
    3373             :                 .name = discard_const_p(char, "fid"),
    3374             :                 .get = py_srvsvc_NetFileInfo2_get_fid,
    3375             :                 .set = py_srvsvc_NetFileInfo2_set_fid,
    3376             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3377             :         },
    3378             :         { .name = NULL }
    3379             : };
    3380             : 
    3381           0 : static PyObject *py_srvsvc_NetFileInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3382             : {
    3383           0 :         return pytalloc_new(struct srvsvc_NetFileInfo2, type);
    3384             : }
    3385             : 
    3386             : 
    3387             : static PyTypeObject srvsvc_NetFileInfo2_Type = {
    3388             :         PyVarObject_HEAD_INIT(NULL, 0)
    3389             :         .tp_name = "srvsvc.NetFileInfo2",
    3390             :         .tp_getset = py_srvsvc_NetFileInfo2_getsetters,
    3391             :         .tp_methods = NULL,
    3392             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3393             :         .tp_new = py_srvsvc_NetFileInfo2_new,
    3394             : };
    3395             : 
    3396             : 
    3397           0 : static PyObject *py_srvsvc_NetFileCtr2_get_count(PyObject *obj, void *closure)
    3398             : {
    3399           0 :         struct srvsvc_NetFileCtr2 *object = (struct srvsvc_NetFileCtr2 *)pytalloc_get_ptr(obj);
    3400             :         PyObject *py_count;
    3401           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
    3402           0 :         return py_count;
    3403             : }
    3404             : 
    3405           0 : static int py_srvsvc_NetFileCtr2_set_count(PyObject *py_obj, PyObject *value, void *closure)
    3406             : {
    3407           0 :         struct srvsvc_NetFileCtr2 *object = (struct srvsvc_NetFileCtr2 *)pytalloc_get_ptr(py_obj);
    3408           0 :         if (value == NULL) {
    3409           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
    3410           0 :                 return -1;
    3411             :         }
    3412             :         {
    3413           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    3414           0 :                 if (PyLong_Check(value)) {
    3415             :                         unsigned long long test_var;
    3416           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3417           0 :                         if (PyErr_Occurred() != NULL) {
    3418           0 :                                 return -1;
    3419             :                         }
    3420           0 :                         if (test_var > uint_max) {
    3421           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3422             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3423           0 :                                 return -1;
    3424             :                         }
    3425           0 :                         object->count = test_var;
    3426             :                 } else {
    3427           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3428             :                           PyLong_Type.tp_name);
    3429           0 :                         return -1;
    3430             :                 }
    3431             :         }
    3432           0 :         return 0;
    3433             : }
    3434             : 
    3435           0 : static PyObject *py_srvsvc_NetFileCtr2_get_array(PyObject *obj, void *closure)
    3436             : {
    3437           0 :         struct srvsvc_NetFileCtr2 *object = (struct srvsvc_NetFileCtr2 *)pytalloc_get_ptr(obj);
    3438             :         PyObject *py_array;
    3439           0 :         if (object->array == NULL) {
    3440           0 :                 Py_RETURN_NONE;
    3441             :         }
    3442           0 :         if (object->array == NULL) {
    3443           0 :                 py_array = Py_None;
    3444           0 :                 Py_INCREF(py_array);
    3445             :         } else {
    3446           0 :                 py_array = PyList_New(object->count);
    3447           0 :                 if (py_array == NULL) {
    3448           0 :                         return NULL;
    3449             :                 }
    3450             :                 {
    3451             :                         int array_cntr_1;
    3452           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    3453             :                                 PyObject *py_array_1;
    3454           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetFileInfo2_Type, object->array, &object->array[array_cntr_1]);
    3455           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    3456             :                         }
    3457             :                 }
    3458             :         }
    3459           0 :         return py_array;
    3460             : }
    3461             : 
    3462           0 : static int py_srvsvc_NetFileCtr2_set_array(PyObject *py_obj, PyObject *value, void *closure)
    3463             : {
    3464           0 :         struct srvsvc_NetFileCtr2 *object = (struct srvsvc_NetFileCtr2 *)pytalloc_get_ptr(py_obj);
    3465           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    3466           0 :         if (value == NULL) {
    3467           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
    3468           0 :                 return -1;
    3469             :         }
    3470           0 :         if (value == Py_None) {
    3471           0 :                 object->array = NULL;
    3472             :         } else {
    3473           0 :                 object->array = NULL;
    3474           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    3475             :                 {
    3476             :                         int array_cntr_1;
    3477           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    3478           0 :                         if (!object->array) { return -1;; }
    3479           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    3480           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    3481           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    3482           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
    3483           0 :                                         return -1;
    3484             :                                 }
    3485           0 :                                 PY_CHECK_TYPE(&srvsvc_NetFileInfo2_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    3486           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    3487           0 :                                         PyErr_NoMemory();
    3488           0 :                                         return -1;
    3489             :                                 }
    3490           0 :                                 object->array[array_cntr_1] = *(struct srvsvc_NetFileInfo2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    3491             :                         }
    3492             :                 }
    3493             :         }
    3494           0 :         return 0;
    3495             : }
    3496             : 
    3497             : static PyGetSetDef py_srvsvc_NetFileCtr2_getsetters[] = {
    3498             :         {
    3499             :                 .name = discard_const_p(char, "count"),
    3500             :                 .get = py_srvsvc_NetFileCtr2_get_count,
    3501             :                 .set = py_srvsvc_NetFileCtr2_set_count,
    3502             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3503             :         },
    3504             :         {
    3505             :                 .name = discard_const_p(char, "array"),
    3506             :                 .get = py_srvsvc_NetFileCtr2_get_array,
    3507             :                 .set = py_srvsvc_NetFileCtr2_set_array,
    3508             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetFileInfo2")
    3509             :         },
    3510             :         { .name = NULL }
    3511             : };
    3512             : 
    3513           0 : static PyObject *py_srvsvc_NetFileCtr2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3514             : {
    3515           0 :         return pytalloc_new(struct srvsvc_NetFileCtr2, type);
    3516             : }
    3517             : 
    3518             : 
    3519             : static PyTypeObject srvsvc_NetFileCtr2_Type = {
    3520             :         PyVarObject_HEAD_INIT(NULL, 0)
    3521             :         .tp_name = "srvsvc.NetFileCtr2",
    3522             :         .tp_getset = py_srvsvc_NetFileCtr2_getsetters,
    3523             :         .tp_methods = NULL,
    3524             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3525             :         .tp_new = py_srvsvc_NetFileCtr2_new,
    3526             : };
    3527             : 
    3528             : 
    3529           0 : static PyObject *py_srvsvc_NetFileInfo3_get_fid(PyObject *obj, void *closure)
    3530             : {
    3531           0 :         struct srvsvc_NetFileInfo3 *object = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(obj);
    3532             :         PyObject *py_fid;
    3533           0 :         py_fid = PyLong_FromUnsignedLongLong((uint32_t)object->fid);
    3534           0 :         return py_fid;
    3535             : }
    3536             : 
    3537           0 : static int py_srvsvc_NetFileInfo3_set_fid(PyObject *py_obj, PyObject *value, void *closure)
    3538             : {
    3539           0 :         struct srvsvc_NetFileInfo3 *object = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(py_obj);
    3540           0 :         if (value == NULL) {
    3541           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fid");
    3542           0 :                 return -1;
    3543             :         }
    3544             :         {
    3545           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fid));
    3546           0 :                 if (PyLong_Check(value)) {
    3547             :                         unsigned long long test_var;
    3548           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3549           0 :                         if (PyErr_Occurred() != NULL) {
    3550           0 :                                 return -1;
    3551             :                         }
    3552           0 :                         if (test_var > uint_max) {
    3553           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3554             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3555           0 :                                 return -1;
    3556             :                         }
    3557           0 :                         object->fid = test_var;
    3558             :                 } else {
    3559           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3560             :                           PyLong_Type.tp_name);
    3561           0 :                         return -1;
    3562             :                 }
    3563             :         }
    3564           0 :         return 0;
    3565             : }
    3566             : 
    3567           0 : static PyObject *py_srvsvc_NetFileInfo3_get_permissions(PyObject *obj, void *closure)
    3568             : {
    3569           0 :         struct srvsvc_NetFileInfo3 *object = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(obj);
    3570             :         PyObject *py_permissions;
    3571           0 :         py_permissions = PyLong_FromUnsignedLongLong((uint32_t)object->permissions);
    3572           0 :         return py_permissions;
    3573             : }
    3574             : 
    3575           0 : static int py_srvsvc_NetFileInfo3_set_permissions(PyObject *py_obj, PyObject *value, void *closure)
    3576             : {
    3577           0 :         struct srvsvc_NetFileInfo3 *object = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(py_obj);
    3578           0 :         if (value == NULL) {
    3579           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->permissions");
    3580           0 :                 return -1;
    3581             :         }
    3582             :         {
    3583           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->permissions));
    3584           0 :                 if (PyLong_Check(value)) {
    3585             :                         unsigned long long test_var;
    3586           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3587           0 :                         if (PyErr_Occurred() != NULL) {
    3588           0 :                                 return -1;
    3589             :                         }
    3590           0 :                         if (test_var > uint_max) {
    3591           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3592             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3593           0 :                                 return -1;
    3594             :                         }
    3595           0 :                         object->permissions = test_var;
    3596             :                 } else {
    3597           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3598             :                           PyLong_Type.tp_name);
    3599           0 :                         return -1;
    3600             :                 }
    3601             :         }
    3602           0 :         return 0;
    3603             : }
    3604             : 
    3605           0 : static PyObject *py_srvsvc_NetFileInfo3_get_num_locks(PyObject *obj, void *closure)
    3606             : {
    3607           0 :         struct srvsvc_NetFileInfo3 *object = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(obj);
    3608             :         PyObject *py_num_locks;
    3609           0 :         py_num_locks = PyLong_FromUnsignedLongLong((uint32_t)object->num_locks);
    3610           0 :         return py_num_locks;
    3611             : }
    3612             : 
    3613           0 : static int py_srvsvc_NetFileInfo3_set_num_locks(PyObject *py_obj, PyObject *value, void *closure)
    3614             : {
    3615           0 :         struct srvsvc_NetFileInfo3 *object = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(py_obj);
    3616           0 :         if (value == NULL) {
    3617           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_locks");
    3618           0 :                 return -1;
    3619             :         }
    3620             :         {
    3621           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_locks));
    3622           0 :                 if (PyLong_Check(value)) {
    3623             :                         unsigned long long test_var;
    3624           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3625           0 :                         if (PyErr_Occurred() != NULL) {
    3626           0 :                                 return -1;
    3627             :                         }
    3628           0 :                         if (test_var > uint_max) {
    3629           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3630             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3631           0 :                                 return -1;
    3632             :                         }
    3633           0 :                         object->num_locks = test_var;
    3634             :                 } else {
    3635           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3636             :                           PyLong_Type.tp_name);
    3637           0 :                         return -1;
    3638             :                 }
    3639             :         }
    3640           0 :         return 0;
    3641             : }
    3642             : 
    3643           0 : static PyObject *py_srvsvc_NetFileInfo3_get_path(PyObject *obj, void *closure)
    3644             : {
    3645           0 :         struct srvsvc_NetFileInfo3 *object = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(obj);
    3646             :         PyObject *py_path;
    3647           0 :         if (object->path == NULL) {
    3648           0 :                 Py_RETURN_NONE;
    3649             :         }
    3650           0 :         if (object->path == NULL) {
    3651           0 :                 py_path = Py_None;
    3652           0 :                 Py_INCREF(py_path);
    3653             :         } else {
    3654           0 :                 if (object->path == NULL) {
    3655           0 :                         py_path = Py_None;
    3656           0 :                         Py_INCREF(py_path);
    3657             :                 } else {
    3658           0 :                         py_path = PyUnicode_Decode(object->path, strlen(object->path), "utf-8", "ignore");
    3659             :                 }
    3660             :         }
    3661           0 :         return py_path;
    3662             : }
    3663             : 
    3664           0 : static int py_srvsvc_NetFileInfo3_set_path(PyObject *py_obj, PyObject *value, void *closure)
    3665             : {
    3666           0 :         struct srvsvc_NetFileInfo3 *object = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(py_obj);
    3667           0 :         if (value == NULL) {
    3668           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->path");
    3669           0 :                 return -1;
    3670             :         }
    3671           0 :         if (value == Py_None) {
    3672           0 :                 object->path = NULL;
    3673             :         } else {
    3674           0 :                 object->path = NULL;
    3675             :                 {
    3676             :                         const char *test_str;
    3677             :                         const char *talloc_str;
    3678           0 :                         PyObject *unicode = NULL;
    3679           0 :                         if (PyUnicode_Check(value)) {
    3680           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    3681           0 :                                 if (unicode == NULL) {
    3682           0 :                                         PyErr_NoMemory();
    3683           0 :                                         return -1;
    3684             :                                 }
    3685           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    3686           0 :                         } else if (PyBytes_Check(value)) {
    3687           0 :                                 test_str = PyBytes_AS_STRING(value);
    3688             :                         } else {
    3689           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    3690           0 :                                 return -1;
    3691             :                         }
    3692           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    3693           0 :                         if (unicode != NULL) {
    3694           0 :                                 Py_DECREF(unicode);
    3695             :                         }
    3696           0 :                         if (talloc_str == NULL) {
    3697           0 :                                 PyErr_NoMemory();
    3698           0 :                                 return -1;
    3699             :                         }
    3700           0 :                         object->path = talloc_str;
    3701             :                 }
    3702             :         }
    3703           0 :         return 0;
    3704             : }
    3705             : 
    3706           0 : static PyObject *py_srvsvc_NetFileInfo3_get_user(PyObject *obj, void *closure)
    3707             : {
    3708           0 :         struct srvsvc_NetFileInfo3 *object = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(obj);
    3709             :         PyObject *py_user;
    3710           0 :         if (object->user == NULL) {
    3711           0 :                 Py_RETURN_NONE;
    3712             :         }
    3713           0 :         if (object->user == NULL) {
    3714           0 :                 py_user = Py_None;
    3715           0 :                 Py_INCREF(py_user);
    3716             :         } else {
    3717           0 :                 if (object->user == NULL) {
    3718           0 :                         py_user = Py_None;
    3719           0 :                         Py_INCREF(py_user);
    3720             :                 } else {
    3721           0 :                         py_user = PyUnicode_Decode(object->user, strlen(object->user), "utf-8", "ignore");
    3722             :                 }
    3723             :         }
    3724           0 :         return py_user;
    3725             : }
    3726             : 
    3727           0 : static int py_srvsvc_NetFileInfo3_set_user(PyObject *py_obj, PyObject *value, void *closure)
    3728             : {
    3729           0 :         struct srvsvc_NetFileInfo3 *object = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(py_obj);
    3730           0 :         if (value == NULL) {
    3731           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user");
    3732           0 :                 return -1;
    3733             :         }
    3734           0 :         if (value == Py_None) {
    3735           0 :                 object->user = NULL;
    3736             :         } else {
    3737           0 :                 object->user = NULL;
    3738             :                 {
    3739             :                         const char *test_str;
    3740             :                         const char *talloc_str;
    3741           0 :                         PyObject *unicode = NULL;
    3742           0 :                         if (PyUnicode_Check(value)) {
    3743           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    3744           0 :                                 if (unicode == NULL) {
    3745           0 :                                         PyErr_NoMemory();
    3746           0 :                                         return -1;
    3747             :                                 }
    3748           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    3749           0 :                         } else if (PyBytes_Check(value)) {
    3750           0 :                                 test_str = PyBytes_AS_STRING(value);
    3751             :                         } else {
    3752           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    3753           0 :                                 return -1;
    3754             :                         }
    3755           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    3756           0 :                         if (unicode != NULL) {
    3757           0 :                                 Py_DECREF(unicode);
    3758             :                         }
    3759           0 :                         if (talloc_str == NULL) {
    3760           0 :                                 PyErr_NoMemory();
    3761           0 :                                 return -1;
    3762             :                         }
    3763           0 :                         object->user = talloc_str;
    3764             :                 }
    3765             :         }
    3766           0 :         return 0;
    3767             : }
    3768             : 
    3769             : static PyGetSetDef py_srvsvc_NetFileInfo3_getsetters[] = {
    3770             :         {
    3771             :                 .name = discard_const_p(char, "fid"),
    3772             :                 .get = py_srvsvc_NetFileInfo3_get_fid,
    3773             :                 .set = py_srvsvc_NetFileInfo3_set_fid,
    3774             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3775             :         },
    3776             :         {
    3777             :                 .name = discard_const_p(char, "permissions"),
    3778             :                 .get = py_srvsvc_NetFileInfo3_get_permissions,
    3779             :                 .set = py_srvsvc_NetFileInfo3_set_permissions,
    3780             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3781             :         },
    3782             :         {
    3783             :                 .name = discard_const_p(char, "num_locks"),
    3784             :                 .get = py_srvsvc_NetFileInfo3_get_num_locks,
    3785             :                 .set = py_srvsvc_NetFileInfo3_set_num_locks,
    3786             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3787             :         },
    3788             :         {
    3789             :                 .name = discard_const_p(char, "path"),
    3790             :                 .get = py_srvsvc_NetFileInfo3_get_path,
    3791             :                 .set = py_srvsvc_NetFileInfo3_set_path,
    3792             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    3793             :         },
    3794             :         {
    3795             :                 .name = discard_const_p(char, "user"),
    3796             :                 .get = py_srvsvc_NetFileInfo3_get_user,
    3797             :                 .set = py_srvsvc_NetFileInfo3_set_user,
    3798             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    3799             :         },
    3800             :         { .name = NULL }
    3801             : };
    3802             : 
    3803           0 : static PyObject *py_srvsvc_NetFileInfo3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3804             : {
    3805           0 :         return pytalloc_new(struct srvsvc_NetFileInfo3, type);
    3806             : }
    3807             : 
    3808             : 
    3809             : static PyTypeObject srvsvc_NetFileInfo3_Type = {
    3810             :         PyVarObject_HEAD_INIT(NULL, 0)
    3811             :         .tp_name = "srvsvc.NetFileInfo3",
    3812             :         .tp_getset = py_srvsvc_NetFileInfo3_getsetters,
    3813             :         .tp_methods = NULL,
    3814             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3815             :         .tp_new = py_srvsvc_NetFileInfo3_new,
    3816             : };
    3817             : 
    3818             : 
    3819           0 : static PyObject *py_srvsvc_NetFileCtr3_get_count(PyObject *obj, void *closure)
    3820             : {
    3821           0 :         struct srvsvc_NetFileCtr3 *object = (struct srvsvc_NetFileCtr3 *)pytalloc_get_ptr(obj);
    3822             :         PyObject *py_count;
    3823           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
    3824           0 :         return py_count;
    3825             : }
    3826             : 
    3827           0 : static int py_srvsvc_NetFileCtr3_set_count(PyObject *py_obj, PyObject *value, void *closure)
    3828             : {
    3829           0 :         struct srvsvc_NetFileCtr3 *object = (struct srvsvc_NetFileCtr3 *)pytalloc_get_ptr(py_obj);
    3830           0 :         if (value == NULL) {
    3831           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
    3832           0 :                 return -1;
    3833             :         }
    3834             :         {
    3835           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    3836           0 :                 if (PyLong_Check(value)) {
    3837             :                         unsigned long long test_var;
    3838           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3839           0 :                         if (PyErr_Occurred() != NULL) {
    3840           0 :                                 return -1;
    3841             :                         }
    3842           0 :                         if (test_var > uint_max) {
    3843           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3844             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3845           0 :                                 return -1;
    3846             :                         }
    3847           0 :                         object->count = test_var;
    3848             :                 } else {
    3849           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3850             :                           PyLong_Type.tp_name);
    3851           0 :                         return -1;
    3852             :                 }
    3853             :         }
    3854           0 :         return 0;
    3855             : }
    3856             : 
    3857           0 : static PyObject *py_srvsvc_NetFileCtr3_get_array(PyObject *obj, void *closure)
    3858             : {
    3859           0 :         struct srvsvc_NetFileCtr3 *object = (struct srvsvc_NetFileCtr3 *)pytalloc_get_ptr(obj);
    3860             :         PyObject *py_array;
    3861           0 :         if (object->array == NULL) {
    3862           0 :                 Py_RETURN_NONE;
    3863             :         }
    3864           0 :         if (object->array == NULL) {
    3865           0 :                 py_array = Py_None;
    3866           0 :                 Py_INCREF(py_array);
    3867             :         } else {
    3868           0 :                 py_array = PyList_New(object->count);
    3869           0 :                 if (py_array == NULL) {
    3870           0 :                         return NULL;
    3871             :                 }
    3872             :                 {
    3873             :                         int array_cntr_1;
    3874           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    3875             :                                 PyObject *py_array_1;
    3876           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetFileInfo3_Type, object->array, &object->array[array_cntr_1]);
    3877           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    3878             :                         }
    3879             :                 }
    3880             :         }
    3881           0 :         return py_array;
    3882             : }
    3883             : 
    3884           0 : static int py_srvsvc_NetFileCtr3_set_array(PyObject *py_obj, PyObject *value, void *closure)
    3885             : {
    3886           0 :         struct srvsvc_NetFileCtr3 *object = (struct srvsvc_NetFileCtr3 *)pytalloc_get_ptr(py_obj);
    3887           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    3888           0 :         if (value == NULL) {
    3889           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
    3890           0 :                 return -1;
    3891             :         }
    3892           0 :         if (value == Py_None) {
    3893           0 :                 object->array = NULL;
    3894             :         } else {
    3895           0 :                 object->array = NULL;
    3896           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    3897             :                 {
    3898             :                         int array_cntr_1;
    3899           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    3900           0 :                         if (!object->array) { return -1;; }
    3901           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    3902           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    3903           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    3904           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
    3905           0 :                                         return -1;
    3906             :                                 }
    3907           0 :                                 PY_CHECK_TYPE(&srvsvc_NetFileInfo3_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    3908           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    3909           0 :                                         PyErr_NoMemory();
    3910           0 :                                         return -1;
    3911             :                                 }
    3912           0 :                                 object->array[array_cntr_1] = *(struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    3913             :                         }
    3914             :                 }
    3915             :         }
    3916           0 :         return 0;
    3917             : }
    3918             : 
    3919             : static PyGetSetDef py_srvsvc_NetFileCtr3_getsetters[] = {
    3920             :         {
    3921             :                 .name = discard_const_p(char, "count"),
    3922             :                 .get = py_srvsvc_NetFileCtr3_get_count,
    3923             :                 .set = py_srvsvc_NetFileCtr3_set_count,
    3924             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3925             :         },
    3926             :         {
    3927             :                 .name = discard_const_p(char, "array"),
    3928             :                 .get = py_srvsvc_NetFileCtr3_get_array,
    3929             :                 .set = py_srvsvc_NetFileCtr3_set_array,
    3930             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetFileInfo3")
    3931             :         },
    3932             :         { .name = NULL }
    3933             : };
    3934             : 
    3935           0 : static PyObject *py_srvsvc_NetFileCtr3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3936             : {
    3937           0 :         return pytalloc_new(struct srvsvc_NetFileCtr3, type);
    3938             : }
    3939             : 
    3940             : 
    3941             : static PyTypeObject srvsvc_NetFileCtr3_Type = {
    3942             :         PyVarObject_HEAD_INIT(NULL, 0)
    3943             :         .tp_name = "srvsvc.NetFileCtr3",
    3944             :         .tp_getset = py_srvsvc_NetFileCtr3_getsetters,
    3945             :         .tp_methods = NULL,
    3946             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3947             :         .tp_new = py_srvsvc_NetFileCtr3_new,
    3948             : };
    3949             : 
    3950           0 : static PyObject *py_import_srvsvc_NetFileInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetFileInfo *in)
    3951             : {
    3952             :         PyObject *ret;
    3953             : 
    3954           0 :         switch (level) {
    3955           0 :                 case 2:
    3956           0 :                         if (in->info2 == NULL) {
    3957           0 :                                 ret = Py_None;
    3958           0 :                                 Py_INCREF(ret);
    3959             :                         } else {
    3960           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetFileInfo2_Type, in->info2, in->info2);
    3961             :                         }
    3962           0 :                         return ret;
    3963             : 
    3964           0 :                 case 3:
    3965           0 :                         if (in->info3 == NULL) {
    3966           0 :                                 ret = Py_None;
    3967           0 :                                 Py_INCREF(ret);
    3968             :                         } else {
    3969           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetFileInfo3_Type, in->info3, in->info3);
    3970             :                         }
    3971           0 :                         return ret;
    3972             : 
    3973           0 :                 default:
    3974           0 :                         ret = Py_None;
    3975           0 :                         Py_INCREF(ret);
    3976           0 :                         return ret;
    3977             : 
    3978             :         }
    3979             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    3980             :         return NULL;
    3981             : }
    3982             : 
    3983           0 : static union srvsvc_NetFileInfo *py_export_srvsvc_NetFileInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    3984             : {
    3985           0 :         union srvsvc_NetFileInfo *ret = talloc_zero(mem_ctx, union srvsvc_NetFileInfo);
    3986           0 :         switch (level) {
    3987           0 :                 case 2:
    3988           0 :                         if (in == NULL) {
    3989           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info2");
    3990           0 :                                 talloc_free(ret); return NULL;
    3991             :                         }
    3992           0 :                         if (in == Py_None) {
    3993           0 :                                 ret->info2 = NULL;
    3994             :                         } else {
    3995           0 :                                 ret->info2 = NULL;
    3996           0 :                                 PY_CHECK_TYPE(&srvsvc_NetFileInfo2_Type, in, talloc_free(ret); return NULL;);
    3997           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    3998           0 :                                         PyErr_NoMemory();
    3999           0 :                                         talloc_free(ret); return NULL;
    4000             :                                 }
    4001           0 :                                 ret->info2 = (struct srvsvc_NetFileInfo2 *)pytalloc_get_ptr(in);
    4002             :                         }
    4003           0 :                         break;
    4004             : 
    4005           0 :                 case 3:
    4006           0 :                         if (in == NULL) {
    4007           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info3");
    4008           0 :                                 talloc_free(ret); return NULL;
    4009             :                         }
    4010           0 :                         if (in == Py_None) {
    4011           0 :                                 ret->info3 = NULL;
    4012             :                         } else {
    4013           0 :                                 ret->info3 = NULL;
    4014           0 :                                 PY_CHECK_TYPE(&srvsvc_NetFileInfo3_Type, in, talloc_free(ret); return NULL;);
    4015           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    4016           0 :                                         PyErr_NoMemory();
    4017           0 :                                         talloc_free(ret); return NULL;
    4018             :                                 }
    4019           0 :                                 ret->info3 = (struct srvsvc_NetFileInfo3 *)pytalloc_get_ptr(in);
    4020             :                         }
    4021           0 :                         break;
    4022             : 
    4023           0 :                 default:
    4024           0 :                         break;
    4025             : 
    4026             :         }
    4027             : 
    4028           0 :         return ret;
    4029             : }
    4030             : 
    4031           0 : static PyObject *py_srvsvc_NetFileInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4032             : {
    4033           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    4034           0 :         PyObject *mem_ctx_obj = NULL;
    4035           0 :         TALLOC_CTX *mem_ctx = NULL;
    4036           0 :         int level = 0;
    4037           0 :         PyObject *in_obj = NULL;
    4038           0 :         union srvsvc_NetFileInfo *in = NULL;
    4039             : 
    4040           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    4041             :                 discard_const_p(char *, kwnames),
    4042             :                 &mem_ctx_obj,
    4043             :                 &level,
    4044             :                 &in_obj)) {
    4045           0 :                 return NULL;
    4046             :         }
    4047           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    4048           0 :         if (mem_ctx == NULL) {
    4049           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    4050           0 :                 return NULL;
    4051             :         }
    4052           0 :         in = (union srvsvc_NetFileInfo *)pytalloc_get_ptr(in_obj);
    4053           0 :         if (in == NULL) {
    4054           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union srvsvc_NetFileInfo!");
    4055           0 :                 return NULL;
    4056             :         }
    4057             : 
    4058           0 :         return py_import_srvsvc_NetFileInfo(mem_ctx, level, in);
    4059             : }
    4060             : 
    4061           0 : static PyObject *py_srvsvc_NetFileInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4062             : {
    4063           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    4064           0 :         PyObject *mem_ctx_obj = NULL;
    4065           0 :         TALLOC_CTX *mem_ctx = NULL;
    4066           0 :         int level = 0;
    4067           0 :         PyObject *in = NULL;
    4068           0 :         union srvsvc_NetFileInfo *out = NULL;
    4069             : 
    4070           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    4071             :                 discard_const_p(char *, kwnames),
    4072             :                 &mem_ctx_obj,
    4073             :                 &level,
    4074             :                 &in)) {
    4075           0 :                 return NULL;
    4076             :         }
    4077           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    4078           0 :         if (mem_ctx == NULL) {
    4079           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    4080           0 :                 return NULL;
    4081             :         }
    4082             : 
    4083           0 :         out = py_export_srvsvc_NetFileInfo(mem_ctx, level, in);
    4084           0 :         if (out == NULL) {
    4085           0 :                 return NULL;
    4086             :         }
    4087             : 
    4088           0 :         return pytalloc_GenericObject_reference(out);
    4089             : }
    4090             : 
    4091             : static PyMethodDef py_srvsvc_NetFileInfo_methods[] = {
    4092             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileInfo_import),
    4093             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    4094             :                 "T.__import__(mem_ctx, level, in) => ret." },
    4095             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileInfo_export),
    4096             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    4097             :                 "T.__export__(mem_ctx, level, in) => ret." },
    4098             :         { NULL, NULL, 0, NULL }
    4099             : };
    4100             : 
    4101           0 : static PyObject *py_srvsvc_NetFileInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4102             : {
    4103           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    4104           0 :         return NULL;
    4105             : }
    4106             : 
    4107             : 
    4108             : static PyTypeObject srvsvc_NetFileInfo_Type = {
    4109             :         PyVarObject_HEAD_INIT(NULL, 0)
    4110             :         .tp_name = "srvsvc.NetFileInfo",
    4111             :         .tp_getset = NULL,
    4112             :         .tp_methods = py_srvsvc_NetFileInfo_methods,
    4113             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4114             :         .tp_new = py_srvsvc_NetFileInfo_new,
    4115             : };
    4116             : 
    4117           0 : static PyObject *py_import_srvsvc_NetFileCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetFileCtr *in)
    4118             : {
    4119             :         PyObject *ret;
    4120             : 
    4121           0 :         switch (level) {
    4122           0 :                 case 2:
    4123           0 :                         if (in->ctr2 == NULL) {
    4124           0 :                                 ret = Py_None;
    4125           0 :                                 Py_INCREF(ret);
    4126             :                         } else {
    4127           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetFileCtr2_Type, in->ctr2, in->ctr2);
    4128             :                         }
    4129           0 :                         return ret;
    4130             : 
    4131           0 :                 case 3:
    4132           0 :                         if (in->ctr3 == NULL) {
    4133           0 :                                 ret = Py_None;
    4134           0 :                                 Py_INCREF(ret);
    4135             :                         } else {
    4136           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetFileCtr3_Type, in->ctr3, in->ctr3);
    4137             :                         }
    4138           0 :                         return ret;
    4139             : 
    4140           0 :                 default:
    4141           0 :                         ret = Py_None;
    4142           0 :                         Py_INCREF(ret);
    4143           0 :                         return ret;
    4144             : 
    4145             :         }
    4146             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    4147             :         return NULL;
    4148             : }
    4149             : 
    4150           0 : static union srvsvc_NetFileCtr *py_export_srvsvc_NetFileCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    4151             : {
    4152           0 :         union srvsvc_NetFileCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetFileCtr);
    4153           0 :         switch (level) {
    4154           0 :                 case 2:
    4155           0 :                         if (in == NULL) {
    4156           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr2");
    4157           0 :                                 talloc_free(ret); return NULL;
    4158             :                         }
    4159           0 :                         if (in == Py_None) {
    4160           0 :                                 ret->ctr2 = NULL;
    4161             :                         } else {
    4162           0 :                                 ret->ctr2 = NULL;
    4163           0 :                                 PY_CHECK_TYPE(&srvsvc_NetFileCtr2_Type, in, talloc_free(ret); return NULL;);
    4164           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    4165           0 :                                         PyErr_NoMemory();
    4166           0 :                                         talloc_free(ret); return NULL;
    4167             :                                 }
    4168           0 :                                 ret->ctr2 = (struct srvsvc_NetFileCtr2 *)pytalloc_get_ptr(in);
    4169             :                         }
    4170           0 :                         break;
    4171             : 
    4172           0 :                 case 3:
    4173           0 :                         if (in == NULL) {
    4174           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr3");
    4175           0 :                                 talloc_free(ret); return NULL;
    4176             :                         }
    4177           0 :                         if (in == Py_None) {
    4178           0 :                                 ret->ctr3 = NULL;
    4179             :                         } else {
    4180           0 :                                 ret->ctr3 = NULL;
    4181           0 :                                 PY_CHECK_TYPE(&srvsvc_NetFileCtr3_Type, in, talloc_free(ret); return NULL;);
    4182           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    4183           0 :                                         PyErr_NoMemory();
    4184           0 :                                         talloc_free(ret); return NULL;
    4185             :                                 }
    4186           0 :                                 ret->ctr3 = (struct srvsvc_NetFileCtr3 *)pytalloc_get_ptr(in);
    4187             :                         }
    4188           0 :                         break;
    4189             : 
    4190           0 :                 default:
    4191           0 :                         break;
    4192             : 
    4193             :         }
    4194             : 
    4195           0 :         return ret;
    4196             : }
    4197             : 
    4198           0 : static PyObject *py_srvsvc_NetFileCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4199             : {
    4200           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    4201           0 :         PyObject *mem_ctx_obj = NULL;
    4202           0 :         TALLOC_CTX *mem_ctx = NULL;
    4203           0 :         int level = 0;
    4204           0 :         PyObject *in_obj = NULL;
    4205           0 :         union srvsvc_NetFileCtr *in = NULL;
    4206             : 
    4207           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    4208             :                 discard_const_p(char *, kwnames),
    4209             :                 &mem_ctx_obj,
    4210             :                 &level,
    4211             :                 &in_obj)) {
    4212           0 :                 return NULL;
    4213             :         }
    4214           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    4215           0 :         if (mem_ctx == NULL) {
    4216           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    4217           0 :                 return NULL;
    4218             :         }
    4219           0 :         in = (union srvsvc_NetFileCtr *)pytalloc_get_ptr(in_obj);
    4220           0 :         if (in == NULL) {
    4221           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union srvsvc_NetFileCtr!");
    4222           0 :                 return NULL;
    4223             :         }
    4224             : 
    4225           0 :         return py_import_srvsvc_NetFileCtr(mem_ctx, level, in);
    4226             : }
    4227             : 
    4228           0 : static PyObject *py_srvsvc_NetFileCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4229             : {
    4230           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    4231           0 :         PyObject *mem_ctx_obj = NULL;
    4232           0 :         TALLOC_CTX *mem_ctx = NULL;
    4233           0 :         int level = 0;
    4234           0 :         PyObject *in = NULL;
    4235           0 :         union srvsvc_NetFileCtr *out = NULL;
    4236             : 
    4237           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    4238             :                 discard_const_p(char *, kwnames),
    4239             :                 &mem_ctx_obj,
    4240             :                 &level,
    4241             :                 &in)) {
    4242           0 :                 return NULL;
    4243             :         }
    4244           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    4245           0 :         if (mem_ctx == NULL) {
    4246           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    4247           0 :                 return NULL;
    4248             :         }
    4249             : 
    4250           0 :         out = py_export_srvsvc_NetFileCtr(mem_ctx, level, in);
    4251           0 :         if (out == NULL) {
    4252           0 :                 return NULL;
    4253             :         }
    4254             : 
    4255           0 :         return pytalloc_GenericObject_reference(out);
    4256             : }
    4257             : 
    4258             : static PyMethodDef py_srvsvc_NetFileCtr_methods[] = {
    4259             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileCtr_import),
    4260             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    4261             :                 "T.__import__(mem_ctx, level, in) => ret." },
    4262             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileCtr_export),
    4263             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    4264             :                 "T.__export__(mem_ctx, level, in) => ret." },
    4265             :         { NULL, NULL, 0, NULL }
    4266             : };
    4267             : 
    4268           0 : static PyObject *py_srvsvc_NetFileCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4269             : {
    4270           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    4271           0 :         return NULL;
    4272             : }
    4273             : 
    4274             : 
    4275             : static PyTypeObject srvsvc_NetFileCtr_Type = {
    4276             :         PyVarObject_HEAD_INIT(NULL, 0)
    4277             :         .tp_name = "srvsvc.NetFileCtr",
    4278             :         .tp_getset = NULL,
    4279             :         .tp_methods = py_srvsvc_NetFileCtr_methods,
    4280             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4281             :         .tp_new = py_srvsvc_NetFileCtr_new,
    4282             : };
    4283             : 
    4284             : 
    4285           0 : static PyObject *py_srvsvc_NetFileInfoCtr_get_level(PyObject *obj, void *closure)
    4286             : {
    4287           0 :         struct srvsvc_NetFileInfoCtr *object = (struct srvsvc_NetFileInfoCtr *)pytalloc_get_ptr(obj);
    4288             :         PyObject *py_level;
    4289           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->level);
    4290           0 :         return py_level;
    4291             : }
    4292             : 
    4293           0 : static int py_srvsvc_NetFileInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
    4294             : {
    4295           0 :         struct srvsvc_NetFileInfoCtr *object = (struct srvsvc_NetFileInfoCtr *)pytalloc_get_ptr(py_obj);
    4296           0 :         if (value == NULL) {
    4297           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->level");
    4298           0 :                 return -1;
    4299             :         }
    4300             :         {
    4301           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
    4302           0 :                 if (PyLong_Check(value)) {
    4303             :                         unsigned long long test_var;
    4304           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4305           0 :                         if (PyErr_Occurred() != NULL) {
    4306           0 :                                 return -1;
    4307             :                         }
    4308           0 :                         if (test_var > uint_max) {
    4309           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4310             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4311           0 :                                 return -1;
    4312             :                         }
    4313           0 :                         object->level = test_var;
    4314             :                 } else {
    4315           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4316             :                           PyLong_Type.tp_name);
    4317           0 :                         return -1;
    4318             :                 }
    4319             :         }
    4320           0 :         return 0;
    4321             : }
    4322             : 
    4323           0 : static PyObject *py_srvsvc_NetFileInfoCtr_get_ctr(PyObject *obj, void *closure)
    4324             : {
    4325           0 :         struct srvsvc_NetFileInfoCtr *object = (struct srvsvc_NetFileInfoCtr *)pytalloc_get_ptr(obj);
    4326             :         PyObject *py_ctr;
    4327           0 :         py_ctr = pyrpc_import_union(&srvsvc_NetFileCtr_Type, pytalloc_get_mem_ctx(obj), object->level, &object->ctr, "union srvsvc_NetFileCtr");
    4328           0 :         if (py_ctr == NULL) {
    4329           0 :                 return NULL;
    4330             :         }
    4331           0 :         return py_ctr;
    4332             : }
    4333             : 
    4334           0 : static int py_srvsvc_NetFileInfoCtr_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
    4335             : {
    4336           0 :         struct srvsvc_NetFileInfoCtr *object = (struct srvsvc_NetFileInfoCtr *)pytalloc_get_ptr(py_obj);
    4337           0 :         if (value == NULL) {
    4338           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctr");
    4339           0 :                 return -1;
    4340             :         }
    4341             :         {
    4342             :                 union srvsvc_NetFileCtr *ctr_switch_0;
    4343           0 :                 ctr_switch_0 = (union srvsvc_NetFileCtr *)pyrpc_export_union(&srvsvc_NetFileCtr_Type, pytalloc_get_mem_ctx(py_obj), object->level, value, "union srvsvc_NetFileCtr");
    4344           0 :                 if (ctr_switch_0 == NULL) {
    4345           0 :                         return -1;
    4346             :                 }
    4347           0 :                 object->ctr = *ctr_switch_0;
    4348             :         }
    4349           0 :         return 0;
    4350             : }
    4351             : 
    4352             : static PyGetSetDef py_srvsvc_NetFileInfoCtr_getsetters[] = {
    4353             :         {
    4354             :                 .name = discard_const_p(char, "level"),
    4355             :                 .get = py_srvsvc_NetFileInfoCtr_get_level,
    4356             :                 .set = py_srvsvc_NetFileInfoCtr_set_level,
    4357             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4358             :         },
    4359             :         {
    4360             :                 .name = discard_const_p(char, "ctr"),
    4361             :                 .get = py_srvsvc_NetFileInfoCtr_get_ctr,
    4362             :                 .set = py_srvsvc_NetFileInfoCtr_set_ctr,
    4363             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetFileCtr")
    4364             :         },
    4365             :         { .name = NULL }
    4366             : };
    4367             : 
    4368           0 : static PyObject *py_srvsvc_NetFileInfoCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4369             : {
    4370           0 :         return pytalloc_new(struct srvsvc_NetFileInfoCtr, type);
    4371             : }
    4372             : 
    4373             : 
    4374             : static PyTypeObject srvsvc_NetFileInfoCtr_Type = {
    4375             :         PyVarObject_HEAD_INIT(NULL, 0)
    4376             :         .tp_name = "srvsvc.NetFileInfoCtr",
    4377             :         .tp_getset = py_srvsvc_NetFileInfoCtr_getsetters,
    4378             :         .tp_methods = NULL,
    4379             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4380             :         .tp_new = py_srvsvc_NetFileInfoCtr_new,
    4381             : };
    4382             : 
    4383             : 
    4384           0 : static PyObject *py_srvsvc_NetSessInfo0_get_client(PyObject *obj, void *closure)
    4385             : {
    4386           0 :         struct srvsvc_NetSessInfo0 *object = (struct srvsvc_NetSessInfo0 *)pytalloc_get_ptr(obj);
    4387             :         PyObject *py_client;
    4388           0 :         if (object->client == NULL) {
    4389           0 :                 Py_RETURN_NONE;
    4390             :         }
    4391           0 :         if (object->client == NULL) {
    4392           0 :                 py_client = Py_None;
    4393           0 :                 Py_INCREF(py_client);
    4394             :         } else {
    4395           0 :                 if (object->client == NULL) {
    4396           0 :                         py_client = Py_None;
    4397           0 :                         Py_INCREF(py_client);
    4398             :                 } else {
    4399           0 :                         py_client = PyUnicode_Decode(object->client, strlen(object->client), "utf-8", "ignore");
    4400             :                 }
    4401             :         }
    4402           0 :         return py_client;
    4403             : }
    4404             : 
    4405           0 : static int py_srvsvc_NetSessInfo0_set_client(PyObject *py_obj, PyObject *value, void *closure)
    4406             : {
    4407           0 :         struct srvsvc_NetSessInfo0 *object = (struct srvsvc_NetSessInfo0 *)pytalloc_get_ptr(py_obj);
    4408           0 :         if (value == NULL) {
    4409           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->client");
    4410           0 :                 return -1;
    4411             :         }
    4412           0 :         if (value == Py_None) {
    4413           0 :                 object->client = NULL;
    4414             :         } else {
    4415           0 :                 object->client = NULL;
    4416             :                 {
    4417             :                         const char *test_str;
    4418             :                         const char *talloc_str;
    4419           0 :                         PyObject *unicode = NULL;
    4420           0 :                         if (PyUnicode_Check(value)) {
    4421           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    4422           0 :                                 if (unicode == NULL) {
    4423           0 :                                         PyErr_NoMemory();
    4424           0 :                                         return -1;
    4425             :                                 }
    4426           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    4427           0 :                         } else if (PyBytes_Check(value)) {
    4428           0 :                                 test_str = PyBytes_AS_STRING(value);
    4429             :                         } else {
    4430           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    4431           0 :                                 return -1;
    4432             :                         }
    4433           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    4434           0 :                         if (unicode != NULL) {
    4435           0 :                                 Py_DECREF(unicode);
    4436             :                         }
    4437           0 :                         if (talloc_str == NULL) {
    4438           0 :                                 PyErr_NoMemory();
    4439           0 :                                 return -1;
    4440             :                         }
    4441           0 :                         object->client = talloc_str;
    4442             :                 }
    4443             :         }
    4444           0 :         return 0;
    4445             : }
    4446             : 
    4447             : static PyGetSetDef py_srvsvc_NetSessInfo0_getsetters[] = {
    4448             :         {
    4449             :                 .name = discard_const_p(char, "client"),
    4450             :                 .get = py_srvsvc_NetSessInfo0_get_client,
    4451             :                 .set = py_srvsvc_NetSessInfo0_set_client,
    4452             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    4453             :         },
    4454             :         { .name = NULL }
    4455             : };
    4456             : 
    4457           0 : static PyObject *py_srvsvc_NetSessInfo0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4458             : {
    4459           0 :         return pytalloc_new(struct srvsvc_NetSessInfo0, type);
    4460             : }
    4461             : 
    4462             : 
    4463             : static PyTypeObject srvsvc_NetSessInfo0_Type = {
    4464             :         PyVarObject_HEAD_INIT(NULL, 0)
    4465             :         .tp_name = "srvsvc.NetSessInfo0",
    4466             :         .tp_getset = py_srvsvc_NetSessInfo0_getsetters,
    4467             :         .tp_methods = NULL,
    4468             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4469             :         .tp_new = py_srvsvc_NetSessInfo0_new,
    4470             : };
    4471             : 
    4472             : 
    4473           0 : static PyObject *py_srvsvc_NetSessCtr0_get_count(PyObject *obj, void *closure)
    4474             : {
    4475           0 :         struct srvsvc_NetSessCtr0 *object = (struct srvsvc_NetSessCtr0 *)pytalloc_get_ptr(obj);
    4476             :         PyObject *py_count;
    4477           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
    4478           0 :         return py_count;
    4479             : }
    4480             : 
    4481           0 : static int py_srvsvc_NetSessCtr0_set_count(PyObject *py_obj, PyObject *value, void *closure)
    4482             : {
    4483           0 :         struct srvsvc_NetSessCtr0 *object = (struct srvsvc_NetSessCtr0 *)pytalloc_get_ptr(py_obj);
    4484           0 :         if (value == NULL) {
    4485           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
    4486           0 :                 return -1;
    4487             :         }
    4488             :         {
    4489           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    4490           0 :                 if (PyLong_Check(value)) {
    4491             :                         unsigned long long test_var;
    4492           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4493           0 :                         if (PyErr_Occurred() != NULL) {
    4494           0 :                                 return -1;
    4495             :                         }
    4496           0 :                         if (test_var > uint_max) {
    4497           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4498             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4499           0 :                                 return -1;
    4500             :                         }
    4501           0 :                         object->count = test_var;
    4502             :                 } else {
    4503           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4504             :                           PyLong_Type.tp_name);
    4505           0 :                         return -1;
    4506             :                 }
    4507             :         }
    4508           0 :         return 0;
    4509             : }
    4510             : 
    4511           0 : static PyObject *py_srvsvc_NetSessCtr0_get_array(PyObject *obj, void *closure)
    4512             : {
    4513           0 :         struct srvsvc_NetSessCtr0 *object = (struct srvsvc_NetSessCtr0 *)pytalloc_get_ptr(obj);
    4514             :         PyObject *py_array;
    4515           0 :         if (object->array == NULL) {
    4516           0 :                 Py_RETURN_NONE;
    4517             :         }
    4518           0 :         if (object->array == NULL) {
    4519           0 :                 py_array = Py_None;
    4520           0 :                 Py_INCREF(py_array);
    4521             :         } else {
    4522           0 :                 py_array = PyList_New(object->count);
    4523           0 :                 if (py_array == NULL) {
    4524           0 :                         return NULL;
    4525             :                 }
    4526             :                 {
    4527             :                         int array_cntr_1;
    4528           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    4529             :                                 PyObject *py_array_1;
    4530           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetSessInfo0_Type, object->array, &object->array[array_cntr_1]);
    4531           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    4532             :                         }
    4533             :                 }
    4534             :         }
    4535           0 :         return py_array;
    4536             : }
    4537             : 
    4538           0 : static int py_srvsvc_NetSessCtr0_set_array(PyObject *py_obj, PyObject *value, void *closure)
    4539             : {
    4540           0 :         struct srvsvc_NetSessCtr0 *object = (struct srvsvc_NetSessCtr0 *)pytalloc_get_ptr(py_obj);
    4541           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    4542           0 :         if (value == NULL) {
    4543           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
    4544           0 :                 return -1;
    4545             :         }
    4546           0 :         if (value == Py_None) {
    4547           0 :                 object->array = NULL;
    4548             :         } else {
    4549           0 :                 object->array = NULL;
    4550           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    4551             :                 {
    4552             :                         int array_cntr_1;
    4553           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    4554           0 :                         if (!object->array) { return -1;; }
    4555           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    4556           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    4557           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    4558           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
    4559           0 :                                         return -1;
    4560             :                                 }
    4561           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSessInfo0_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    4562           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    4563           0 :                                         PyErr_NoMemory();
    4564           0 :                                         return -1;
    4565             :                                 }
    4566           0 :                                 object->array[array_cntr_1] = *(struct srvsvc_NetSessInfo0 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    4567             :                         }
    4568             :                 }
    4569             :         }
    4570           0 :         return 0;
    4571             : }
    4572             : 
    4573             : static PyGetSetDef py_srvsvc_NetSessCtr0_getsetters[] = {
    4574             :         {
    4575             :                 .name = discard_const_p(char, "count"),
    4576             :                 .get = py_srvsvc_NetSessCtr0_get_count,
    4577             :                 .set = py_srvsvc_NetSessCtr0_set_count,
    4578             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4579             :         },
    4580             :         {
    4581             :                 .name = discard_const_p(char, "array"),
    4582             :                 .get = py_srvsvc_NetSessCtr0_get_array,
    4583             :                 .set = py_srvsvc_NetSessCtr0_set_array,
    4584             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetSessInfo0")
    4585             :         },
    4586             :         { .name = NULL }
    4587             : };
    4588             : 
    4589           0 : static PyObject *py_srvsvc_NetSessCtr0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4590             : {
    4591           0 :         return pytalloc_new(struct srvsvc_NetSessCtr0, type);
    4592             : }
    4593             : 
    4594             : 
    4595             : static PyTypeObject srvsvc_NetSessCtr0_Type = {
    4596             :         PyVarObject_HEAD_INIT(NULL, 0)
    4597             :         .tp_name = "srvsvc.NetSessCtr0",
    4598             :         .tp_getset = py_srvsvc_NetSessCtr0_getsetters,
    4599             :         .tp_methods = NULL,
    4600             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4601             :         .tp_new = py_srvsvc_NetSessCtr0_new,
    4602             : };
    4603             : 
    4604             : 
    4605           0 : static PyObject *py_srvsvc_NetSessInfo1_get_client(PyObject *obj, void *closure)
    4606             : {
    4607           0 :         struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(obj);
    4608             :         PyObject *py_client;
    4609           0 :         if (object->client == NULL) {
    4610           0 :                 Py_RETURN_NONE;
    4611             :         }
    4612           0 :         if (object->client == NULL) {
    4613           0 :                 py_client = Py_None;
    4614           0 :                 Py_INCREF(py_client);
    4615             :         } else {
    4616           0 :                 if (object->client == NULL) {
    4617           0 :                         py_client = Py_None;
    4618           0 :                         Py_INCREF(py_client);
    4619             :                 } else {
    4620           0 :                         py_client = PyUnicode_Decode(object->client, strlen(object->client), "utf-8", "ignore");
    4621             :                 }
    4622             :         }
    4623           0 :         return py_client;
    4624             : }
    4625             : 
    4626           0 : static int py_srvsvc_NetSessInfo1_set_client(PyObject *py_obj, PyObject *value, void *closure)
    4627             : {
    4628           0 :         struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(py_obj);
    4629           0 :         if (value == NULL) {
    4630           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->client");
    4631           0 :                 return -1;
    4632             :         }
    4633           0 :         if (value == Py_None) {
    4634           0 :                 object->client = NULL;
    4635             :         } else {
    4636           0 :                 object->client = NULL;
    4637             :                 {
    4638             :                         const char *test_str;
    4639             :                         const char *talloc_str;
    4640           0 :                         PyObject *unicode = NULL;
    4641           0 :                         if (PyUnicode_Check(value)) {
    4642           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    4643           0 :                                 if (unicode == NULL) {
    4644           0 :                                         PyErr_NoMemory();
    4645           0 :                                         return -1;
    4646             :                                 }
    4647           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    4648           0 :                         } else if (PyBytes_Check(value)) {
    4649           0 :                                 test_str = PyBytes_AS_STRING(value);
    4650             :                         } else {
    4651           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    4652           0 :                                 return -1;
    4653             :                         }
    4654           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    4655           0 :                         if (unicode != NULL) {
    4656           0 :                                 Py_DECREF(unicode);
    4657             :                         }
    4658           0 :                         if (talloc_str == NULL) {
    4659           0 :                                 PyErr_NoMemory();
    4660           0 :                                 return -1;
    4661             :                         }
    4662           0 :                         object->client = talloc_str;
    4663             :                 }
    4664             :         }
    4665           0 :         return 0;
    4666             : }
    4667             : 
    4668           0 : static PyObject *py_srvsvc_NetSessInfo1_get_user(PyObject *obj, void *closure)
    4669             : {
    4670           0 :         struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(obj);
    4671             :         PyObject *py_user;
    4672           0 :         if (object->user == NULL) {
    4673           0 :                 Py_RETURN_NONE;
    4674             :         }
    4675           0 :         if (object->user == NULL) {
    4676           0 :                 py_user = Py_None;
    4677           0 :                 Py_INCREF(py_user);
    4678             :         } else {
    4679           0 :                 if (object->user == NULL) {
    4680           0 :                         py_user = Py_None;
    4681           0 :                         Py_INCREF(py_user);
    4682             :                 } else {
    4683           0 :                         py_user = PyUnicode_Decode(object->user, strlen(object->user), "utf-8", "ignore");
    4684             :                 }
    4685             :         }
    4686           0 :         return py_user;
    4687             : }
    4688             : 
    4689           0 : static int py_srvsvc_NetSessInfo1_set_user(PyObject *py_obj, PyObject *value, void *closure)
    4690             : {
    4691           0 :         struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(py_obj);
    4692           0 :         if (value == NULL) {
    4693           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user");
    4694           0 :                 return -1;
    4695             :         }
    4696           0 :         if (value == Py_None) {
    4697           0 :                 object->user = NULL;
    4698             :         } else {
    4699           0 :                 object->user = NULL;
    4700             :                 {
    4701             :                         const char *test_str;
    4702             :                         const char *talloc_str;
    4703           0 :                         PyObject *unicode = NULL;
    4704           0 :                         if (PyUnicode_Check(value)) {
    4705           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    4706           0 :                                 if (unicode == NULL) {
    4707           0 :                                         PyErr_NoMemory();
    4708           0 :                                         return -1;
    4709             :                                 }
    4710           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    4711           0 :                         } else if (PyBytes_Check(value)) {
    4712           0 :                                 test_str = PyBytes_AS_STRING(value);
    4713             :                         } else {
    4714           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    4715           0 :                                 return -1;
    4716             :                         }
    4717           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    4718           0 :                         if (unicode != NULL) {
    4719           0 :                                 Py_DECREF(unicode);
    4720             :                         }
    4721           0 :                         if (talloc_str == NULL) {
    4722           0 :                                 PyErr_NoMemory();
    4723           0 :                                 return -1;
    4724             :                         }
    4725           0 :                         object->user = talloc_str;
    4726             :                 }
    4727             :         }
    4728           0 :         return 0;
    4729             : }
    4730             : 
    4731           0 : static PyObject *py_srvsvc_NetSessInfo1_get_num_open(PyObject *obj, void *closure)
    4732             : {
    4733           0 :         struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(obj);
    4734             :         PyObject *py_num_open;
    4735           0 :         py_num_open = PyLong_FromUnsignedLongLong((uint32_t)object->num_open);
    4736           0 :         return py_num_open;
    4737             : }
    4738             : 
    4739           0 : static int py_srvsvc_NetSessInfo1_set_num_open(PyObject *py_obj, PyObject *value, void *closure)
    4740             : {
    4741           0 :         struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(py_obj);
    4742           0 :         if (value == NULL) {
    4743           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_open");
    4744           0 :                 return -1;
    4745             :         }
    4746             :         {
    4747           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_open));
    4748           0 :                 if (PyLong_Check(value)) {
    4749             :                         unsigned long long test_var;
    4750           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4751           0 :                         if (PyErr_Occurred() != NULL) {
    4752           0 :                                 return -1;
    4753             :                         }
    4754           0 :                         if (test_var > uint_max) {
    4755           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4756             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4757           0 :                                 return -1;
    4758             :                         }
    4759           0 :                         object->num_open = test_var;
    4760             :                 } else {
    4761           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4762             :                           PyLong_Type.tp_name);
    4763           0 :                         return -1;
    4764             :                 }
    4765             :         }
    4766           0 :         return 0;
    4767             : }
    4768             : 
    4769           0 : static PyObject *py_srvsvc_NetSessInfo1_get_time(PyObject *obj, void *closure)
    4770             : {
    4771           0 :         struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(obj);
    4772             :         PyObject *py_time;
    4773           0 :         py_time = PyLong_FromUnsignedLongLong((uint32_t)object->time);
    4774           0 :         return py_time;
    4775             : }
    4776             : 
    4777           0 : static int py_srvsvc_NetSessInfo1_set_time(PyObject *py_obj, PyObject *value, void *closure)
    4778             : {
    4779           0 :         struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(py_obj);
    4780           0 :         if (value == NULL) {
    4781           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->time");
    4782           0 :                 return -1;
    4783             :         }
    4784             :         {
    4785           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->time));
    4786           0 :                 if (PyLong_Check(value)) {
    4787             :                         unsigned long long test_var;
    4788           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4789           0 :                         if (PyErr_Occurred() != NULL) {
    4790           0 :                                 return -1;
    4791             :                         }
    4792           0 :                         if (test_var > uint_max) {
    4793           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4794             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4795           0 :                                 return -1;
    4796             :                         }
    4797           0 :                         object->time = test_var;
    4798             :                 } else {
    4799           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4800             :                           PyLong_Type.tp_name);
    4801           0 :                         return -1;
    4802             :                 }
    4803             :         }
    4804           0 :         return 0;
    4805             : }
    4806             : 
    4807           0 : static PyObject *py_srvsvc_NetSessInfo1_get_idle_time(PyObject *obj, void *closure)
    4808             : {
    4809           0 :         struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(obj);
    4810             :         PyObject *py_idle_time;
    4811           0 :         py_idle_time = PyLong_FromUnsignedLongLong((uint32_t)object->idle_time);
    4812           0 :         return py_idle_time;
    4813             : }
    4814             : 
    4815           0 : static int py_srvsvc_NetSessInfo1_set_idle_time(PyObject *py_obj, PyObject *value, void *closure)
    4816             : {
    4817           0 :         struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(py_obj);
    4818           0 :         if (value == NULL) {
    4819           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->idle_time");
    4820           0 :                 return -1;
    4821             :         }
    4822             :         {
    4823           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->idle_time));
    4824           0 :                 if (PyLong_Check(value)) {
    4825             :                         unsigned long long test_var;
    4826           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4827           0 :                         if (PyErr_Occurred() != NULL) {
    4828           0 :                                 return -1;
    4829             :                         }
    4830           0 :                         if (test_var > uint_max) {
    4831           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4832             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4833           0 :                                 return -1;
    4834             :                         }
    4835           0 :                         object->idle_time = test_var;
    4836             :                 } else {
    4837           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4838             :                           PyLong_Type.tp_name);
    4839           0 :                         return -1;
    4840             :                 }
    4841             :         }
    4842           0 :         return 0;
    4843             : }
    4844             : 
    4845           0 : static PyObject *py_srvsvc_NetSessInfo1_get_user_flags(PyObject *obj, void *closure)
    4846             : {
    4847           0 :         struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(obj);
    4848             :         PyObject *py_user_flags;
    4849           0 :         py_user_flags = PyLong_FromUnsignedLongLong((uint32_t)object->user_flags);
    4850           0 :         return py_user_flags;
    4851             : }
    4852             : 
    4853           0 : static int py_srvsvc_NetSessInfo1_set_user_flags(PyObject *py_obj, PyObject *value, void *closure)
    4854             : {
    4855           0 :         struct srvsvc_NetSessInfo1 *object = (struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(py_obj);
    4856           0 :         if (value == NULL) {
    4857           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user_flags");
    4858           0 :                 return -1;
    4859             :         }
    4860             :         {
    4861           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->user_flags));
    4862           0 :                 if (PyLong_Check(value)) {
    4863             :                         unsigned long long test_var;
    4864           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4865           0 :                         if (PyErr_Occurred() != NULL) {
    4866           0 :                                 return -1;
    4867             :                         }
    4868           0 :                         if (test_var > uint_max) {
    4869           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4870             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4871           0 :                                 return -1;
    4872             :                         }
    4873           0 :                         object->user_flags = test_var;
    4874             :                 } else {
    4875           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4876             :                           PyLong_Type.tp_name);
    4877           0 :                         return -1;
    4878             :                 }
    4879             :         }
    4880           0 :         return 0;
    4881             : }
    4882             : 
    4883             : static PyGetSetDef py_srvsvc_NetSessInfo1_getsetters[] = {
    4884             :         {
    4885             :                 .name = discard_const_p(char, "client"),
    4886             :                 .get = py_srvsvc_NetSessInfo1_get_client,
    4887             :                 .set = py_srvsvc_NetSessInfo1_set_client,
    4888             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    4889             :         },
    4890             :         {
    4891             :                 .name = discard_const_p(char, "user"),
    4892             :                 .get = py_srvsvc_NetSessInfo1_get_user,
    4893             :                 .set = py_srvsvc_NetSessInfo1_set_user,
    4894             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    4895             :         },
    4896             :         {
    4897             :                 .name = discard_const_p(char, "num_open"),
    4898             :                 .get = py_srvsvc_NetSessInfo1_get_num_open,
    4899             :                 .set = py_srvsvc_NetSessInfo1_set_num_open,
    4900             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4901             :         },
    4902             :         {
    4903             :                 .name = discard_const_p(char, "time"),
    4904             :                 .get = py_srvsvc_NetSessInfo1_get_time,
    4905             :                 .set = py_srvsvc_NetSessInfo1_set_time,
    4906             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4907             :         },
    4908             :         {
    4909             :                 .name = discard_const_p(char, "idle_time"),
    4910             :                 .get = py_srvsvc_NetSessInfo1_get_idle_time,
    4911             :                 .set = py_srvsvc_NetSessInfo1_set_idle_time,
    4912             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4913             :         },
    4914             :         {
    4915             :                 .name = discard_const_p(char, "user_flags"),
    4916             :                 .get = py_srvsvc_NetSessInfo1_get_user_flags,
    4917             :                 .set = py_srvsvc_NetSessInfo1_set_user_flags,
    4918             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4919             :         },
    4920             :         { .name = NULL }
    4921             : };
    4922             : 
    4923           0 : static PyObject *py_srvsvc_NetSessInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4924             : {
    4925           0 :         return pytalloc_new(struct srvsvc_NetSessInfo1, type);
    4926             : }
    4927             : 
    4928             : 
    4929             : static PyTypeObject srvsvc_NetSessInfo1_Type = {
    4930             :         PyVarObject_HEAD_INIT(NULL, 0)
    4931             :         .tp_name = "srvsvc.NetSessInfo1",
    4932             :         .tp_getset = py_srvsvc_NetSessInfo1_getsetters,
    4933             :         .tp_methods = NULL,
    4934             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4935             :         .tp_new = py_srvsvc_NetSessInfo1_new,
    4936             : };
    4937             : 
    4938             : 
    4939           0 : static PyObject *py_srvsvc_NetSessCtr1_get_count(PyObject *obj, void *closure)
    4940             : {
    4941           0 :         struct srvsvc_NetSessCtr1 *object = (struct srvsvc_NetSessCtr1 *)pytalloc_get_ptr(obj);
    4942             :         PyObject *py_count;
    4943           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
    4944           0 :         return py_count;
    4945             : }
    4946             : 
    4947           0 : static int py_srvsvc_NetSessCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
    4948             : {
    4949           0 :         struct srvsvc_NetSessCtr1 *object = (struct srvsvc_NetSessCtr1 *)pytalloc_get_ptr(py_obj);
    4950           0 :         if (value == NULL) {
    4951           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
    4952           0 :                 return -1;
    4953             :         }
    4954             :         {
    4955           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    4956           0 :                 if (PyLong_Check(value)) {
    4957             :                         unsigned long long test_var;
    4958           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4959           0 :                         if (PyErr_Occurred() != NULL) {
    4960           0 :                                 return -1;
    4961             :                         }
    4962           0 :                         if (test_var > uint_max) {
    4963           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4964             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4965           0 :                                 return -1;
    4966             :                         }
    4967           0 :                         object->count = test_var;
    4968             :                 } else {
    4969           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4970             :                           PyLong_Type.tp_name);
    4971           0 :                         return -1;
    4972             :                 }
    4973             :         }
    4974           0 :         return 0;
    4975             : }
    4976             : 
    4977           0 : static PyObject *py_srvsvc_NetSessCtr1_get_array(PyObject *obj, void *closure)
    4978             : {
    4979           0 :         struct srvsvc_NetSessCtr1 *object = (struct srvsvc_NetSessCtr1 *)pytalloc_get_ptr(obj);
    4980             :         PyObject *py_array;
    4981           0 :         if (object->array == NULL) {
    4982           0 :                 Py_RETURN_NONE;
    4983             :         }
    4984           0 :         if (object->array == NULL) {
    4985           0 :                 py_array = Py_None;
    4986           0 :                 Py_INCREF(py_array);
    4987             :         } else {
    4988           0 :                 py_array = PyList_New(object->count);
    4989           0 :                 if (py_array == NULL) {
    4990           0 :                         return NULL;
    4991             :                 }
    4992             :                 {
    4993             :                         int array_cntr_1;
    4994           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    4995             :                                 PyObject *py_array_1;
    4996           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetSessInfo1_Type, object->array, &object->array[array_cntr_1]);
    4997           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    4998             :                         }
    4999             :                 }
    5000             :         }
    5001           0 :         return py_array;
    5002             : }
    5003             : 
    5004           0 : static int py_srvsvc_NetSessCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
    5005             : {
    5006           0 :         struct srvsvc_NetSessCtr1 *object = (struct srvsvc_NetSessCtr1 *)pytalloc_get_ptr(py_obj);
    5007           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    5008           0 :         if (value == NULL) {
    5009           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
    5010           0 :                 return -1;
    5011             :         }
    5012           0 :         if (value == Py_None) {
    5013           0 :                 object->array = NULL;
    5014             :         } else {
    5015           0 :                 object->array = NULL;
    5016           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5017             :                 {
    5018             :                         int array_cntr_1;
    5019           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    5020           0 :                         if (!object->array) { return -1;; }
    5021           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    5022           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    5023           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    5024           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
    5025           0 :                                         return -1;
    5026             :                                 }
    5027           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSessInfo1_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    5028           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    5029           0 :                                         PyErr_NoMemory();
    5030           0 :                                         return -1;
    5031             :                                 }
    5032           0 :                                 object->array[array_cntr_1] = *(struct srvsvc_NetSessInfo1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    5033             :                         }
    5034             :                 }
    5035             :         }
    5036           0 :         return 0;
    5037             : }
    5038             : 
    5039             : static PyGetSetDef py_srvsvc_NetSessCtr1_getsetters[] = {
    5040             :         {
    5041             :                 .name = discard_const_p(char, "count"),
    5042             :                 .get = py_srvsvc_NetSessCtr1_get_count,
    5043             :                 .set = py_srvsvc_NetSessCtr1_set_count,
    5044             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5045             :         },
    5046             :         {
    5047             :                 .name = discard_const_p(char, "array"),
    5048             :                 .get = py_srvsvc_NetSessCtr1_get_array,
    5049             :                 .set = py_srvsvc_NetSessCtr1_set_array,
    5050             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetSessInfo1")
    5051             :         },
    5052             :         { .name = NULL }
    5053             : };
    5054             : 
    5055           0 : static PyObject *py_srvsvc_NetSessCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5056             : {
    5057           0 :         return pytalloc_new(struct srvsvc_NetSessCtr1, type);
    5058             : }
    5059             : 
    5060             : 
    5061             : static PyTypeObject srvsvc_NetSessCtr1_Type = {
    5062             :         PyVarObject_HEAD_INIT(NULL, 0)
    5063             :         .tp_name = "srvsvc.NetSessCtr1",
    5064             :         .tp_getset = py_srvsvc_NetSessCtr1_getsetters,
    5065             :         .tp_methods = NULL,
    5066             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5067             :         .tp_new = py_srvsvc_NetSessCtr1_new,
    5068             : };
    5069             : 
    5070             : 
    5071           0 : static PyObject *py_srvsvc_NetSessInfo2_get_client(PyObject *obj, void *closure)
    5072             : {
    5073           0 :         struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(obj);
    5074             :         PyObject *py_client;
    5075           0 :         if (object->client == NULL) {
    5076           0 :                 Py_RETURN_NONE;
    5077             :         }
    5078           0 :         if (object->client == NULL) {
    5079           0 :                 py_client = Py_None;
    5080           0 :                 Py_INCREF(py_client);
    5081             :         } else {
    5082           0 :                 if (object->client == NULL) {
    5083           0 :                         py_client = Py_None;
    5084           0 :                         Py_INCREF(py_client);
    5085             :                 } else {
    5086           0 :                         py_client = PyUnicode_Decode(object->client, strlen(object->client), "utf-8", "ignore");
    5087             :                 }
    5088             :         }
    5089           0 :         return py_client;
    5090             : }
    5091             : 
    5092           0 : static int py_srvsvc_NetSessInfo2_set_client(PyObject *py_obj, PyObject *value, void *closure)
    5093             : {
    5094           0 :         struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(py_obj);
    5095           0 :         if (value == NULL) {
    5096           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->client");
    5097           0 :                 return -1;
    5098             :         }
    5099           0 :         if (value == Py_None) {
    5100           0 :                 object->client = NULL;
    5101             :         } else {
    5102           0 :                 object->client = NULL;
    5103             :                 {
    5104             :                         const char *test_str;
    5105             :                         const char *talloc_str;
    5106           0 :                         PyObject *unicode = NULL;
    5107           0 :                         if (PyUnicode_Check(value)) {
    5108           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    5109           0 :                                 if (unicode == NULL) {
    5110           0 :                                         PyErr_NoMemory();
    5111           0 :                                         return -1;
    5112             :                                 }
    5113           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    5114           0 :                         } else if (PyBytes_Check(value)) {
    5115           0 :                                 test_str = PyBytes_AS_STRING(value);
    5116             :                         } else {
    5117           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    5118           0 :                                 return -1;
    5119             :                         }
    5120           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    5121           0 :                         if (unicode != NULL) {
    5122           0 :                                 Py_DECREF(unicode);
    5123             :                         }
    5124           0 :                         if (talloc_str == NULL) {
    5125           0 :                                 PyErr_NoMemory();
    5126           0 :                                 return -1;
    5127             :                         }
    5128           0 :                         object->client = talloc_str;
    5129             :                 }
    5130             :         }
    5131           0 :         return 0;
    5132             : }
    5133             : 
    5134           0 : static PyObject *py_srvsvc_NetSessInfo2_get_user(PyObject *obj, void *closure)
    5135             : {
    5136           0 :         struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(obj);
    5137             :         PyObject *py_user;
    5138           0 :         if (object->user == NULL) {
    5139           0 :                 Py_RETURN_NONE;
    5140             :         }
    5141           0 :         if (object->user == NULL) {
    5142           0 :                 py_user = Py_None;
    5143           0 :                 Py_INCREF(py_user);
    5144             :         } else {
    5145           0 :                 if (object->user == NULL) {
    5146           0 :                         py_user = Py_None;
    5147           0 :                         Py_INCREF(py_user);
    5148             :                 } else {
    5149           0 :                         py_user = PyUnicode_Decode(object->user, strlen(object->user), "utf-8", "ignore");
    5150             :                 }
    5151             :         }
    5152           0 :         return py_user;
    5153             : }
    5154             : 
    5155           0 : static int py_srvsvc_NetSessInfo2_set_user(PyObject *py_obj, PyObject *value, void *closure)
    5156             : {
    5157           0 :         struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(py_obj);
    5158           0 :         if (value == NULL) {
    5159           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user");
    5160           0 :                 return -1;
    5161             :         }
    5162           0 :         if (value == Py_None) {
    5163           0 :                 object->user = NULL;
    5164             :         } else {
    5165           0 :                 object->user = NULL;
    5166             :                 {
    5167             :                         const char *test_str;
    5168             :                         const char *talloc_str;
    5169           0 :                         PyObject *unicode = NULL;
    5170           0 :                         if (PyUnicode_Check(value)) {
    5171           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    5172           0 :                                 if (unicode == NULL) {
    5173           0 :                                         PyErr_NoMemory();
    5174           0 :                                         return -1;
    5175             :                                 }
    5176           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    5177           0 :                         } else if (PyBytes_Check(value)) {
    5178           0 :                                 test_str = PyBytes_AS_STRING(value);
    5179             :                         } else {
    5180           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    5181           0 :                                 return -1;
    5182             :                         }
    5183           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    5184           0 :                         if (unicode != NULL) {
    5185           0 :                                 Py_DECREF(unicode);
    5186             :                         }
    5187           0 :                         if (talloc_str == NULL) {
    5188           0 :                                 PyErr_NoMemory();
    5189           0 :                                 return -1;
    5190             :                         }
    5191           0 :                         object->user = talloc_str;
    5192             :                 }
    5193             :         }
    5194           0 :         return 0;
    5195             : }
    5196             : 
    5197           0 : static PyObject *py_srvsvc_NetSessInfo2_get_num_open(PyObject *obj, void *closure)
    5198             : {
    5199           0 :         struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(obj);
    5200             :         PyObject *py_num_open;
    5201           0 :         py_num_open = PyLong_FromUnsignedLongLong((uint32_t)object->num_open);
    5202           0 :         return py_num_open;
    5203             : }
    5204             : 
    5205           0 : static int py_srvsvc_NetSessInfo2_set_num_open(PyObject *py_obj, PyObject *value, void *closure)
    5206             : {
    5207           0 :         struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(py_obj);
    5208           0 :         if (value == NULL) {
    5209           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_open");
    5210           0 :                 return -1;
    5211             :         }
    5212             :         {
    5213           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_open));
    5214           0 :                 if (PyLong_Check(value)) {
    5215             :                         unsigned long long test_var;
    5216           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5217           0 :                         if (PyErr_Occurred() != NULL) {
    5218           0 :                                 return -1;
    5219             :                         }
    5220           0 :                         if (test_var > uint_max) {
    5221           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5222             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5223           0 :                                 return -1;
    5224             :                         }
    5225           0 :                         object->num_open = test_var;
    5226             :                 } else {
    5227           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5228             :                           PyLong_Type.tp_name);
    5229           0 :                         return -1;
    5230             :                 }
    5231             :         }
    5232           0 :         return 0;
    5233             : }
    5234             : 
    5235           0 : static PyObject *py_srvsvc_NetSessInfo2_get_time(PyObject *obj, void *closure)
    5236             : {
    5237           0 :         struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(obj);
    5238             :         PyObject *py_time;
    5239           0 :         py_time = PyLong_FromUnsignedLongLong((uint32_t)object->time);
    5240           0 :         return py_time;
    5241             : }
    5242             : 
    5243           0 : static int py_srvsvc_NetSessInfo2_set_time(PyObject *py_obj, PyObject *value, void *closure)
    5244             : {
    5245           0 :         struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(py_obj);
    5246           0 :         if (value == NULL) {
    5247           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->time");
    5248           0 :                 return -1;
    5249             :         }
    5250             :         {
    5251           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->time));
    5252           0 :                 if (PyLong_Check(value)) {
    5253             :                         unsigned long long test_var;
    5254           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5255           0 :                         if (PyErr_Occurred() != NULL) {
    5256           0 :                                 return -1;
    5257             :                         }
    5258           0 :                         if (test_var > uint_max) {
    5259           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5260             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5261           0 :                                 return -1;
    5262             :                         }
    5263           0 :                         object->time = test_var;
    5264             :                 } else {
    5265           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5266             :                           PyLong_Type.tp_name);
    5267           0 :                         return -1;
    5268             :                 }
    5269             :         }
    5270           0 :         return 0;
    5271             : }
    5272             : 
    5273           0 : static PyObject *py_srvsvc_NetSessInfo2_get_idle_time(PyObject *obj, void *closure)
    5274             : {
    5275           0 :         struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(obj);
    5276             :         PyObject *py_idle_time;
    5277           0 :         py_idle_time = PyLong_FromUnsignedLongLong((uint32_t)object->idle_time);
    5278           0 :         return py_idle_time;
    5279             : }
    5280             : 
    5281           0 : static int py_srvsvc_NetSessInfo2_set_idle_time(PyObject *py_obj, PyObject *value, void *closure)
    5282             : {
    5283           0 :         struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(py_obj);
    5284           0 :         if (value == NULL) {
    5285           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->idle_time");
    5286           0 :                 return -1;
    5287             :         }
    5288             :         {
    5289           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->idle_time));
    5290           0 :                 if (PyLong_Check(value)) {
    5291             :                         unsigned long long test_var;
    5292           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5293           0 :                         if (PyErr_Occurred() != NULL) {
    5294           0 :                                 return -1;
    5295             :                         }
    5296           0 :                         if (test_var > uint_max) {
    5297           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5298             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5299           0 :                                 return -1;
    5300             :                         }
    5301           0 :                         object->idle_time = test_var;
    5302             :                 } else {
    5303           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5304             :                           PyLong_Type.tp_name);
    5305           0 :                         return -1;
    5306             :                 }
    5307             :         }
    5308           0 :         return 0;
    5309             : }
    5310             : 
    5311           0 : static PyObject *py_srvsvc_NetSessInfo2_get_user_flags(PyObject *obj, void *closure)
    5312             : {
    5313           0 :         struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(obj);
    5314             :         PyObject *py_user_flags;
    5315           0 :         py_user_flags = PyLong_FromUnsignedLongLong((uint32_t)object->user_flags);
    5316           0 :         return py_user_flags;
    5317             : }
    5318             : 
    5319           0 : static int py_srvsvc_NetSessInfo2_set_user_flags(PyObject *py_obj, PyObject *value, void *closure)
    5320             : {
    5321           0 :         struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(py_obj);
    5322           0 :         if (value == NULL) {
    5323           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user_flags");
    5324           0 :                 return -1;
    5325             :         }
    5326             :         {
    5327           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->user_flags));
    5328           0 :                 if (PyLong_Check(value)) {
    5329             :                         unsigned long long test_var;
    5330           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5331           0 :                         if (PyErr_Occurred() != NULL) {
    5332           0 :                                 return -1;
    5333             :                         }
    5334           0 :                         if (test_var > uint_max) {
    5335           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5336             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5337           0 :                                 return -1;
    5338             :                         }
    5339           0 :                         object->user_flags = test_var;
    5340             :                 } else {
    5341           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5342             :                           PyLong_Type.tp_name);
    5343           0 :                         return -1;
    5344             :                 }
    5345             :         }
    5346           0 :         return 0;
    5347             : }
    5348             : 
    5349           0 : static PyObject *py_srvsvc_NetSessInfo2_get_client_type(PyObject *obj, void *closure)
    5350             : {
    5351           0 :         struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(obj);
    5352             :         PyObject *py_client_type;
    5353           0 :         if (object->client_type == NULL) {
    5354           0 :                 Py_RETURN_NONE;
    5355             :         }
    5356           0 :         if (object->client_type == NULL) {
    5357           0 :                 py_client_type = Py_None;
    5358           0 :                 Py_INCREF(py_client_type);
    5359             :         } else {
    5360           0 :                 if (object->client_type == NULL) {
    5361           0 :                         py_client_type = Py_None;
    5362           0 :                         Py_INCREF(py_client_type);
    5363             :                 } else {
    5364           0 :                         py_client_type = PyUnicode_Decode(object->client_type, strlen(object->client_type), "utf-8", "ignore");
    5365             :                 }
    5366             :         }
    5367           0 :         return py_client_type;
    5368             : }
    5369             : 
    5370           0 : static int py_srvsvc_NetSessInfo2_set_client_type(PyObject *py_obj, PyObject *value, void *closure)
    5371             : {
    5372           0 :         struct srvsvc_NetSessInfo2 *object = (struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(py_obj);
    5373           0 :         if (value == NULL) {
    5374           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->client_type");
    5375           0 :                 return -1;
    5376             :         }
    5377           0 :         if (value == Py_None) {
    5378           0 :                 object->client_type = NULL;
    5379             :         } else {
    5380           0 :                 object->client_type = NULL;
    5381             :                 {
    5382             :                         const char *test_str;
    5383             :                         const char *talloc_str;
    5384           0 :                         PyObject *unicode = NULL;
    5385           0 :                         if (PyUnicode_Check(value)) {
    5386           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    5387           0 :                                 if (unicode == NULL) {
    5388           0 :                                         PyErr_NoMemory();
    5389           0 :                                         return -1;
    5390             :                                 }
    5391           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    5392           0 :                         } else if (PyBytes_Check(value)) {
    5393           0 :                                 test_str = PyBytes_AS_STRING(value);
    5394             :                         } else {
    5395           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    5396           0 :                                 return -1;
    5397             :                         }
    5398           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    5399           0 :                         if (unicode != NULL) {
    5400           0 :                                 Py_DECREF(unicode);
    5401             :                         }
    5402           0 :                         if (talloc_str == NULL) {
    5403           0 :                                 PyErr_NoMemory();
    5404           0 :                                 return -1;
    5405             :                         }
    5406           0 :                         object->client_type = talloc_str;
    5407             :                 }
    5408             :         }
    5409           0 :         return 0;
    5410             : }
    5411             : 
    5412             : static PyGetSetDef py_srvsvc_NetSessInfo2_getsetters[] = {
    5413             :         {
    5414             :                 .name = discard_const_p(char, "client"),
    5415             :                 .get = py_srvsvc_NetSessInfo2_get_client,
    5416             :                 .set = py_srvsvc_NetSessInfo2_set_client,
    5417             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    5418             :         },
    5419             :         {
    5420             :                 .name = discard_const_p(char, "user"),
    5421             :                 .get = py_srvsvc_NetSessInfo2_get_user,
    5422             :                 .set = py_srvsvc_NetSessInfo2_set_user,
    5423             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    5424             :         },
    5425             :         {
    5426             :                 .name = discard_const_p(char, "num_open"),
    5427             :                 .get = py_srvsvc_NetSessInfo2_get_num_open,
    5428             :                 .set = py_srvsvc_NetSessInfo2_set_num_open,
    5429             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5430             :         },
    5431             :         {
    5432             :                 .name = discard_const_p(char, "time"),
    5433             :                 .get = py_srvsvc_NetSessInfo2_get_time,
    5434             :                 .set = py_srvsvc_NetSessInfo2_set_time,
    5435             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5436             :         },
    5437             :         {
    5438             :                 .name = discard_const_p(char, "idle_time"),
    5439             :                 .get = py_srvsvc_NetSessInfo2_get_idle_time,
    5440             :                 .set = py_srvsvc_NetSessInfo2_set_idle_time,
    5441             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5442             :         },
    5443             :         {
    5444             :                 .name = discard_const_p(char, "user_flags"),
    5445             :                 .get = py_srvsvc_NetSessInfo2_get_user_flags,
    5446             :                 .set = py_srvsvc_NetSessInfo2_set_user_flags,
    5447             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5448             :         },
    5449             :         {
    5450             :                 .name = discard_const_p(char, "client_type"),
    5451             :                 .get = py_srvsvc_NetSessInfo2_get_client_type,
    5452             :                 .set = py_srvsvc_NetSessInfo2_set_client_type,
    5453             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    5454             :         },
    5455             :         { .name = NULL }
    5456             : };
    5457             : 
    5458           0 : static PyObject *py_srvsvc_NetSessInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5459             : {
    5460           0 :         return pytalloc_new(struct srvsvc_NetSessInfo2, type);
    5461             : }
    5462             : 
    5463             : 
    5464             : static PyTypeObject srvsvc_NetSessInfo2_Type = {
    5465             :         PyVarObject_HEAD_INIT(NULL, 0)
    5466             :         .tp_name = "srvsvc.NetSessInfo2",
    5467             :         .tp_getset = py_srvsvc_NetSessInfo2_getsetters,
    5468             :         .tp_methods = NULL,
    5469             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5470             :         .tp_new = py_srvsvc_NetSessInfo2_new,
    5471             : };
    5472             : 
    5473             : 
    5474           0 : static PyObject *py_srvsvc_NetSessCtr2_get_count(PyObject *obj, void *closure)
    5475             : {
    5476           0 :         struct srvsvc_NetSessCtr2 *object = (struct srvsvc_NetSessCtr2 *)pytalloc_get_ptr(obj);
    5477             :         PyObject *py_count;
    5478           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
    5479           0 :         return py_count;
    5480             : }
    5481             : 
    5482           0 : static int py_srvsvc_NetSessCtr2_set_count(PyObject *py_obj, PyObject *value, void *closure)
    5483             : {
    5484           0 :         struct srvsvc_NetSessCtr2 *object = (struct srvsvc_NetSessCtr2 *)pytalloc_get_ptr(py_obj);
    5485           0 :         if (value == NULL) {
    5486           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
    5487           0 :                 return -1;
    5488             :         }
    5489             :         {
    5490           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    5491           0 :                 if (PyLong_Check(value)) {
    5492             :                         unsigned long long test_var;
    5493           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5494           0 :                         if (PyErr_Occurred() != NULL) {
    5495           0 :                                 return -1;
    5496             :                         }
    5497           0 :                         if (test_var > uint_max) {
    5498           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5499             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5500           0 :                                 return -1;
    5501             :                         }
    5502           0 :                         object->count = test_var;
    5503             :                 } else {
    5504           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5505             :                           PyLong_Type.tp_name);
    5506           0 :                         return -1;
    5507             :                 }
    5508             :         }
    5509           0 :         return 0;
    5510             : }
    5511             : 
    5512           0 : static PyObject *py_srvsvc_NetSessCtr2_get_array(PyObject *obj, void *closure)
    5513             : {
    5514           0 :         struct srvsvc_NetSessCtr2 *object = (struct srvsvc_NetSessCtr2 *)pytalloc_get_ptr(obj);
    5515             :         PyObject *py_array;
    5516           0 :         if (object->array == NULL) {
    5517           0 :                 Py_RETURN_NONE;
    5518             :         }
    5519           0 :         if (object->array == NULL) {
    5520           0 :                 py_array = Py_None;
    5521           0 :                 Py_INCREF(py_array);
    5522             :         } else {
    5523           0 :                 py_array = PyList_New(object->count);
    5524           0 :                 if (py_array == NULL) {
    5525           0 :                         return NULL;
    5526             :                 }
    5527             :                 {
    5528             :                         int array_cntr_1;
    5529           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    5530             :                                 PyObject *py_array_1;
    5531           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetSessInfo2_Type, object->array, &object->array[array_cntr_1]);
    5532           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    5533             :                         }
    5534             :                 }
    5535             :         }
    5536           0 :         return py_array;
    5537             : }
    5538             : 
    5539           0 : static int py_srvsvc_NetSessCtr2_set_array(PyObject *py_obj, PyObject *value, void *closure)
    5540             : {
    5541           0 :         struct srvsvc_NetSessCtr2 *object = (struct srvsvc_NetSessCtr2 *)pytalloc_get_ptr(py_obj);
    5542           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    5543           0 :         if (value == NULL) {
    5544           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
    5545           0 :                 return -1;
    5546             :         }
    5547           0 :         if (value == Py_None) {
    5548           0 :                 object->array = NULL;
    5549             :         } else {
    5550           0 :                 object->array = NULL;
    5551           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5552             :                 {
    5553             :                         int array_cntr_1;
    5554           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    5555           0 :                         if (!object->array) { return -1;; }
    5556           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    5557           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    5558           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    5559           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
    5560           0 :                                         return -1;
    5561             :                                 }
    5562           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSessInfo2_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    5563           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    5564           0 :                                         PyErr_NoMemory();
    5565           0 :                                         return -1;
    5566             :                                 }
    5567           0 :                                 object->array[array_cntr_1] = *(struct srvsvc_NetSessInfo2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    5568             :                         }
    5569             :                 }
    5570             :         }
    5571           0 :         return 0;
    5572             : }
    5573             : 
    5574             : static PyGetSetDef py_srvsvc_NetSessCtr2_getsetters[] = {
    5575             :         {
    5576             :                 .name = discard_const_p(char, "count"),
    5577             :                 .get = py_srvsvc_NetSessCtr2_get_count,
    5578             :                 .set = py_srvsvc_NetSessCtr2_set_count,
    5579             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5580             :         },
    5581             :         {
    5582             :                 .name = discard_const_p(char, "array"),
    5583             :                 .get = py_srvsvc_NetSessCtr2_get_array,
    5584             :                 .set = py_srvsvc_NetSessCtr2_set_array,
    5585             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetSessInfo2")
    5586             :         },
    5587             :         { .name = NULL }
    5588             : };
    5589             : 
    5590           0 : static PyObject *py_srvsvc_NetSessCtr2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5591             : {
    5592           0 :         return pytalloc_new(struct srvsvc_NetSessCtr2, type);
    5593             : }
    5594             : 
    5595             : 
    5596             : static PyTypeObject srvsvc_NetSessCtr2_Type = {
    5597             :         PyVarObject_HEAD_INIT(NULL, 0)
    5598             :         .tp_name = "srvsvc.NetSessCtr2",
    5599             :         .tp_getset = py_srvsvc_NetSessCtr2_getsetters,
    5600             :         .tp_methods = NULL,
    5601             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5602             :         .tp_new = py_srvsvc_NetSessCtr2_new,
    5603             : };
    5604             : 
    5605             : 
    5606           0 : static PyObject *py_srvsvc_NetSessInfo10_get_client(PyObject *obj, void *closure)
    5607             : {
    5608           0 :         struct srvsvc_NetSessInfo10 *object = (struct srvsvc_NetSessInfo10 *)pytalloc_get_ptr(obj);
    5609             :         PyObject *py_client;
    5610           0 :         if (object->client == NULL) {
    5611           0 :                 Py_RETURN_NONE;
    5612             :         }
    5613           0 :         if (object->client == NULL) {
    5614           0 :                 py_client = Py_None;
    5615           0 :                 Py_INCREF(py_client);
    5616             :         } else {
    5617           0 :                 if (object->client == NULL) {
    5618           0 :                         py_client = Py_None;
    5619           0 :                         Py_INCREF(py_client);
    5620             :                 } else {
    5621           0 :                         py_client = PyUnicode_Decode(object->client, strlen(object->client), "utf-8", "ignore");
    5622             :                 }
    5623             :         }
    5624           0 :         return py_client;
    5625             : }
    5626             : 
    5627           0 : static int py_srvsvc_NetSessInfo10_set_client(PyObject *py_obj, PyObject *value, void *closure)
    5628             : {
    5629           0 :         struct srvsvc_NetSessInfo10 *object = (struct srvsvc_NetSessInfo10 *)pytalloc_get_ptr(py_obj);
    5630           0 :         if (value == NULL) {
    5631           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->client");
    5632           0 :                 return -1;
    5633             :         }
    5634           0 :         if (value == Py_None) {
    5635           0 :                 object->client = NULL;
    5636             :         } else {
    5637           0 :                 object->client = NULL;
    5638             :                 {
    5639             :                         const char *test_str;
    5640             :                         const char *talloc_str;
    5641           0 :                         PyObject *unicode = NULL;
    5642           0 :                         if (PyUnicode_Check(value)) {
    5643           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    5644           0 :                                 if (unicode == NULL) {
    5645           0 :                                         PyErr_NoMemory();
    5646           0 :                                         return -1;
    5647             :                                 }
    5648           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    5649           0 :                         } else if (PyBytes_Check(value)) {
    5650           0 :                                 test_str = PyBytes_AS_STRING(value);
    5651             :                         } else {
    5652           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    5653           0 :                                 return -1;
    5654             :                         }
    5655           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    5656           0 :                         if (unicode != NULL) {
    5657           0 :                                 Py_DECREF(unicode);
    5658             :                         }
    5659           0 :                         if (talloc_str == NULL) {
    5660           0 :                                 PyErr_NoMemory();
    5661           0 :                                 return -1;
    5662             :                         }
    5663           0 :                         object->client = talloc_str;
    5664             :                 }
    5665             :         }
    5666           0 :         return 0;
    5667             : }
    5668             : 
    5669           0 : static PyObject *py_srvsvc_NetSessInfo10_get_user(PyObject *obj, void *closure)
    5670             : {
    5671           0 :         struct srvsvc_NetSessInfo10 *object = (struct srvsvc_NetSessInfo10 *)pytalloc_get_ptr(obj);
    5672             :         PyObject *py_user;
    5673           0 :         if (object->user == NULL) {
    5674           0 :                 Py_RETURN_NONE;
    5675             :         }
    5676           0 :         if (object->user == NULL) {
    5677           0 :                 py_user = Py_None;
    5678           0 :                 Py_INCREF(py_user);
    5679             :         } else {
    5680           0 :                 if (object->user == NULL) {
    5681           0 :                         py_user = Py_None;
    5682           0 :                         Py_INCREF(py_user);
    5683             :                 } else {
    5684           0 :                         py_user = PyUnicode_Decode(object->user, strlen(object->user), "utf-8", "ignore");
    5685             :                 }
    5686             :         }
    5687           0 :         return py_user;
    5688             : }
    5689             : 
    5690           0 : static int py_srvsvc_NetSessInfo10_set_user(PyObject *py_obj, PyObject *value, void *closure)
    5691             : {
    5692           0 :         struct srvsvc_NetSessInfo10 *object = (struct srvsvc_NetSessInfo10 *)pytalloc_get_ptr(py_obj);
    5693           0 :         if (value == NULL) {
    5694           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user");
    5695           0 :                 return -1;
    5696             :         }
    5697           0 :         if (value == Py_None) {
    5698           0 :                 object->user = NULL;
    5699             :         } else {
    5700           0 :                 object->user = NULL;
    5701             :                 {
    5702             :                         const char *test_str;
    5703             :                         const char *talloc_str;
    5704           0 :                         PyObject *unicode = NULL;
    5705           0 :                         if (PyUnicode_Check(value)) {
    5706           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    5707           0 :                                 if (unicode == NULL) {
    5708           0 :                                         PyErr_NoMemory();
    5709           0 :                                         return -1;
    5710             :                                 }
    5711           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    5712           0 :                         } else if (PyBytes_Check(value)) {
    5713           0 :                                 test_str = PyBytes_AS_STRING(value);
    5714             :                         } else {
    5715           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    5716           0 :                                 return -1;
    5717             :                         }
    5718           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    5719           0 :                         if (unicode != NULL) {
    5720           0 :                                 Py_DECREF(unicode);
    5721             :                         }
    5722           0 :                         if (talloc_str == NULL) {
    5723           0 :                                 PyErr_NoMemory();
    5724           0 :                                 return -1;
    5725             :                         }
    5726           0 :                         object->user = talloc_str;
    5727             :                 }
    5728             :         }
    5729           0 :         return 0;
    5730             : }
    5731             : 
    5732           0 : static PyObject *py_srvsvc_NetSessInfo10_get_time(PyObject *obj, void *closure)
    5733             : {
    5734           0 :         struct srvsvc_NetSessInfo10 *object = (struct srvsvc_NetSessInfo10 *)pytalloc_get_ptr(obj);
    5735             :         PyObject *py_time;
    5736           0 :         py_time = PyLong_FromUnsignedLongLong((uint32_t)object->time);
    5737           0 :         return py_time;
    5738             : }
    5739             : 
    5740           0 : static int py_srvsvc_NetSessInfo10_set_time(PyObject *py_obj, PyObject *value, void *closure)
    5741             : {
    5742           0 :         struct srvsvc_NetSessInfo10 *object = (struct srvsvc_NetSessInfo10 *)pytalloc_get_ptr(py_obj);
    5743           0 :         if (value == NULL) {
    5744           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->time");
    5745           0 :                 return -1;
    5746             :         }
    5747             :         {
    5748           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->time));
    5749           0 :                 if (PyLong_Check(value)) {
    5750             :                         unsigned long long test_var;
    5751           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5752           0 :                         if (PyErr_Occurred() != NULL) {
    5753           0 :                                 return -1;
    5754             :                         }
    5755           0 :                         if (test_var > uint_max) {
    5756           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5757             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5758           0 :                                 return -1;
    5759             :                         }
    5760           0 :                         object->time = test_var;
    5761             :                 } else {
    5762           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5763             :                           PyLong_Type.tp_name);
    5764           0 :                         return -1;
    5765             :                 }
    5766             :         }
    5767           0 :         return 0;
    5768             : }
    5769             : 
    5770           0 : static PyObject *py_srvsvc_NetSessInfo10_get_idle_time(PyObject *obj, void *closure)
    5771             : {
    5772           0 :         struct srvsvc_NetSessInfo10 *object = (struct srvsvc_NetSessInfo10 *)pytalloc_get_ptr(obj);
    5773             :         PyObject *py_idle_time;
    5774           0 :         py_idle_time = PyLong_FromUnsignedLongLong((uint32_t)object->idle_time);
    5775           0 :         return py_idle_time;
    5776             : }
    5777             : 
    5778           0 : static int py_srvsvc_NetSessInfo10_set_idle_time(PyObject *py_obj, PyObject *value, void *closure)
    5779             : {
    5780           0 :         struct srvsvc_NetSessInfo10 *object = (struct srvsvc_NetSessInfo10 *)pytalloc_get_ptr(py_obj);
    5781           0 :         if (value == NULL) {
    5782           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->idle_time");
    5783           0 :                 return -1;
    5784             :         }
    5785             :         {
    5786           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->idle_time));
    5787           0 :                 if (PyLong_Check(value)) {
    5788             :                         unsigned long long test_var;
    5789           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5790           0 :                         if (PyErr_Occurred() != NULL) {
    5791           0 :                                 return -1;
    5792             :                         }
    5793           0 :                         if (test_var > uint_max) {
    5794           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5795             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5796           0 :                                 return -1;
    5797             :                         }
    5798           0 :                         object->idle_time = test_var;
    5799             :                 } else {
    5800           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5801             :                           PyLong_Type.tp_name);
    5802           0 :                         return -1;
    5803             :                 }
    5804             :         }
    5805           0 :         return 0;
    5806             : }
    5807             : 
    5808             : static PyGetSetDef py_srvsvc_NetSessInfo10_getsetters[] = {
    5809             :         {
    5810             :                 .name = discard_const_p(char, "client"),
    5811             :                 .get = py_srvsvc_NetSessInfo10_get_client,
    5812             :                 .set = py_srvsvc_NetSessInfo10_set_client,
    5813             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    5814             :         },
    5815             :         {
    5816             :                 .name = discard_const_p(char, "user"),
    5817             :                 .get = py_srvsvc_NetSessInfo10_get_user,
    5818             :                 .set = py_srvsvc_NetSessInfo10_set_user,
    5819             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    5820             :         },
    5821             :         {
    5822             :                 .name = discard_const_p(char, "time"),
    5823             :                 .get = py_srvsvc_NetSessInfo10_get_time,
    5824             :                 .set = py_srvsvc_NetSessInfo10_set_time,
    5825             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5826             :         },
    5827             :         {
    5828             :                 .name = discard_const_p(char, "idle_time"),
    5829             :                 .get = py_srvsvc_NetSessInfo10_get_idle_time,
    5830             :                 .set = py_srvsvc_NetSessInfo10_set_idle_time,
    5831             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5832             :         },
    5833             :         { .name = NULL }
    5834             : };
    5835             : 
    5836           0 : static PyObject *py_srvsvc_NetSessInfo10_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5837             : {
    5838           0 :         return pytalloc_new(struct srvsvc_NetSessInfo10, type);
    5839             : }
    5840             : 
    5841             : 
    5842             : static PyTypeObject srvsvc_NetSessInfo10_Type = {
    5843             :         PyVarObject_HEAD_INIT(NULL, 0)
    5844             :         .tp_name = "srvsvc.NetSessInfo10",
    5845             :         .tp_getset = py_srvsvc_NetSessInfo10_getsetters,
    5846             :         .tp_methods = NULL,
    5847             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5848             :         .tp_new = py_srvsvc_NetSessInfo10_new,
    5849             : };
    5850             : 
    5851             : 
    5852           0 : static PyObject *py_srvsvc_NetSessCtr10_get_count(PyObject *obj, void *closure)
    5853             : {
    5854           0 :         struct srvsvc_NetSessCtr10 *object = (struct srvsvc_NetSessCtr10 *)pytalloc_get_ptr(obj);
    5855             :         PyObject *py_count;
    5856           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
    5857           0 :         return py_count;
    5858             : }
    5859             : 
    5860           0 : static int py_srvsvc_NetSessCtr10_set_count(PyObject *py_obj, PyObject *value, void *closure)
    5861             : {
    5862           0 :         struct srvsvc_NetSessCtr10 *object = (struct srvsvc_NetSessCtr10 *)pytalloc_get_ptr(py_obj);
    5863           0 :         if (value == NULL) {
    5864           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
    5865           0 :                 return -1;
    5866             :         }
    5867             :         {
    5868           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    5869           0 :                 if (PyLong_Check(value)) {
    5870             :                         unsigned long long test_var;
    5871           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5872           0 :                         if (PyErr_Occurred() != NULL) {
    5873           0 :                                 return -1;
    5874             :                         }
    5875           0 :                         if (test_var > uint_max) {
    5876           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5877             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5878           0 :                                 return -1;
    5879             :                         }
    5880           0 :                         object->count = test_var;
    5881             :                 } else {
    5882           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5883             :                           PyLong_Type.tp_name);
    5884           0 :                         return -1;
    5885             :                 }
    5886             :         }
    5887           0 :         return 0;
    5888             : }
    5889             : 
    5890           0 : static PyObject *py_srvsvc_NetSessCtr10_get_array(PyObject *obj, void *closure)
    5891             : {
    5892           0 :         struct srvsvc_NetSessCtr10 *object = (struct srvsvc_NetSessCtr10 *)pytalloc_get_ptr(obj);
    5893             :         PyObject *py_array;
    5894           0 :         if (object->array == NULL) {
    5895           0 :                 Py_RETURN_NONE;
    5896             :         }
    5897           0 :         if (object->array == NULL) {
    5898           0 :                 py_array = Py_None;
    5899           0 :                 Py_INCREF(py_array);
    5900             :         } else {
    5901           0 :                 py_array = PyList_New(object->count);
    5902           0 :                 if (py_array == NULL) {
    5903           0 :                         return NULL;
    5904             :                 }
    5905             :                 {
    5906             :                         int array_cntr_1;
    5907           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    5908             :                                 PyObject *py_array_1;
    5909           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetSessInfo10_Type, object->array, &object->array[array_cntr_1]);
    5910           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    5911             :                         }
    5912             :                 }
    5913             :         }
    5914           0 :         return py_array;
    5915             : }
    5916             : 
    5917           0 : static int py_srvsvc_NetSessCtr10_set_array(PyObject *py_obj, PyObject *value, void *closure)
    5918             : {
    5919           0 :         struct srvsvc_NetSessCtr10 *object = (struct srvsvc_NetSessCtr10 *)pytalloc_get_ptr(py_obj);
    5920           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    5921           0 :         if (value == NULL) {
    5922           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
    5923           0 :                 return -1;
    5924             :         }
    5925           0 :         if (value == Py_None) {
    5926           0 :                 object->array = NULL;
    5927             :         } else {
    5928           0 :                 object->array = NULL;
    5929           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5930             :                 {
    5931             :                         int array_cntr_1;
    5932           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    5933           0 :                         if (!object->array) { return -1;; }
    5934           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    5935           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    5936           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    5937           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
    5938           0 :                                         return -1;
    5939             :                                 }
    5940           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSessInfo10_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    5941           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    5942           0 :                                         PyErr_NoMemory();
    5943           0 :                                         return -1;
    5944             :                                 }
    5945           0 :                                 object->array[array_cntr_1] = *(struct srvsvc_NetSessInfo10 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    5946             :                         }
    5947             :                 }
    5948             :         }
    5949           0 :         return 0;
    5950             : }
    5951             : 
    5952             : static PyGetSetDef py_srvsvc_NetSessCtr10_getsetters[] = {
    5953             :         {
    5954             :                 .name = discard_const_p(char, "count"),
    5955             :                 .get = py_srvsvc_NetSessCtr10_get_count,
    5956             :                 .set = py_srvsvc_NetSessCtr10_set_count,
    5957             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5958             :         },
    5959             :         {
    5960             :                 .name = discard_const_p(char, "array"),
    5961             :                 .get = py_srvsvc_NetSessCtr10_get_array,
    5962             :                 .set = py_srvsvc_NetSessCtr10_set_array,
    5963             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetSessInfo10")
    5964             :         },
    5965             :         { .name = NULL }
    5966             : };
    5967             : 
    5968           0 : static PyObject *py_srvsvc_NetSessCtr10_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5969             : {
    5970           0 :         return pytalloc_new(struct srvsvc_NetSessCtr10, type);
    5971             : }
    5972             : 
    5973             : 
    5974             : static PyTypeObject srvsvc_NetSessCtr10_Type = {
    5975             :         PyVarObject_HEAD_INIT(NULL, 0)
    5976             :         .tp_name = "srvsvc.NetSessCtr10",
    5977             :         .tp_getset = py_srvsvc_NetSessCtr10_getsetters,
    5978             :         .tp_methods = NULL,
    5979             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5980             :         .tp_new = py_srvsvc_NetSessCtr10_new,
    5981             : };
    5982             : 
    5983             : 
    5984           0 : static PyObject *py_srvsvc_NetSessInfo502_get_client(PyObject *obj, void *closure)
    5985             : {
    5986           0 :         struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(obj);
    5987             :         PyObject *py_client;
    5988           0 :         if (object->client == NULL) {
    5989           0 :                 Py_RETURN_NONE;
    5990             :         }
    5991           0 :         if (object->client == NULL) {
    5992           0 :                 py_client = Py_None;
    5993           0 :                 Py_INCREF(py_client);
    5994             :         } else {
    5995           0 :                 if (object->client == NULL) {
    5996           0 :                         py_client = Py_None;
    5997           0 :                         Py_INCREF(py_client);
    5998             :                 } else {
    5999           0 :                         py_client = PyUnicode_Decode(object->client, strlen(object->client), "utf-8", "ignore");
    6000             :                 }
    6001             :         }
    6002           0 :         return py_client;
    6003             : }
    6004             : 
    6005           0 : static int py_srvsvc_NetSessInfo502_set_client(PyObject *py_obj, PyObject *value, void *closure)
    6006             : {
    6007           0 :         struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(py_obj);
    6008           0 :         if (value == NULL) {
    6009           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->client");
    6010           0 :                 return -1;
    6011             :         }
    6012           0 :         if (value == Py_None) {
    6013           0 :                 object->client = NULL;
    6014             :         } else {
    6015           0 :                 object->client = NULL;
    6016             :                 {
    6017             :                         const char *test_str;
    6018             :                         const char *talloc_str;
    6019           0 :                         PyObject *unicode = NULL;
    6020           0 :                         if (PyUnicode_Check(value)) {
    6021           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    6022           0 :                                 if (unicode == NULL) {
    6023           0 :                                         PyErr_NoMemory();
    6024           0 :                                         return -1;
    6025             :                                 }
    6026           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    6027           0 :                         } else if (PyBytes_Check(value)) {
    6028           0 :                                 test_str = PyBytes_AS_STRING(value);
    6029             :                         } else {
    6030           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    6031           0 :                                 return -1;
    6032             :                         }
    6033           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    6034           0 :                         if (unicode != NULL) {
    6035           0 :                                 Py_DECREF(unicode);
    6036             :                         }
    6037           0 :                         if (talloc_str == NULL) {
    6038           0 :                                 PyErr_NoMemory();
    6039           0 :                                 return -1;
    6040             :                         }
    6041           0 :                         object->client = talloc_str;
    6042             :                 }
    6043             :         }
    6044           0 :         return 0;
    6045             : }
    6046             : 
    6047           0 : static PyObject *py_srvsvc_NetSessInfo502_get_user(PyObject *obj, void *closure)
    6048             : {
    6049           0 :         struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(obj);
    6050             :         PyObject *py_user;
    6051           0 :         if (object->user == NULL) {
    6052           0 :                 Py_RETURN_NONE;
    6053             :         }
    6054           0 :         if (object->user == NULL) {
    6055           0 :                 py_user = Py_None;
    6056           0 :                 Py_INCREF(py_user);
    6057             :         } else {
    6058           0 :                 if (object->user == NULL) {
    6059           0 :                         py_user = Py_None;
    6060           0 :                         Py_INCREF(py_user);
    6061             :                 } else {
    6062           0 :                         py_user = PyUnicode_Decode(object->user, strlen(object->user), "utf-8", "ignore");
    6063             :                 }
    6064             :         }
    6065           0 :         return py_user;
    6066             : }
    6067             : 
    6068           0 : static int py_srvsvc_NetSessInfo502_set_user(PyObject *py_obj, PyObject *value, void *closure)
    6069             : {
    6070           0 :         struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(py_obj);
    6071           0 :         if (value == NULL) {
    6072           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user");
    6073           0 :                 return -1;
    6074             :         }
    6075           0 :         if (value == Py_None) {
    6076           0 :                 object->user = NULL;
    6077             :         } else {
    6078           0 :                 object->user = NULL;
    6079             :                 {
    6080             :                         const char *test_str;
    6081             :                         const char *talloc_str;
    6082           0 :                         PyObject *unicode = NULL;
    6083           0 :                         if (PyUnicode_Check(value)) {
    6084           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    6085           0 :                                 if (unicode == NULL) {
    6086           0 :                                         PyErr_NoMemory();
    6087           0 :                                         return -1;
    6088             :                                 }
    6089           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    6090           0 :                         } else if (PyBytes_Check(value)) {
    6091           0 :                                 test_str = PyBytes_AS_STRING(value);
    6092             :                         } else {
    6093           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    6094           0 :                                 return -1;
    6095             :                         }
    6096           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    6097           0 :                         if (unicode != NULL) {
    6098           0 :                                 Py_DECREF(unicode);
    6099             :                         }
    6100           0 :                         if (talloc_str == NULL) {
    6101           0 :                                 PyErr_NoMemory();
    6102           0 :                                 return -1;
    6103             :                         }
    6104           0 :                         object->user = talloc_str;
    6105             :                 }
    6106             :         }
    6107           0 :         return 0;
    6108             : }
    6109             : 
    6110           0 : static PyObject *py_srvsvc_NetSessInfo502_get_num_open(PyObject *obj, void *closure)
    6111             : {
    6112           0 :         struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(obj);
    6113             :         PyObject *py_num_open;
    6114           0 :         py_num_open = PyLong_FromUnsignedLongLong((uint32_t)object->num_open);
    6115           0 :         return py_num_open;
    6116             : }
    6117             : 
    6118           0 : static int py_srvsvc_NetSessInfo502_set_num_open(PyObject *py_obj, PyObject *value, void *closure)
    6119             : {
    6120           0 :         struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(py_obj);
    6121           0 :         if (value == NULL) {
    6122           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_open");
    6123           0 :                 return -1;
    6124             :         }
    6125             :         {
    6126           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_open));
    6127           0 :                 if (PyLong_Check(value)) {
    6128             :                         unsigned long long test_var;
    6129           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6130           0 :                         if (PyErr_Occurred() != NULL) {
    6131           0 :                                 return -1;
    6132             :                         }
    6133           0 :                         if (test_var > uint_max) {
    6134           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6135             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6136           0 :                                 return -1;
    6137             :                         }
    6138           0 :                         object->num_open = test_var;
    6139             :                 } else {
    6140           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6141             :                           PyLong_Type.tp_name);
    6142           0 :                         return -1;
    6143             :                 }
    6144             :         }
    6145           0 :         return 0;
    6146             : }
    6147             : 
    6148           0 : static PyObject *py_srvsvc_NetSessInfo502_get_time(PyObject *obj, void *closure)
    6149             : {
    6150           0 :         struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(obj);
    6151             :         PyObject *py_time;
    6152           0 :         py_time = PyLong_FromUnsignedLongLong((uint32_t)object->time);
    6153           0 :         return py_time;
    6154             : }
    6155             : 
    6156           0 : static int py_srvsvc_NetSessInfo502_set_time(PyObject *py_obj, PyObject *value, void *closure)
    6157             : {
    6158           0 :         struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(py_obj);
    6159           0 :         if (value == NULL) {
    6160           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->time");
    6161           0 :                 return -1;
    6162             :         }
    6163             :         {
    6164           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->time));
    6165           0 :                 if (PyLong_Check(value)) {
    6166             :                         unsigned long long test_var;
    6167           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6168           0 :                         if (PyErr_Occurred() != NULL) {
    6169           0 :                                 return -1;
    6170             :                         }
    6171           0 :                         if (test_var > uint_max) {
    6172           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6173             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6174           0 :                                 return -1;
    6175             :                         }
    6176           0 :                         object->time = test_var;
    6177             :                 } else {
    6178           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6179             :                           PyLong_Type.tp_name);
    6180           0 :                         return -1;
    6181             :                 }
    6182             :         }
    6183           0 :         return 0;
    6184             : }
    6185             : 
    6186           0 : static PyObject *py_srvsvc_NetSessInfo502_get_idle_time(PyObject *obj, void *closure)
    6187             : {
    6188           0 :         struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(obj);
    6189             :         PyObject *py_idle_time;
    6190           0 :         py_idle_time = PyLong_FromUnsignedLongLong((uint32_t)object->idle_time);
    6191           0 :         return py_idle_time;
    6192             : }
    6193             : 
    6194           0 : static int py_srvsvc_NetSessInfo502_set_idle_time(PyObject *py_obj, PyObject *value, void *closure)
    6195             : {
    6196           0 :         struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(py_obj);
    6197           0 :         if (value == NULL) {
    6198           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->idle_time");
    6199           0 :                 return -1;
    6200             :         }
    6201             :         {
    6202           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->idle_time));
    6203           0 :                 if (PyLong_Check(value)) {
    6204             :                         unsigned long long test_var;
    6205           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6206           0 :                         if (PyErr_Occurred() != NULL) {
    6207           0 :                                 return -1;
    6208             :                         }
    6209           0 :                         if (test_var > uint_max) {
    6210           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6211             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6212           0 :                                 return -1;
    6213             :                         }
    6214           0 :                         object->idle_time = test_var;
    6215             :                 } else {
    6216           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6217             :                           PyLong_Type.tp_name);
    6218           0 :                         return -1;
    6219             :                 }
    6220             :         }
    6221           0 :         return 0;
    6222             : }
    6223             : 
    6224           0 : static PyObject *py_srvsvc_NetSessInfo502_get_user_flags(PyObject *obj, void *closure)
    6225             : {
    6226           0 :         struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(obj);
    6227             :         PyObject *py_user_flags;
    6228           0 :         py_user_flags = PyLong_FromUnsignedLongLong((uint32_t)object->user_flags);
    6229           0 :         return py_user_flags;
    6230             : }
    6231             : 
    6232           0 : static int py_srvsvc_NetSessInfo502_set_user_flags(PyObject *py_obj, PyObject *value, void *closure)
    6233             : {
    6234           0 :         struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(py_obj);
    6235           0 :         if (value == NULL) {
    6236           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user_flags");
    6237           0 :                 return -1;
    6238             :         }
    6239             :         {
    6240           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->user_flags));
    6241           0 :                 if (PyLong_Check(value)) {
    6242             :                         unsigned long long test_var;
    6243           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6244           0 :                         if (PyErr_Occurred() != NULL) {
    6245           0 :                                 return -1;
    6246             :                         }
    6247           0 :                         if (test_var > uint_max) {
    6248           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6249             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6250           0 :                                 return -1;
    6251             :                         }
    6252           0 :                         object->user_flags = test_var;
    6253             :                 } else {
    6254           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6255             :                           PyLong_Type.tp_name);
    6256           0 :                         return -1;
    6257             :                 }
    6258             :         }
    6259           0 :         return 0;
    6260             : }
    6261             : 
    6262           0 : static PyObject *py_srvsvc_NetSessInfo502_get_client_type(PyObject *obj, void *closure)
    6263             : {
    6264           0 :         struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(obj);
    6265             :         PyObject *py_client_type;
    6266           0 :         if (object->client_type == NULL) {
    6267           0 :                 Py_RETURN_NONE;
    6268             :         }
    6269           0 :         if (object->client_type == NULL) {
    6270           0 :                 py_client_type = Py_None;
    6271           0 :                 Py_INCREF(py_client_type);
    6272             :         } else {
    6273           0 :                 if (object->client_type == NULL) {
    6274           0 :                         py_client_type = Py_None;
    6275           0 :                         Py_INCREF(py_client_type);
    6276             :                 } else {
    6277           0 :                         py_client_type = PyUnicode_Decode(object->client_type, strlen(object->client_type), "utf-8", "ignore");
    6278             :                 }
    6279             :         }
    6280           0 :         return py_client_type;
    6281             : }
    6282             : 
    6283           0 : static int py_srvsvc_NetSessInfo502_set_client_type(PyObject *py_obj, PyObject *value, void *closure)
    6284             : {
    6285           0 :         struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(py_obj);
    6286           0 :         if (value == NULL) {
    6287           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->client_type");
    6288           0 :                 return -1;
    6289             :         }
    6290           0 :         if (value == Py_None) {
    6291           0 :                 object->client_type = NULL;
    6292             :         } else {
    6293           0 :                 object->client_type = NULL;
    6294             :                 {
    6295             :                         const char *test_str;
    6296             :                         const char *talloc_str;
    6297           0 :                         PyObject *unicode = NULL;
    6298           0 :                         if (PyUnicode_Check(value)) {
    6299           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    6300           0 :                                 if (unicode == NULL) {
    6301           0 :                                         PyErr_NoMemory();
    6302           0 :                                         return -1;
    6303             :                                 }
    6304           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    6305           0 :                         } else if (PyBytes_Check(value)) {
    6306           0 :                                 test_str = PyBytes_AS_STRING(value);
    6307             :                         } else {
    6308           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    6309           0 :                                 return -1;
    6310             :                         }
    6311           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    6312           0 :                         if (unicode != NULL) {
    6313           0 :                                 Py_DECREF(unicode);
    6314             :                         }
    6315           0 :                         if (talloc_str == NULL) {
    6316           0 :                                 PyErr_NoMemory();
    6317           0 :                                 return -1;
    6318             :                         }
    6319           0 :                         object->client_type = talloc_str;
    6320             :                 }
    6321             :         }
    6322           0 :         return 0;
    6323             : }
    6324             : 
    6325           0 : static PyObject *py_srvsvc_NetSessInfo502_get_transport(PyObject *obj, void *closure)
    6326             : {
    6327           0 :         struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(obj);
    6328             :         PyObject *py_transport;
    6329           0 :         if (object->transport == NULL) {
    6330           0 :                 Py_RETURN_NONE;
    6331             :         }
    6332           0 :         if (object->transport == NULL) {
    6333           0 :                 py_transport = Py_None;
    6334           0 :                 Py_INCREF(py_transport);
    6335             :         } else {
    6336           0 :                 if (object->transport == NULL) {
    6337           0 :                         py_transport = Py_None;
    6338           0 :                         Py_INCREF(py_transport);
    6339             :                 } else {
    6340           0 :                         py_transport = PyUnicode_Decode(object->transport, strlen(object->transport), "utf-8", "ignore");
    6341             :                 }
    6342             :         }
    6343           0 :         return py_transport;
    6344             : }
    6345             : 
    6346           0 : static int py_srvsvc_NetSessInfo502_set_transport(PyObject *py_obj, PyObject *value, void *closure)
    6347             : {
    6348           0 :         struct srvsvc_NetSessInfo502 *object = (struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(py_obj);
    6349           0 :         if (value == NULL) {
    6350           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->transport");
    6351           0 :                 return -1;
    6352             :         }
    6353           0 :         if (value == Py_None) {
    6354           0 :                 object->transport = NULL;
    6355             :         } else {
    6356           0 :                 object->transport = NULL;
    6357             :                 {
    6358             :                         const char *test_str;
    6359             :                         const char *talloc_str;
    6360           0 :                         PyObject *unicode = NULL;
    6361           0 :                         if (PyUnicode_Check(value)) {
    6362           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    6363           0 :                                 if (unicode == NULL) {
    6364           0 :                                         PyErr_NoMemory();
    6365           0 :                                         return -1;
    6366             :                                 }
    6367           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    6368           0 :                         } else if (PyBytes_Check(value)) {
    6369           0 :                                 test_str = PyBytes_AS_STRING(value);
    6370             :                         } else {
    6371           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    6372           0 :                                 return -1;
    6373             :                         }
    6374           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    6375           0 :                         if (unicode != NULL) {
    6376           0 :                                 Py_DECREF(unicode);
    6377             :                         }
    6378           0 :                         if (talloc_str == NULL) {
    6379           0 :                                 PyErr_NoMemory();
    6380           0 :                                 return -1;
    6381             :                         }
    6382           0 :                         object->transport = talloc_str;
    6383             :                 }
    6384             :         }
    6385           0 :         return 0;
    6386             : }
    6387             : 
    6388             : static PyGetSetDef py_srvsvc_NetSessInfo502_getsetters[] = {
    6389             :         {
    6390             :                 .name = discard_const_p(char, "client"),
    6391             :                 .get = py_srvsvc_NetSessInfo502_get_client,
    6392             :                 .set = py_srvsvc_NetSessInfo502_set_client,
    6393             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    6394             :         },
    6395             :         {
    6396             :                 .name = discard_const_p(char, "user"),
    6397             :                 .get = py_srvsvc_NetSessInfo502_get_user,
    6398             :                 .set = py_srvsvc_NetSessInfo502_set_user,
    6399             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    6400             :         },
    6401             :         {
    6402             :                 .name = discard_const_p(char, "num_open"),
    6403             :                 .get = py_srvsvc_NetSessInfo502_get_num_open,
    6404             :                 .set = py_srvsvc_NetSessInfo502_set_num_open,
    6405             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6406             :         },
    6407             :         {
    6408             :                 .name = discard_const_p(char, "time"),
    6409             :                 .get = py_srvsvc_NetSessInfo502_get_time,
    6410             :                 .set = py_srvsvc_NetSessInfo502_set_time,
    6411             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6412             :         },
    6413             :         {
    6414             :                 .name = discard_const_p(char, "idle_time"),
    6415             :                 .get = py_srvsvc_NetSessInfo502_get_idle_time,
    6416             :                 .set = py_srvsvc_NetSessInfo502_set_idle_time,
    6417             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6418             :         },
    6419             :         {
    6420             :                 .name = discard_const_p(char, "user_flags"),
    6421             :                 .get = py_srvsvc_NetSessInfo502_get_user_flags,
    6422             :                 .set = py_srvsvc_NetSessInfo502_set_user_flags,
    6423             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6424             :         },
    6425             :         {
    6426             :                 .name = discard_const_p(char, "client_type"),
    6427             :                 .get = py_srvsvc_NetSessInfo502_get_client_type,
    6428             :                 .set = py_srvsvc_NetSessInfo502_set_client_type,
    6429             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    6430             :         },
    6431             :         {
    6432             :                 .name = discard_const_p(char, "transport"),
    6433             :                 .get = py_srvsvc_NetSessInfo502_get_transport,
    6434             :                 .set = py_srvsvc_NetSessInfo502_set_transport,
    6435             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    6436             :         },
    6437             :         { .name = NULL }
    6438             : };
    6439             : 
    6440           0 : static PyObject *py_srvsvc_NetSessInfo502_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6441             : {
    6442           0 :         return pytalloc_new(struct srvsvc_NetSessInfo502, type);
    6443             : }
    6444             : 
    6445             : 
    6446             : static PyTypeObject srvsvc_NetSessInfo502_Type = {
    6447             :         PyVarObject_HEAD_INIT(NULL, 0)
    6448             :         .tp_name = "srvsvc.NetSessInfo502",
    6449             :         .tp_getset = py_srvsvc_NetSessInfo502_getsetters,
    6450             :         .tp_methods = NULL,
    6451             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6452             :         .tp_new = py_srvsvc_NetSessInfo502_new,
    6453             : };
    6454             : 
    6455             : 
    6456           0 : static PyObject *py_srvsvc_NetSessCtr502_get_count(PyObject *obj, void *closure)
    6457             : {
    6458           0 :         struct srvsvc_NetSessCtr502 *object = (struct srvsvc_NetSessCtr502 *)pytalloc_get_ptr(obj);
    6459             :         PyObject *py_count;
    6460           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
    6461           0 :         return py_count;
    6462             : }
    6463             : 
    6464           0 : static int py_srvsvc_NetSessCtr502_set_count(PyObject *py_obj, PyObject *value, void *closure)
    6465             : {
    6466           0 :         struct srvsvc_NetSessCtr502 *object = (struct srvsvc_NetSessCtr502 *)pytalloc_get_ptr(py_obj);
    6467           0 :         if (value == NULL) {
    6468           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
    6469           0 :                 return -1;
    6470             :         }
    6471             :         {
    6472           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    6473           0 :                 if (PyLong_Check(value)) {
    6474             :                         unsigned long long test_var;
    6475           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6476           0 :                         if (PyErr_Occurred() != NULL) {
    6477           0 :                                 return -1;
    6478             :                         }
    6479           0 :                         if (test_var > uint_max) {
    6480           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6481             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6482           0 :                                 return -1;
    6483             :                         }
    6484           0 :                         object->count = test_var;
    6485             :                 } else {
    6486           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6487             :                           PyLong_Type.tp_name);
    6488           0 :                         return -1;
    6489             :                 }
    6490             :         }
    6491           0 :         return 0;
    6492             : }
    6493             : 
    6494           0 : static PyObject *py_srvsvc_NetSessCtr502_get_array(PyObject *obj, void *closure)
    6495             : {
    6496           0 :         struct srvsvc_NetSessCtr502 *object = (struct srvsvc_NetSessCtr502 *)pytalloc_get_ptr(obj);
    6497             :         PyObject *py_array;
    6498           0 :         if (object->array == NULL) {
    6499           0 :                 Py_RETURN_NONE;
    6500             :         }
    6501           0 :         if (object->array == NULL) {
    6502           0 :                 py_array = Py_None;
    6503           0 :                 Py_INCREF(py_array);
    6504             :         } else {
    6505           0 :                 py_array = PyList_New(object->count);
    6506           0 :                 if (py_array == NULL) {
    6507           0 :                         return NULL;
    6508             :                 }
    6509             :                 {
    6510             :                         int array_cntr_1;
    6511           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    6512             :                                 PyObject *py_array_1;
    6513           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetSessInfo502_Type, object->array, &object->array[array_cntr_1]);
    6514           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    6515             :                         }
    6516             :                 }
    6517             :         }
    6518           0 :         return py_array;
    6519             : }
    6520             : 
    6521           0 : static int py_srvsvc_NetSessCtr502_set_array(PyObject *py_obj, PyObject *value, void *closure)
    6522             : {
    6523           0 :         struct srvsvc_NetSessCtr502 *object = (struct srvsvc_NetSessCtr502 *)pytalloc_get_ptr(py_obj);
    6524           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    6525           0 :         if (value == NULL) {
    6526           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
    6527           0 :                 return -1;
    6528             :         }
    6529           0 :         if (value == Py_None) {
    6530           0 :                 object->array = NULL;
    6531             :         } else {
    6532           0 :                 object->array = NULL;
    6533           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    6534             :                 {
    6535             :                         int array_cntr_1;
    6536           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    6537           0 :                         if (!object->array) { return -1;; }
    6538           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    6539           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    6540           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    6541           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
    6542           0 :                                         return -1;
    6543             :                                 }
    6544           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSessInfo502_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    6545           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    6546           0 :                                         PyErr_NoMemory();
    6547           0 :                                         return -1;
    6548             :                                 }
    6549           0 :                                 object->array[array_cntr_1] = *(struct srvsvc_NetSessInfo502 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    6550             :                         }
    6551             :                 }
    6552             :         }
    6553           0 :         return 0;
    6554             : }
    6555             : 
    6556             : static PyGetSetDef py_srvsvc_NetSessCtr502_getsetters[] = {
    6557             :         {
    6558             :                 .name = discard_const_p(char, "count"),
    6559             :                 .get = py_srvsvc_NetSessCtr502_get_count,
    6560             :                 .set = py_srvsvc_NetSessCtr502_set_count,
    6561             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6562             :         },
    6563             :         {
    6564             :                 .name = discard_const_p(char, "array"),
    6565             :                 .get = py_srvsvc_NetSessCtr502_get_array,
    6566             :                 .set = py_srvsvc_NetSessCtr502_set_array,
    6567             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetSessInfo502")
    6568             :         },
    6569             :         { .name = NULL }
    6570             : };
    6571             : 
    6572           0 : static PyObject *py_srvsvc_NetSessCtr502_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6573             : {
    6574           0 :         return pytalloc_new(struct srvsvc_NetSessCtr502, type);
    6575             : }
    6576             : 
    6577             : 
    6578             : static PyTypeObject srvsvc_NetSessCtr502_Type = {
    6579             :         PyVarObject_HEAD_INIT(NULL, 0)
    6580             :         .tp_name = "srvsvc.NetSessCtr502",
    6581             :         .tp_getset = py_srvsvc_NetSessCtr502_getsetters,
    6582             :         .tp_methods = NULL,
    6583             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6584             :         .tp_new = py_srvsvc_NetSessCtr502_new,
    6585             : };
    6586             : 
    6587           0 : static PyObject *py_import_srvsvc_NetSessCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetSessCtr *in)
    6588             : {
    6589             :         PyObject *ret;
    6590             : 
    6591           0 :         switch (level) {
    6592           0 :                 case 0:
    6593           0 :                         if (in->ctr0 == NULL) {
    6594           0 :                                 ret = Py_None;
    6595           0 :                                 Py_INCREF(ret);
    6596             :                         } else {
    6597           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSessCtr0_Type, in->ctr0, in->ctr0);
    6598             :                         }
    6599           0 :                         return ret;
    6600             : 
    6601           0 :                 case 1:
    6602           0 :                         if (in->ctr1 == NULL) {
    6603           0 :                                 ret = Py_None;
    6604           0 :                                 Py_INCREF(ret);
    6605             :                         } else {
    6606           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSessCtr1_Type, in->ctr1, in->ctr1);
    6607             :                         }
    6608           0 :                         return ret;
    6609             : 
    6610           0 :                 case 2:
    6611           0 :                         if (in->ctr2 == NULL) {
    6612           0 :                                 ret = Py_None;
    6613           0 :                                 Py_INCREF(ret);
    6614             :                         } else {
    6615           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSessCtr2_Type, in->ctr2, in->ctr2);
    6616             :                         }
    6617           0 :                         return ret;
    6618             : 
    6619           0 :                 case 10:
    6620           0 :                         if (in->ctr10 == NULL) {
    6621           0 :                                 ret = Py_None;
    6622           0 :                                 Py_INCREF(ret);
    6623             :                         } else {
    6624           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSessCtr10_Type, in->ctr10, in->ctr10);
    6625             :                         }
    6626           0 :                         return ret;
    6627             : 
    6628           0 :                 case 502:
    6629           0 :                         if (in->ctr502 == NULL) {
    6630           0 :                                 ret = Py_None;
    6631           0 :                                 Py_INCREF(ret);
    6632             :                         } else {
    6633           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSessCtr502_Type, in->ctr502, in->ctr502);
    6634             :                         }
    6635           0 :                         return ret;
    6636             : 
    6637           0 :                 default:
    6638           0 :                         ret = Py_None;
    6639           0 :                         Py_INCREF(ret);
    6640           0 :                         return ret;
    6641             : 
    6642             :         }
    6643             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    6644             :         return NULL;
    6645             : }
    6646             : 
    6647           0 : static union srvsvc_NetSessCtr *py_export_srvsvc_NetSessCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    6648             : {
    6649           0 :         union srvsvc_NetSessCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetSessCtr);
    6650           0 :         switch (level) {
    6651           0 :                 case 0:
    6652           0 :                         if (in == NULL) {
    6653           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr0");
    6654           0 :                                 talloc_free(ret); return NULL;
    6655             :                         }
    6656           0 :                         if (in == Py_None) {
    6657           0 :                                 ret->ctr0 = NULL;
    6658             :                         } else {
    6659           0 :                                 ret->ctr0 = NULL;
    6660           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSessCtr0_Type, in, talloc_free(ret); return NULL;);
    6661           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    6662           0 :                                         PyErr_NoMemory();
    6663           0 :                                         talloc_free(ret); return NULL;
    6664             :                                 }
    6665           0 :                                 ret->ctr0 = (struct srvsvc_NetSessCtr0 *)pytalloc_get_ptr(in);
    6666             :                         }
    6667           0 :                         break;
    6668             : 
    6669           0 :                 case 1:
    6670           0 :                         if (in == NULL) {
    6671           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
    6672           0 :                                 talloc_free(ret); return NULL;
    6673             :                         }
    6674           0 :                         if (in == Py_None) {
    6675           0 :                                 ret->ctr1 = NULL;
    6676             :                         } else {
    6677           0 :                                 ret->ctr1 = NULL;
    6678           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSessCtr1_Type, in, talloc_free(ret); return NULL;);
    6679           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    6680           0 :                                         PyErr_NoMemory();
    6681           0 :                                         talloc_free(ret); return NULL;
    6682             :                                 }
    6683           0 :                                 ret->ctr1 = (struct srvsvc_NetSessCtr1 *)pytalloc_get_ptr(in);
    6684             :                         }
    6685           0 :                         break;
    6686             : 
    6687           0 :                 case 2:
    6688           0 :                         if (in == NULL) {
    6689           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr2");
    6690           0 :                                 talloc_free(ret); return NULL;
    6691             :                         }
    6692           0 :                         if (in == Py_None) {
    6693           0 :                                 ret->ctr2 = NULL;
    6694             :                         } else {
    6695           0 :                                 ret->ctr2 = NULL;
    6696           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSessCtr2_Type, in, talloc_free(ret); return NULL;);
    6697           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    6698           0 :                                         PyErr_NoMemory();
    6699           0 :                                         talloc_free(ret); return NULL;
    6700             :                                 }
    6701           0 :                                 ret->ctr2 = (struct srvsvc_NetSessCtr2 *)pytalloc_get_ptr(in);
    6702             :                         }
    6703           0 :                         break;
    6704             : 
    6705           0 :                 case 10:
    6706           0 :                         if (in == NULL) {
    6707           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr10");
    6708           0 :                                 talloc_free(ret); return NULL;
    6709             :                         }
    6710           0 :                         if (in == Py_None) {
    6711           0 :                                 ret->ctr10 = NULL;
    6712             :                         } else {
    6713           0 :                                 ret->ctr10 = NULL;
    6714           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSessCtr10_Type, in, talloc_free(ret); return NULL;);
    6715           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    6716           0 :                                         PyErr_NoMemory();
    6717           0 :                                         talloc_free(ret); return NULL;
    6718             :                                 }
    6719           0 :                                 ret->ctr10 = (struct srvsvc_NetSessCtr10 *)pytalloc_get_ptr(in);
    6720             :                         }
    6721           0 :                         break;
    6722             : 
    6723           0 :                 case 502:
    6724           0 :                         if (in == NULL) {
    6725           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr502");
    6726           0 :                                 talloc_free(ret); return NULL;
    6727             :                         }
    6728           0 :                         if (in == Py_None) {
    6729           0 :                                 ret->ctr502 = NULL;
    6730             :                         } else {
    6731           0 :                                 ret->ctr502 = NULL;
    6732           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSessCtr502_Type, in, talloc_free(ret); return NULL;);
    6733           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    6734           0 :                                         PyErr_NoMemory();
    6735           0 :                                         talloc_free(ret); return NULL;
    6736             :                                 }
    6737           0 :                                 ret->ctr502 = (struct srvsvc_NetSessCtr502 *)pytalloc_get_ptr(in);
    6738             :                         }
    6739           0 :                         break;
    6740             : 
    6741           0 :                 default:
    6742           0 :                         break;
    6743             : 
    6744             :         }
    6745             : 
    6746           0 :         return ret;
    6747             : }
    6748             : 
    6749           0 : static PyObject *py_srvsvc_NetSessCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6750             : {
    6751           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    6752           0 :         PyObject *mem_ctx_obj = NULL;
    6753           0 :         TALLOC_CTX *mem_ctx = NULL;
    6754           0 :         int level = 0;
    6755           0 :         PyObject *in_obj = NULL;
    6756           0 :         union srvsvc_NetSessCtr *in = NULL;
    6757             : 
    6758           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    6759             :                 discard_const_p(char *, kwnames),
    6760             :                 &mem_ctx_obj,
    6761             :                 &level,
    6762             :                 &in_obj)) {
    6763           0 :                 return NULL;
    6764             :         }
    6765           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    6766           0 :         if (mem_ctx == NULL) {
    6767           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    6768           0 :                 return NULL;
    6769             :         }
    6770           0 :         in = (union srvsvc_NetSessCtr *)pytalloc_get_ptr(in_obj);
    6771           0 :         if (in == NULL) {
    6772           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union srvsvc_NetSessCtr!");
    6773           0 :                 return NULL;
    6774             :         }
    6775             : 
    6776           0 :         return py_import_srvsvc_NetSessCtr(mem_ctx, level, in);
    6777             : }
    6778             : 
    6779           0 : static PyObject *py_srvsvc_NetSessCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6780             : {
    6781           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    6782           0 :         PyObject *mem_ctx_obj = NULL;
    6783           0 :         TALLOC_CTX *mem_ctx = NULL;
    6784           0 :         int level = 0;
    6785           0 :         PyObject *in = NULL;
    6786           0 :         union srvsvc_NetSessCtr *out = NULL;
    6787             : 
    6788           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    6789             :                 discard_const_p(char *, kwnames),
    6790             :                 &mem_ctx_obj,
    6791             :                 &level,
    6792             :                 &in)) {
    6793           0 :                 return NULL;
    6794             :         }
    6795           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    6796           0 :         if (mem_ctx == NULL) {
    6797           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    6798           0 :                 return NULL;
    6799             :         }
    6800             : 
    6801           0 :         out = py_export_srvsvc_NetSessCtr(mem_ctx, level, in);
    6802           0 :         if (out == NULL) {
    6803           0 :                 return NULL;
    6804             :         }
    6805             : 
    6806           0 :         return pytalloc_GenericObject_reference(out);
    6807             : }
    6808             : 
    6809             : static PyMethodDef py_srvsvc_NetSessCtr_methods[] = {
    6810             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSessCtr_import),
    6811             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    6812             :                 "T.__import__(mem_ctx, level, in) => ret." },
    6813             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSessCtr_export),
    6814             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    6815             :                 "T.__export__(mem_ctx, level, in) => ret." },
    6816             :         { NULL, NULL, 0, NULL }
    6817             : };
    6818             : 
    6819           0 : static PyObject *py_srvsvc_NetSessCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6820             : {
    6821           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    6822           0 :         return NULL;
    6823             : }
    6824             : 
    6825             : 
    6826             : static PyTypeObject srvsvc_NetSessCtr_Type = {
    6827             :         PyVarObject_HEAD_INIT(NULL, 0)
    6828             :         .tp_name = "srvsvc.NetSessCtr",
    6829             :         .tp_getset = NULL,
    6830             :         .tp_methods = py_srvsvc_NetSessCtr_methods,
    6831             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6832             :         .tp_new = py_srvsvc_NetSessCtr_new,
    6833             : };
    6834             : 
    6835             : 
    6836           0 : static PyObject *py_srvsvc_NetSessInfoCtr_get_level(PyObject *obj, void *closure)
    6837             : {
    6838           0 :         struct srvsvc_NetSessInfoCtr *object = (struct srvsvc_NetSessInfoCtr *)pytalloc_get_ptr(obj);
    6839             :         PyObject *py_level;
    6840           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->level);
    6841           0 :         return py_level;
    6842             : }
    6843             : 
    6844           0 : static int py_srvsvc_NetSessInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
    6845             : {
    6846           0 :         struct srvsvc_NetSessInfoCtr *object = (struct srvsvc_NetSessInfoCtr *)pytalloc_get_ptr(py_obj);
    6847           0 :         if (value == NULL) {
    6848           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->level");
    6849           0 :                 return -1;
    6850             :         }
    6851             :         {
    6852           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
    6853           0 :                 if (PyLong_Check(value)) {
    6854             :                         unsigned long long test_var;
    6855           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6856           0 :                         if (PyErr_Occurred() != NULL) {
    6857           0 :                                 return -1;
    6858             :                         }
    6859           0 :                         if (test_var > uint_max) {
    6860           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6861             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6862           0 :                                 return -1;
    6863             :                         }
    6864           0 :                         object->level = test_var;
    6865             :                 } else {
    6866           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6867             :                           PyLong_Type.tp_name);
    6868           0 :                         return -1;
    6869             :                 }
    6870             :         }
    6871           0 :         return 0;
    6872             : }
    6873             : 
    6874           0 : static PyObject *py_srvsvc_NetSessInfoCtr_get_ctr(PyObject *obj, void *closure)
    6875             : {
    6876           0 :         struct srvsvc_NetSessInfoCtr *object = (struct srvsvc_NetSessInfoCtr *)pytalloc_get_ptr(obj);
    6877             :         PyObject *py_ctr;
    6878           0 :         py_ctr = pyrpc_import_union(&srvsvc_NetSessCtr_Type, pytalloc_get_mem_ctx(obj), object->level, &object->ctr, "union srvsvc_NetSessCtr");
    6879           0 :         if (py_ctr == NULL) {
    6880           0 :                 return NULL;
    6881             :         }
    6882           0 :         return py_ctr;
    6883             : }
    6884             : 
    6885           0 : static int py_srvsvc_NetSessInfoCtr_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
    6886             : {
    6887           0 :         struct srvsvc_NetSessInfoCtr *object = (struct srvsvc_NetSessInfoCtr *)pytalloc_get_ptr(py_obj);
    6888           0 :         if (value == NULL) {
    6889           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctr");
    6890           0 :                 return -1;
    6891             :         }
    6892             :         {
    6893             :                 union srvsvc_NetSessCtr *ctr_switch_0;
    6894           0 :                 ctr_switch_0 = (union srvsvc_NetSessCtr *)pyrpc_export_union(&srvsvc_NetSessCtr_Type, pytalloc_get_mem_ctx(py_obj), object->level, value, "union srvsvc_NetSessCtr");
    6895           0 :                 if (ctr_switch_0 == NULL) {
    6896           0 :                         return -1;
    6897             :                 }
    6898           0 :                 object->ctr = *ctr_switch_0;
    6899             :         }
    6900           0 :         return 0;
    6901             : }
    6902             : 
    6903             : static PyGetSetDef py_srvsvc_NetSessInfoCtr_getsetters[] = {
    6904             :         {
    6905             :                 .name = discard_const_p(char, "level"),
    6906             :                 .get = py_srvsvc_NetSessInfoCtr_get_level,
    6907             :                 .set = py_srvsvc_NetSessInfoCtr_set_level,
    6908             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6909             :         },
    6910             :         {
    6911             :                 .name = discard_const_p(char, "ctr"),
    6912             :                 .get = py_srvsvc_NetSessInfoCtr_get_ctr,
    6913             :                 .set = py_srvsvc_NetSessInfoCtr_set_ctr,
    6914             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetSessCtr")
    6915             :         },
    6916             :         { .name = NULL }
    6917             : };
    6918             : 
    6919           0 : static PyObject *py_srvsvc_NetSessInfoCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6920             : {
    6921           0 :         return pytalloc_new(struct srvsvc_NetSessInfoCtr, type);
    6922             : }
    6923             : 
    6924             : 
    6925             : static PyTypeObject srvsvc_NetSessInfoCtr_Type = {
    6926             :         PyVarObject_HEAD_INIT(NULL, 0)
    6927             :         .tp_name = "srvsvc.NetSessInfoCtr",
    6928             :         .tp_getset = py_srvsvc_NetSessInfoCtr_getsetters,
    6929             :         .tp_methods = NULL,
    6930             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6931             :         .tp_new = py_srvsvc_NetSessInfoCtr_new,
    6932             : };
    6933             : 
    6934             : 
    6935           0 : static PyObject *py_srvsvc_NetShareInfo0_get_name(PyObject *obj, void *closure)
    6936             : {
    6937           0 :         struct srvsvc_NetShareInfo0 *object = (struct srvsvc_NetShareInfo0 *)pytalloc_get_ptr(obj);
    6938             :         PyObject *py_name;
    6939           0 :         if (object->name == NULL) {
    6940           0 :                 Py_RETURN_NONE;
    6941             :         }
    6942           0 :         if (object->name == NULL) {
    6943           0 :                 py_name = Py_None;
    6944           0 :                 Py_INCREF(py_name);
    6945             :         } else {
    6946           0 :                 if (object->name == NULL) {
    6947           0 :                         py_name = Py_None;
    6948           0 :                         Py_INCREF(py_name);
    6949             :                 } else {
    6950           0 :                         py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
    6951             :                 }
    6952             :         }
    6953           0 :         return py_name;
    6954             : }
    6955             : 
    6956           0 : static int py_srvsvc_NetShareInfo0_set_name(PyObject *py_obj, PyObject *value, void *closure)
    6957             : {
    6958           0 :         struct srvsvc_NetShareInfo0 *object = (struct srvsvc_NetShareInfo0 *)pytalloc_get_ptr(py_obj);
    6959           0 :         if (value == NULL) {
    6960           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->name");
    6961           0 :                 return -1;
    6962             :         }
    6963           0 :         if (value == Py_None) {
    6964           0 :                 object->name = NULL;
    6965             :         } else {
    6966           0 :                 object->name = NULL;
    6967             :                 {
    6968             :                         const char *test_str;
    6969             :                         const char *talloc_str;
    6970           0 :                         PyObject *unicode = NULL;
    6971           0 :                         if (PyUnicode_Check(value)) {
    6972           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    6973           0 :                                 if (unicode == NULL) {
    6974           0 :                                         PyErr_NoMemory();
    6975           0 :                                         return -1;
    6976             :                                 }
    6977           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    6978           0 :                         } else if (PyBytes_Check(value)) {
    6979           0 :                                 test_str = PyBytes_AS_STRING(value);
    6980             :                         } else {
    6981           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    6982           0 :                                 return -1;
    6983             :                         }
    6984           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    6985           0 :                         if (unicode != NULL) {
    6986           0 :                                 Py_DECREF(unicode);
    6987             :                         }
    6988           0 :                         if (talloc_str == NULL) {
    6989           0 :                                 PyErr_NoMemory();
    6990           0 :                                 return -1;
    6991             :                         }
    6992           0 :                         object->name = talloc_str;
    6993             :                 }
    6994             :         }
    6995           0 :         return 0;
    6996             : }
    6997             : 
    6998             : static PyGetSetDef py_srvsvc_NetShareInfo0_getsetters[] = {
    6999             :         {
    7000             :                 .name = discard_const_p(char, "name"),
    7001             :                 .get = py_srvsvc_NetShareInfo0_get_name,
    7002             :                 .set = py_srvsvc_NetShareInfo0_set_name,
    7003             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7004             :         },
    7005             :         { .name = NULL }
    7006             : };
    7007             : 
    7008           0 : static PyObject *py_srvsvc_NetShareInfo0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7009             : {
    7010           0 :         return pytalloc_new(struct srvsvc_NetShareInfo0, type);
    7011             : }
    7012             : 
    7013             : 
    7014             : static PyTypeObject srvsvc_NetShareInfo0_Type = {
    7015             :         PyVarObject_HEAD_INIT(NULL, 0)
    7016             :         .tp_name = "srvsvc.NetShareInfo0",
    7017             :         .tp_getset = py_srvsvc_NetShareInfo0_getsetters,
    7018             :         .tp_methods = NULL,
    7019             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7020             :         .tp_new = py_srvsvc_NetShareInfo0_new,
    7021             : };
    7022             : 
    7023             : 
    7024           0 : static PyObject *py_srvsvc_NetShareCtr0_get_count(PyObject *obj, void *closure)
    7025             : {
    7026           0 :         struct srvsvc_NetShareCtr0 *object = (struct srvsvc_NetShareCtr0 *)pytalloc_get_ptr(obj);
    7027             :         PyObject *py_count;
    7028           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
    7029           0 :         return py_count;
    7030             : }
    7031             : 
    7032           0 : static int py_srvsvc_NetShareCtr0_set_count(PyObject *py_obj, PyObject *value, void *closure)
    7033             : {
    7034           0 :         struct srvsvc_NetShareCtr0 *object = (struct srvsvc_NetShareCtr0 *)pytalloc_get_ptr(py_obj);
    7035           0 :         if (value == NULL) {
    7036           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
    7037           0 :                 return -1;
    7038             :         }
    7039             :         {
    7040           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    7041           0 :                 if (PyLong_Check(value)) {
    7042             :                         unsigned long long test_var;
    7043           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7044           0 :                         if (PyErr_Occurred() != NULL) {
    7045           0 :                                 return -1;
    7046             :                         }
    7047           0 :                         if (test_var > uint_max) {
    7048           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7049             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7050           0 :                                 return -1;
    7051             :                         }
    7052           0 :                         object->count = test_var;
    7053             :                 } else {
    7054           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7055             :                           PyLong_Type.tp_name);
    7056           0 :                         return -1;
    7057             :                 }
    7058             :         }
    7059           0 :         return 0;
    7060             : }
    7061             : 
    7062           0 : static PyObject *py_srvsvc_NetShareCtr0_get_array(PyObject *obj, void *closure)
    7063             : {
    7064           0 :         struct srvsvc_NetShareCtr0 *object = (struct srvsvc_NetShareCtr0 *)pytalloc_get_ptr(obj);
    7065             :         PyObject *py_array;
    7066           0 :         if (object->array == NULL) {
    7067           0 :                 Py_RETURN_NONE;
    7068             :         }
    7069           0 :         if (object->array == NULL) {
    7070           0 :                 py_array = Py_None;
    7071           0 :                 Py_INCREF(py_array);
    7072             :         } else {
    7073           0 :                 py_array = PyList_New(object->count);
    7074           0 :                 if (py_array == NULL) {
    7075           0 :                         return NULL;
    7076             :                 }
    7077             :                 {
    7078             :                         int array_cntr_1;
    7079           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    7080             :                                 PyObject *py_array_1;
    7081           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo0_Type, object->array, &object->array[array_cntr_1]);
    7082           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    7083             :                         }
    7084             :                 }
    7085             :         }
    7086           0 :         return py_array;
    7087             : }
    7088             : 
    7089           0 : static int py_srvsvc_NetShareCtr0_set_array(PyObject *py_obj, PyObject *value, void *closure)
    7090             : {
    7091           0 :         struct srvsvc_NetShareCtr0 *object = (struct srvsvc_NetShareCtr0 *)pytalloc_get_ptr(py_obj);
    7092           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    7093           0 :         if (value == NULL) {
    7094           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
    7095           0 :                 return -1;
    7096             :         }
    7097           0 :         if (value == Py_None) {
    7098           0 :                 object->array = NULL;
    7099             :         } else {
    7100           0 :                 object->array = NULL;
    7101           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    7102             :                 {
    7103             :                         int array_cntr_1;
    7104           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    7105           0 :                         if (!object->array) { return -1;; }
    7106           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    7107           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    7108           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    7109           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
    7110           0 :                                         return -1;
    7111             :                                 }
    7112           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo0_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    7113           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    7114           0 :                                         PyErr_NoMemory();
    7115           0 :                                         return -1;
    7116             :                                 }
    7117           0 :                                 object->array[array_cntr_1] = *(struct srvsvc_NetShareInfo0 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    7118             :                         }
    7119             :                 }
    7120             :         }
    7121           0 :         return 0;
    7122             : }
    7123             : 
    7124             : static PyGetSetDef py_srvsvc_NetShareCtr0_getsetters[] = {
    7125             :         {
    7126             :                 .name = discard_const_p(char, "count"),
    7127             :                 .get = py_srvsvc_NetShareCtr0_get_count,
    7128             :                 .set = py_srvsvc_NetShareCtr0_set_count,
    7129             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7130             :         },
    7131             :         {
    7132             :                 .name = discard_const_p(char, "array"),
    7133             :                 .get = py_srvsvc_NetShareCtr0_get_array,
    7134             :                 .set = py_srvsvc_NetShareCtr0_set_array,
    7135             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfo0")
    7136             :         },
    7137             :         { .name = NULL }
    7138             : };
    7139             : 
    7140           0 : static PyObject *py_srvsvc_NetShareCtr0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7141             : {
    7142           0 :         return pytalloc_new(struct srvsvc_NetShareCtr0, type);
    7143             : }
    7144             : 
    7145             : 
    7146             : static PyTypeObject srvsvc_NetShareCtr0_Type = {
    7147             :         PyVarObject_HEAD_INIT(NULL, 0)
    7148             :         .tp_name = "srvsvc.NetShareCtr0",
    7149             :         .tp_getset = py_srvsvc_NetShareCtr0_getsetters,
    7150             :         .tp_methods = NULL,
    7151             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7152             :         .tp_new = py_srvsvc_NetShareCtr0_new,
    7153             : };
    7154             : 
    7155             : 
    7156           0 : static PyObject *py_srvsvc_NetShareInfo1_get_name(PyObject *obj, void *closure)
    7157             : {
    7158           0 :         struct srvsvc_NetShareInfo1 *object = (struct srvsvc_NetShareInfo1 *)pytalloc_get_ptr(obj);
    7159             :         PyObject *py_name;
    7160           0 :         if (object->name == NULL) {
    7161           0 :                 Py_RETURN_NONE;
    7162             :         }
    7163           0 :         if (object->name == NULL) {
    7164           0 :                 py_name = Py_None;
    7165           0 :                 Py_INCREF(py_name);
    7166             :         } else {
    7167           0 :                 if (object->name == NULL) {
    7168           0 :                         py_name = Py_None;
    7169           0 :                         Py_INCREF(py_name);
    7170             :                 } else {
    7171           0 :                         py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
    7172             :                 }
    7173             :         }
    7174           0 :         return py_name;
    7175             : }
    7176             : 
    7177           0 : static int py_srvsvc_NetShareInfo1_set_name(PyObject *py_obj, PyObject *value, void *closure)
    7178             : {
    7179           0 :         struct srvsvc_NetShareInfo1 *object = (struct srvsvc_NetShareInfo1 *)pytalloc_get_ptr(py_obj);
    7180           0 :         if (value == NULL) {
    7181           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->name");
    7182           0 :                 return -1;
    7183             :         }
    7184           0 :         if (value == Py_None) {
    7185           0 :                 object->name = NULL;
    7186             :         } else {
    7187           0 :                 object->name = NULL;
    7188             :                 {
    7189             :                         const char *test_str;
    7190             :                         const char *talloc_str;
    7191           0 :                         PyObject *unicode = NULL;
    7192           0 :                         if (PyUnicode_Check(value)) {
    7193           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    7194           0 :                                 if (unicode == NULL) {
    7195           0 :                                         PyErr_NoMemory();
    7196           0 :                                         return -1;
    7197             :                                 }
    7198           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    7199           0 :                         } else if (PyBytes_Check(value)) {
    7200           0 :                                 test_str = PyBytes_AS_STRING(value);
    7201             :                         } else {
    7202           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    7203           0 :                                 return -1;
    7204             :                         }
    7205           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    7206           0 :                         if (unicode != NULL) {
    7207           0 :                                 Py_DECREF(unicode);
    7208             :                         }
    7209           0 :                         if (talloc_str == NULL) {
    7210           0 :                                 PyErr_NoMemory();
    7211           0 :                                 return -1;
    7212             :                         }
    7213           0 :                         object->name = talloc_str;
    7214             :                 }
    7215             :         }
    7216           0 :         return 0;
    7217             : }
    7218             : 
    7219           0 : static PyObject *py_srvsvc_NetShareInfo1_get_type(PyObject *obj, void *closure)
    7220             : {
    7221           0 :         struct srvsvc_NetShareInfo1 *object = (struct srvsvc_NetShareInfo1 *)pytalloc_get_ptr(obj);
    7222             :         PyObject *py_type;
    7223           0 :         py_type = PyLong_FromUnsignedLongLong((uint32_t)object->type);
    7224           0 :         return py_type;
    7225             : }
    7226             : 
    7227           0 : static int py_srvsvc_NetShareInfo1_set_type(PyObject *py_obj, PyObject *value, void *closure)
    7228             : {
    7229           0 :         struct srvsvc_NetShareInfo1 *object = (struct srvsvc_NetShareInfo1 *)pytalloc_get_ptr(py_obj);
    7230           0 :         if (value == NULL) {
    7231           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->type");
    7232           0 :                 return -1;
    7233             :         }
    7234             :         {
    7235           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
    7236           0 :                 if (PyLong_Check(value)) {
    7237             :                         unsigned long long test_var;
    7238           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7239           0 :                         if (PyErr_Occurred() != NULL) {
    7240           0 :                                 return -1;
    7241             :                         }
    7242           0 :                         if (test_var > uint_max) {
    7243           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7244             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7245           0 :                                 return -1;
    7246             :                         }
    7247           0 :                         object->type = test_var;
    7248             :                 } else {
    7249           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7250             :                           PyLong_Type.tp_name);
    7251           0 :                         return -1;
    7252             :                 }
    7253             :         }
    7254           0 :         return 0;
    7255             : }
    7256             : 
    7257           0 : static PyObject *py_srvsvc_NetShareInfo1_get_comment(PyObject *obj, void *closure)
    7258             : {
    7259           0 :         struct srvsvc_NetShareInfo1 *object = (struct srvsvc_NetShareInfo1 *)pytalloc_get_ptr(obj);
    7260             :         PyObject *py_comment;
    7261           0 :         if (object->comment == NULL) {
    7262           0 :                 Py_RETURN_NONE;
    7263             :         }
    7264           0 :         if (object->comment == NULL) {
    7265           0 :                 py_comment = Py_None;
    7266           0 :                 Py_INCREF(py_comment);
    7267             :         } else {
    7268           0 :                 if (object->comment == NULL) {
    7269           0 :                         py_comment = Py_None;
    7270           0 :                         Py_INCREF(py_comment);
    7271             :                 } else {
    7272           0 :                         py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
    7273             :                 }
    7274             :         }
    7275           0 :         return py_comment;
    7276             : }
    7277             : 
    7278           0 : static int py_srvsvc_NetShareInfo1_set_comment(PyObject *py_obj, PyObject *value, void *closure)
    7279             : {
    7280           0 :         struct srvsvc_NetShareInfo1 *object = (struct srvsvc_NetShareInfo1 *)pytalloc_get_ptr(py_obj);
    7281           0 :         if (value == NULL) {
    7282           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->comment");
    7283           0 :                 return -1;
    7284             :         }
    7285           0 :         if (value == Py_None) {
    7286           0 :                 object->comment = NULL;
    7287             :         } else {
    7288           0 :                 object->comment = NULL;
    7289             :                 {
    7290             :                         const char *test_str;
    7291             :                         const char *talloc_str;
    7292           0 :                         PyObject *unicode = NULL;
    7293           0 :                         if (PyUnicode_Check(value)) {
    7294           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    7295           0 :                                 if (unicode == NULL) {
    7296           0 :                                         PyErr_NoMemory();
    7297           0 :                                         return -1;
    7298             :                                 }
    7299           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    7300           0 :                         } else if (PyBytes_Check(value)) {
    7301           0 :                                 test_str = PyBytes_AS_STRING(value);
    7302             :                         } else {
    7303           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    7304           0 :                                 return -1;
    7305             :                         }
    7306           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    7307           0 :                         if (unicode != NULL) {
    7308           0 :                                 Py_DECREF(unicode);
    7309             :                         }
    7310           0 :                         if (talloc_str == NULL) {
    7311           0 :                                 PyErr_NoMemory();
    7312           0 :                                 return -1;
    7313             :                         }
    7314           0 :                         object->comment = talloc_str;
    7315             :                 }
    7316             :         }
    7317           0 :         return 0;
    7318             : }
    7319             : 
    7320             : static PyGetSetDef py_srvsvc_NetShareInfo1_getsetters[] = {
    7321             :         {
    7322             :                 .name = discard_const_p(char, "name"),
    7323             :                 .get = py_srvsvc_NetShareInfo1_get_name,
    7324             :                 .set = py_srvsvc_NetShareInfo1_set_name,
    7325             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7326             :         },
    7327             :         {
    7328             :                 .name = discard_const_p(char, "type"),
    7329             :                 .get = py_srvsvc_NetShareInfo1_get_type,
    7330             :                 .set = py_srvsvc_NetShareInfo1_set_type,
    7331             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_ShareType")
    7332             :         },
    7333             :         {
    7334             :                 .name = discard_const_p(char, "comment"),
    7335             :                 .get = py_srvsvc_NetShareInfo1_get_comment,
    7336             :                 .set = py_srvsvc_NetShareInfo1_set_comment,
    7337             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7338             :         },
    7339             :         { .name = NULL }
    7340             : };
    7341             : 
    7342           0 : static PyObject *py_srvsvc_NetShareInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7343             : {
    7344           0 :         return pytalloc_new(struct srvsvc_NetShareInfo1, type);
    7345             : }
    7346             : 
    7347             : 
    7348             : static PyTypeObject srvsvc_NetShareInfo1_Type = {
    7349             :         PyVarObject_HEAD_INIT(NULL, 0)
    7350             :         .tp_name = "srvsvc.NetShareInfo1",
    7351             :         .tp_getset = py_srvsvc_NetShareInfo1_getsetters,
    7352             :         .tp_methods = NULL,
    7353             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7354             :         .tp_new = py_srvsvc_NetShareInfo1_new,
    7355             : };
    7356             : 
    7357             : 
    7358           0 : static PyObject *py_srvsvc_NetShareCtr1_get_count(PyObject *obj, void *closure)
    7359             : {
    7360           0 :         struct srvsvc_NetShareCtr1 *object = (struct srvsvc_NetShareCtr1 *)pytalloc_get_ptr(obj);
    7361             :         PyObject *py_count;
    7362           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
    7363           0 :         return py_count;
    7364             : }
    7365             : 
    7366           0 : static int py_srvsvc_NetShareCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
    7367             : {
    7368           0 :         struct srvsvc_NetShareCtr1 *object = (struct srvsvc_NetShareCtr1 *)pytalloc_get_ptr(py_obj);
    7369           0 :         if (value == NULL) {
    7370           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
    7371           0 :                 return -1;
    7372             :         }
    7373             :         {
    7374           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    7375           0 :                 if (PyLong_Check(value)) {
    7376             :                         unsigned long long test_var;
    7377           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7378           0 :                         if (PyErr_Occurred() != NULL) {
    7379           0 :                                 return -1;
    7380             :                         }
    7381           0 :                         if (test_var > uint_max) {
    7382           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7383             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7384           0 :                                 return -1;
    7385             :                         }
    7386           0 :                         object->count = test_var;
    7387             :                 } else {
    7388           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7389             :                           PyLong_Type.tp_name);
    7390           0 :                         return -1;
    7391             :                 }
    7392             :         }
    7393           0 :         return 0;
    7394             : }
    7395             : 
    7396           0 : static PyObject *py_srvsvc_NetShareCtr1_get_array(PyObject *obj, void *closure)
    7397             : {
    7398           0 :         struct srvsvc_NetShareCtr1 *object = (struct srvsvc_NetShareCtr1 *)pytalloc_get_ptr(obj);
    7399             :         PyObject *py_array;
    7400           0 :         if (object->array == NULL) {
    7401           0 :                 Py_RETURN_NONE;
    7402             :         }
    7403           0 :         if (object->array == NULL) {
    7404           0 :                 py_array = Py_None;
    7405           0 :                 Py_INCREF(py_array);
    7406             :         } else {
    7407           0 :                 py_array = PyList_New(object->count);
    7408           0 :                 if (py_array == NULL) {
    7409           0 :                         return NULL;
    7410             :                 }
    7411             :                 {
    7412             :                         int array_cntr_1;
    7413           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    7414             :                                 PyObject *py_array_1;
    7415           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo1_Type, object->array, &object->array[array_cntr_1]);
    7416           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    7417             :                         }
    7418             :                 }
    7419             :         }
    7420           0 :         return py_array;
    7421             : }
    7422             : 
    7423           0 : static int py_srvsvc_NetShareCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
    7424             : {
    7425           0 :         struct srvsvc_NetShareCtr1 *object = (struct srvsvc_NetShareCtr1 *)pytalloc_get_ptr(py_obj);
    7426           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    7427           0 :         if (value == NULL) {
    7428           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
    7429           0 :                 return -1;
    7430             :         }
    7431           0 :         if (value == Py_None) {
    7432           0 :                 object->array = NULL;
    7433             :         } else {
    7434           0 :                 object->array = NULL;
    7435           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    7436             :                 {
    7437             :                         int array_cntr_1;
    7438           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    7439           0 :                         if (!object->array) { return -1;; }
    7440           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    7441           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    7442           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    7443           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
    7444           0 :                                         return -1;
    7445             :                                 }
    7446           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo1_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    7447           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    7448           0 :                                         PyErr_NoMemory();
    7449           0 :                                         return -1;
    7450             :                                 }
    7451           0 :                                 object->array[array_cntr_1] = *(struct srvsvc_NetShareInfo1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    7452             :                         }
    7453             :                 }
    7454             :         }
    7455           0 :         return 0;
    7456             : }
    7457             : 
    7458             : static PyGetSetDef py_srvsvc_NetShareCtr1_getsetters[] = {
    7459             :         {
    7460             :                 .name = discard_const_p(char, "count"),
    7461             :                 .get = py_srvsvc_NetShareCtr1_get_count,
    7462             :                 .set = py_srvsvc_NetShareCtr1_set_count,
    7463             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7464             :         },
    7465             :         {
    7466             :                 .name = discard_const_p(char, "array"),
    7467             :                 .get = py_srvsvc_NetShareCtr1_get_array,
    7468             :                 .set = py_srvsvc_NetShareCtr1_set_array,
    7469             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfo1")
    7470             :         },
    7471             :         { .name = NULL }
    7472             : };
    7473             : 
    7474           0 : static PyObject *py_srvsvc_NetShareCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7475             : {
    7476           0 :         return pytalloc_new(struct srvsvc_NetShareCtr1, type);
    7477             : }
    7478             : 
    7479             : 
    7480             : static PyTypeObject srvsvc_NetShareCtr1_Type = {
    7481             :         PyVarObject_HEAD_INIT(NULL, 0)
    7482             :         .tp_name = "srvsvc.NetShareCtr1",
    7483             :         .tp_getset = py_srvsvc_NetShareCtr1_getsetters,
    7484             :         .tp_methods = NULL,
    7485             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7486             :         .tp_new = py_srvsvc_NetShareCtr1_new,
    7487             : };
    7488             : 
    7489             : 
    7490           0 : static PyObject *py_srvsvc_NetShareInfo2_get_name(PyObject *obj, void *closure)
    7491             : {
    7492           0 :         struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(obj);
    7493             :         PyObject *py_name;
    7494           0 :         if (object->name == NULL) {
    7495           0 :                 Py_RETURN_NONE;
    7496             :         }
    7497           0 :         if (object->name == NULL) {
    7498           0 :                 py_name = Py_None;
    7499           0 :                 Py_INCREF(py_name);
    7500             :         } else {
    7501           0 :                 if (object->name == NULL) {
    7502           0 :                         py_name = Py_None;
    7503           0 :                         Py_INCREF(py_name);
    7504             :                 } else {
    7505           0 :                         py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
    7506             :                 }
    7507             :         }
    7508           0 :         return py_name;
    7509             : }
    7510             : 
    7511           0 : static int py_srvsvc_NetShareInfo2_set_name(PyObject *py_obj, PyObject *value, void *closure)
    7512             : {
    7513           0 :         struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(py_obj);
    7514           0 :         if (value == NULL) {
    7515           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->name");
    7516           0 :                 return -1;
    7517             :         }
    7518           0 :         if (value == Py_None) {
    7519           0 :                 object->name = NULL;
    7520             :         } else {
    7521           0 :                 object->name = NULL;
    7522             :                 {
    7523             :                         const char *test_str;
    7524             :                         const char *talloc_str;
    7525           0 :                         PyObject *unicode = NULL;
    7526           0 :                         if (PyUnicode_Check(value)) {
    7527           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    7528           0 :                                 if (unicode == NULL) {
    7529           0 :                                         PyErr_NoMemory();
    7530           0 :                                         return -1;
    7531             :                                 }
    7532           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    7533           0 :                         } else if (PyBytes_Check(value)) {
    7534           0 :                                 test_str = PyBytes_AS_STRING(value);
    7535             :                         } else {
    7536           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    7537           0 :                                 return -1;
    7538             :                         }
    7539           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    7540           0 :                         if (unicode != NULL) {
    7541           0 :                                 Py_DECREF(unicode);
    7542             :                         }
    7543           0 :                         if (talloc_str == NULL) {
    7544           0 :                                 PyErr_NoMemory();
    7545           0 :                                 return -1;
    7546             :                         }
    7547           0 :                         object->name = talloc_str;
    7548             :                 }
    7549             :         }
    7550           0 :         return 0;
    7551             : }
    7552             : 
    7553           0 : static PyObject *py_srvsvc_NetShareInfo2_get_type(PyObject *obj, void *closure)
    7554             : {
    7555           0 :         struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(obj);
    7556             :         PyObject *py_type;
    7557           0 :         py_type = PyLong_FromUnsignedLongLong((uint32_t)object->type);
    7558           0 :         return py_type;
    7559             : }
    7560             : 
    7561           0 : static int py_srvsvc_NetShareInfo2_set_type(PyObject *py_obj, PyObject *value, void *closure)
    7562             : {
    7563           0 :         struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(py_obj);
    7564           0 :         if (value == NULL) {
    7565           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->type");
    7566           0 :                 return -1;
    7567             :         }
    7568             :         {
    7569           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
    7570           0 :                 if (PyLong_Check(value)) {
    7571             :                         unsigned long long test_var;
    7572           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7573           0 :                         if (PyErr_Occurred() != NULL) {
    7574           0 :                                 return -1;
    7575             :                         }
    7576           0 :                         if (test_var > uint_max) {
    7577           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7578             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7579           0 :                                 return -1;
    7580             :                         }
    7581           0 :                         object->type = test_var;
    7582             :                 } else {
    7583           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7584             :                           PyLong_Type.tp_name);
    7585           0 :                         return -1;
    7586             :                 }
    7587             :         }
    7588           0 :         return 0;
    7589             : }
    7590             : 
    7591           0 : static PyObject *py_srvsvc_NetShareInfo2_get_comment(PyObject *obj, void *closure)
    7592             : {
    7593           0 :         struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(obj);
    7594             :         PyObject *py_comment;
    7595           0 :         if (object->comment == NULL) {
    7596           0 :                 Py_RETURN_NONE;
    7597             :         }
    7598           0 :         if (object->comment == NULL) {
    7599           0 :                 py_comment = Py_None;
    7600           0 :                 Py_INCREF(py_comment);
    7601             :         } else {
    7602           0 :                 if (object->comment == NULL) {
    7603           0 :                         py_comment = Py_None;
    7604           0 :                         Py_INCREF(py_comment);
    7605             :                 } else {
    7606           0 :                         py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
    7607             :                 }
    7608             :         }
    7609           0 :         return py_comment;
    7610             : }
    7611             : 
    7612           0 : static int py_srvsvc_NetShareInfo2_set_comment(PyObject *py_obj, PyObject *value, void *closure)
    7613             : {
    7614           0 :         struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(py_obj);
    7615           0 :         if (value == NULL) {
    7616           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->comment");
    7617           0 :                 return -1;
    7618             :         }
    7619           0 :         if (value == Py_None) {
    7620           0 :                 object->comment = NULL;
    7621             :         } else {
    7622           0 :                 object->comment = NULL;
    7623             :                 {
    7624             :                         const char *test_str;
    7625             :                         const char *talloc_str;
    7626           0 :                         PyObject *unicode = NULL;
    7627           0 :                         if (PyUnicode_Check(value)) {
    7628           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    7629           0 :                                 if (unicode == NULL) {
    7630           0 :                                         PyErr_NoMemory();
    7631           0 :                                         return -1;
    7632             :                                 }
    7633           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    7634           0 :                         } else if (PyBytes_Check(value)) {
    7635           0 :                                 test_str = PyBytes_AS_STRING(value);
    7636             :                         } else {
    7637           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    7638           0 :                                 return -1;
    7639             :                         }
    7640           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    7641           0 :                         if (unicode != NULL) {
    7642           0 :                                 Py_DECREF(unicode);
    7643             :                         }
    7644           0 :                         if (talloc_str == NULL) {
    7645           0 :                                 PyErr_NoMemory();
    7646           0 :                                 return -1;
    7647             :                         }
    7648           0 :                         object->comment = talloc_str;
    7649             :                 }
    7650             :         }
    7651           0 :         return 0;
    7652             : }
    7653             : 
    7654           0 : static PyObject *py_srvsvc_NetShareInfo2_get_permissions(PyObject *obj, void *closure)
    7655             : {
    7656           0 :         struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(obj);
    7657             :         PyObject *py_permissions;
    7658           0 :         py_permissions = PyLong_FromUnsignedLongLong((uint32_t)object->permissions);
    7659           0 :         return py_permissions;
    7660             : }
    7661             : 
    7662           0 : static int py_srvsvc_NetShareInfo2_set_permissions(PyObject *py_obj, PyObject *value, void *closure)
    7663             : {
    7664           0 :         struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(py_obj);
    7665           0 :         if (value == NULL) {
    7666           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->permissions");
    7667           0 :                 return -1;
    7668             :         }
    7669             :         {
    7670           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->permissions));
    7671           0 :                 if (PyLong_Check(value)) {
    7672             :                         unsigned long long test_var;
    7673           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7674           0 :                         if (PyErr_Occurred() != NULL) {
    7675           0 :                                 return -1;
    7676             :                         }
    7677           0 :                         if (test_var > uint_max) {
    7678           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7679             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7680           0 :                                 return -1;
    7681             :                         }
    7682           0 :                         object->permissions = test_var;
    7683             :                 } else {
    7684           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7685             :                           PyLong_Type.tp_name);
    7686           0 :                         return -1;
    7687             :                 }
    7688             :         }
    7689           0 :         return 0;
    7690             : }
    7691             : 
    7692           0 : static PyObject *py_srvsvc_NetShareInfo2_get_max_users(PyObject *obj, void *closure)
    7693             : {
    7694           0 :         struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(obj);
    7695             :         PyObject *py_max_users;
    7696           0 :         py_max_users = PyLong_FromUnsignedLongLong((uint32_t)object->max_users);
    7697           0 :         return py_max_users;
    7698             : }
    7699             : 
    7700           0 : static int py_srvsvc_NetShareInfo2_set_max_users(PyObject *py_obj, PyObject *value, void *closure)
    7701             : {
    7702           0 :         struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(py_obj);
    7703           0 :         if (value == NULL) {
    7704           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->max_users");
    7705           0 :                 return -1;
    7706             :         }
    7707             :         {
    7708           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_users));
    7709           0 :                 if (PyLong_Check(value)) {
    7710             :                         unsigned long long test_var;
    7711           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7712           0 :                         if (PyErr_Occurred() != NULL) {
    7713           0 :                                 return -1;
    7714             :                         }
    7715           0 :                         if (test_var > uint_max) {
    7716           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7717             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7718           0 :                                 return -1;
    7719             :                         }
    7720           0 :                         object->max_users = test_var;
    7721             :                 } else {
    7722           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7723             :                           PyLong_Type.tp_name);
    7724           0 :                         return -1;
    7725             :                 }
    7726             :         }
    7727           0 :         return 0;
    7728             : }
    7729             : 
    7730           0 : static PyObject *py_srvsvc_NetShareInfo2_get_current_users(PyObject *obj, void *closure)
    7731             : {
    7732           0 :         struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(obj);
    7733             :         PyObject *py_current_users;
    7734           0 :         py_current_users = PyLong_FromUnsignedLongLong((uint32_t)object->current_users);
    7735           0 :         return py_current_users;
    7736             : }
    7737             : 
    7738           0 : static int py_srvsvc_NetShareInfo2_set_current_users(PyObject *py_obj, PyObject *value, void *closure)
    7739             : {
    7740           0 :         struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(py_obj);
    7741           0 :         if (value == NULL) {
    7742           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->current_users");
    7743           0 :                 return -1;
    7744             :         }
    7745             :         {
    7746           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->current_users));
    7747           0 :                 if (PyLong_Check(value)) {
    7748             :                         unsigned long long test_var;
    7749           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7750           0 :                         if (PyErr_Occurred() != NULL) {
    7751           0 :                                 return -1;
    7752             :                         }
    7753           0 :                         if (test_var > uint_max) {
    7754           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7755             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7756           0 :                                 return -1;
    7757             :                         }
    7758           0 :                         object->current_users = test_var;
    7759             :                 } else {
    7760           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7761             :                           PyLong_Type.tp_name);
    7762           0 :                         return -1;
    7763             :                 }
    7764             :         }
    7765           0 :         return 0;
    7766             : }
    7767             : 
    7768           0 : static PyObject *py_srvsvc_NetShareInfo2_get_path(PyObject *obj, void *closure)
    7769             : {
    7770           0 :         struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(obj);
    7771             :         PyObject *py_path;
    7772           0 :         if (object->path == NULL) {
    7773           0 :                 Py_RETURN_NONE;
    7774             :         }
    7775           0 :         if (object->path == NULL) {
    7776           0 :                 py_path = Py_None;
    7777           0 :                 Py_INCREF(py_path);
    7778             :         } else {
    7779           0 :                 if (object->path == NULL) {
    7780           0 :                         py_path = Py_None;
    7781           0 :                         Py_INCREF(py_path);
    7782             :                 } else {
    7783           0 :                         py_path = PyUnicode_Decode(object->path, strlen(object->path), "utf-8", "ignore");
    7784             :                 }
    7785             :         }
    7786           0 :         return py_path;
    7787             : }
    7788             : 
    7789           0 : static int py_srvsvc_NetShareInfo2_set_path(PyObject *py_obj, PyObject *value, void *closure)
    7790             : {
    7791           0 :         struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(py_obj);
    7792           0 :         if (value == NULL) {
    7793           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->path");
    7794           0 :                 return -1;
    7795             :         }
    7796           0 :         if (value == Py_None) {
    7797           0 :                 object->path = NULL;
    7798             :         } else {
    7799           0 :                 object->path = NULL;
    7800             :                 {
    7801             :                         const char *test_str;
    7802             :                         const char *talloc_str;
    7803           0 :                         PyObject *unicode = NULL;
    7804           0 :                         if (PyUnicode_Check(value)) {
    7805           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    7806           0 :                                 if (unicode == NULL) {
    7807           0 :                                         PyErr_NoMemory();
    7808           0 :                                         return -1;
    7809             :                                 }
    7810           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    7811           0 :                         } else if (PyBytes_Check(value)) {
    7812           0 :                                 test_str = PyBytes_AS_STRING(value);
    7813             :                         } else {
    7814           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    7815           0 :                                 return -1;
    7816             :                         }
    7817           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    7818           0 :                         if (unicode != NULL) {
    7819           0 :                                 Py_DECREF(unicode);
    7820             :                         }
    7821           0 :                         if (talloc_str == NULL) {
    7822           0 :                                 PyErr_NoMemory();
    7823           0 :                                 return -1;
    7824             :                         }
    7825           0 :                         object->path = talloc_str;
    7826             :                 }
    7827             :         }
    7828           0 :         return 0;
    7829             : }
    7830             : 
    7831           0 : static PyObject *py_srvsvc_NetShareInfo2_get_password(PyObject *obj, void *closure)
    7832             : {
    7833           0 :         struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(obj);
    7834             :         PyObject *py_password;
    7835           0 :         if (object->password == NULL) {
    7836           0 :                 Py_RETURN_NONE;
    7837             :         }
    7838           0 :         if (object->password == NULL) {
    7839           0 :                 py_password = Py_None;
    7840           0 :                 Py_INCREF(py_password);
    7841             :         } else {
    7842           0 :                 if (object->password == NULL) {
    7843           0 :                         py_password = Py_None;
    7844           0 :                         Py_INCREF(py_password);
    7845             :                 } else {
    7846           0 :                         py_password = PyUnicode_Decode(object->password, strlen(object->password), "utf-8", "ignore");
    7847             :                 }
    7848             :         }
    7849           0 :         return py_password;
    7850             : }
    7851             : 
    7852           0 : static int py_srvsvc_NetShareInfo2_set_password(PyObject *py_obj, PyObject *value, void *closure)
    7853             : {
    7854           0 :         struct srvsvc_NetShareInfo2 *object = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(py_obj);
    7855           0 :         if (value == NULL) {
    7856           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->password");
    7857           0 :                 return -1;
    7858             :         }
    7859           0 :         if (value == Py_None) {
    7860           0 :                 object->password = NULL;
    7861             :         } else {
    7862           0 :                 object->password = NULL;
    7863             :                 {
    7864             :                         const char *test_str;
    7865             :                         const char *talloc_str;
    7866           0 :                         PyObject *unicode = NULL;
    7867           0 :                         if (PyUnicode_Check(value)) {
    7868           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    7869           0 :                                 if (unicode == NULL) {
    7870           0 :                                         PyErr_NoMemory();
    7871           0 :                                         return -1;
    7872             :                                 }
    7873           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    7874           0 :                         } else if (PyBytes_Check(value)) {
    7875           0 :                                 test_str = PyBytes_AS_STRING(value);
    7876             :                         } else {
    7877           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    7878           0 :                                 return -1;
    7879             :                         }
    7880           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    7881           0 :                         if (unicode != NULL) {
    7882           0 :                                 Py_DECREF(unicode);
    7883             :                         }
    7884           0 :                         if (talloc_str == NULL) {
    7885           0 :                                 PyErr_NoMemory();
    7886           0 :                                 return -1;
    7887             :                         }
    7888           0 :                         object->password = talloc_str;
    7889             :                 }
    7890             :         }
    7891           0 :         return 0;
    7892             : }
    7893             : 
    7894             : static PyGetSetDef py_srvsvc_NetShareInfo2_getsetters[] = {
    7895             :         {
    7896             :                 .name = discard_const_p(char, "name"),
    7897             :                 .get = py_srvsvc_NetShareInfo2_get_name,
    7898             :                 .set = py_srvsvc_NetShareInfo2_set_name,
    7899             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7900             :         },
    7901             :         {
    7902             :                 .name = discard_const_p(char, "type"),
    7903             :                 .get = py_srvsvc_NetShareInfo2_get_type,
    7904             :                 .set = py_srvsvc_NetShareInfo2_set_type,
    7905             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_ShareType")
    7906             :         },
    7907             :         {
    7908             :                 .name = discard_const_p(char, "comment"),
    7909             :                 .get = py_srvsvc_NetShareInfo2_get_comment,
    7910             :                 .set = py_srvsvc_NetShareInfo2_set_comment,
    7911             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7912             :         },
    7913             :         {
    7914             :                 .name = discard_const_p(char, "permissions"),
    7915             :                 .get = py_srvsvc_NetShareInfo2_get_permissions,
    7916             :                 .set = py_srvsvc_NetShareInfo2_set_permissions,
    7917             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7918             :         },
    7919             :         {
    7920             :                 .name = discard_const_p(char, "max_users"),
    7921             :                 .get = py_srvsvc_NetShareInfo2_get_max_users,
    7922             :                 .set = py_srvsvc_NetShareInfo2_set_max_users,
    7923             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7924             :         },
    7925             :         {
    7926             :                 .name = discard_const_p(char, "current_users"),
    7927             :                 .get = py_srvsvc_NetShareInfo2_get_current_users,
    7928             :                 .set = py_srvsvc_NetShareInfo2_set_current_users,
    7929             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7930             :         },
    7931             :         {
    7932             :                 .name = discard_const_p(char, "path"),
    7933             :                 .get = py_srvsvc_NetShareInfo2_get_path,
    7934             :                 .set = py_srvsvc_NetShareInfo2_set_path,
    7935             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7936             :         },
    7937             :         {
    7938             :                 .name = discard_const_p(char, "password"),
    7939             :                 .get = py_srvsvc_NetShareInfo2_get_password,
    7940             :                 .set = py_srvsvc_NetShareInfo2_set_password,
    7941             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7942             :         },
    7943             :         { .name = NULL }
    7944             : };
    7945             : 
    7946           0 : static PyObject *py_srvsvc_NetShareInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7947             : {
    7948           0 :         return pytalloc_new(struct srvsvc_NetShareInfo2, type);
    7949             : }
    7950             : 
    7951             : 
    7952             : static PyTypeObject srvsvc_NetShareInfo2_Type = {
    7953             :         PyVarObject_HEAD_INIT(NULL, 0)
    7954             :         .tp_name = "srvsvc.NetShareInfo2",
    7955             :         .tp_getset = py_srvsvc_NetShareInfo2_getsetters,
    7956             :         .tp_methods = NULL,
    7957             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7958             :         .tp_new = py_srvsvc_NetShareInfo2_new,
    7959             : };
    7960             : 
    7961             : 
    7962           0 : static PyObject *py_srvsvc_NetShareCtr2_get_count(PyObject *obj, void *closure)
    7963             : {
    7964           0 :         struct srvsvc_NetShareCtr2 *object = (struct srvsvc_NetShareCtr2 *)pytalloc_get_ptr(obj);
    7965             :         PyObject *py_count;
    7966           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
    7967           0 :         return py_count;
    7968             : }
    7969             : 
    7970           0 : static int py_srvsvc_NetShareCtr2_set_count(PyObject *py_obj, PyObject *value, void *closure)
    7971             : {
    7972           0 :         struct srvsvc_NetShareCtr2 *object = (struct srvsvc_NetShareCtr2 *)pytalloc_get_ptr(py_obj);
    7973           0 :         if (value == NULL) {
    7974           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
    7975           0 :                 return -1;
    7976             :         }
    7977             :         {
    7978           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    7979           0 :                 if (PyLong_Check(value)) {
    7980             :                         unsigned long long test_var;
    7981           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7982           0 :                         if (PyErr_Occurred() != NULL) {
    7983           0 :                                 return -1;
    7984             :                         }
    7985           0 :                         if (test_var > uint_max) {
    7986           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7987             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7988           0 :                                 return -1;
    7989             :                         }
    7990           0 :                         object->count = test_var;
    7991             :                 } else {
    7992           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7993             :                           PyLong_Type.tp_name);
    7994           0 :                         return -1;
    7995             :                 }
    7996             :         }
    7997           0 :         return 0;
    7998             : }
    7999             : 
    8000           0 : static PyObject *py_srvsvc_NetShareCtr2_get_array(PyObject *obj, void *closure)
    8001             : {
    8002           0 :         struct srvsvc_NetShareCtr2 *object = (struct srvsvc_NetShareCtr2 *)pytalloc_get_ptr(obj);
    8003             :         PyObject *py_array;
    8004           0 :         if (object->array == NULL) {
    8005           0 :                 Py_RETURN_NONE;
    8006             :         }
    8007           0 :         if (object->array == NULL) {
    8008           0 :                 py_array = Py_None;
    8009           0 :                 Py_INCREF(py_array);
    8010             :         } else {
    8011           0 :                 py_array = PyList_New(object->count);
    8012           0 :                 if (py_array == NULL) {
    8013           0 :                         return NULL;
    8014             :                 }
    8015             :                 {
    8016             :                         int array_cntr_1;
    8017           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    8018             :                                 PyObject *py_array_1;
    8019           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo2_Type, object->array, &object->array[array_cntr_1]);
    8020           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    8021             :                         }
    8022             :                 }
    8023             :         }
    8024           0 :         return py_array;
    8025             : }
    8026             : 
    8027           0 : static int py_srvsvc_NetShareCtr2_set_array(PyObject *py_obj, PyObject *value, void *closure)
    8028             : {
    8029           0 :         struct srvsvc_NetShareCtr2 *object = (struct srvsvc_NetShareCtr2 *)pytalloc_get_ptr(py_obj);
    8030           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    8031           0 :         if (value == NULL) {
    8032           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
    8033           0 :                 return -1;
    8034             :         }
    8035           0 :         if (value == Py_None) {
    8036           0 :                 object->array = NULL;
    8037             :         } else {
    8038           0 :                 object->array = NULL;
    8039           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    8040             :                 {
    8041             :                         int array_cntr_1;
    8042           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    8043           0 :                         if (!object->array) { return -1;; }
    8044           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    8045           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    8046           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    8047           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
    8048           0 :                                         return -1;
    8049             :                                 }
    8050           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo2_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    8051           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    8052           0 :                                         PyErr_NoMemory();
    8053           0 :                                         return -1;
    8054             :                                 }
    8055           0 :                                 object->array[array_cntr_1] = *(struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    8056             :                         }
    8057             :                 }
    8058             :         }
    8059           0 :         return 0;
    8060             : }
    8061             : 
    8062             : static PyGetSetDef py_srvsvc_NetShareCtr2_getsetters[] = {
    8063             :         {
    8064             :                 .name = discard_const_p(char, "count"),
    8065             :                 .get = py_srvsvc_NetShareCtr2_get_count,
    8066             :                 .set = py_srvsvc_NetShareCtr2_set_count,
    8067             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8068             :         },
    8069             :         {
    8070             :                 .name = discard_const_p(char, "array"),
    8071             :                 .get = py_srvsvc_NetShareCtr2_get_array,
    8072             :                 .set = py_srvsvc_NetShareCtr2_set_array,
    8073             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfo2")
    8074             :         },
    8075             :         { .name = NULL }
    8076             : };
    8077             : 
    8078           0 : static PyObject *py_srvsvc_NetShareCtr2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    8079             : {
    8080           0 :         return pytalloc_new(struct srvsvc_NetShareCtr2, type);
    8081             : }
    8082             : 
    8083             : 
    8084             : static PyTypeObject srvsvc_NetShareCtr2_Type = {
    8085             :         PyVarObject_HEAD_INIT(NULL, 0)
    8086             :         .tp_name = "srvsvc.NetShareCtr2",
    8087             :         .tp_getset = py_srvsvc_NetShareCtr2_getsetters,
    8088             :         .tp_methods = NULL,
    8089             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    8090             :         .tp_new = py_srvsvc_NetShareCtr2_new,
    8091             : };
    8092             : 
    8093             : 
    8094           0 : static PyObject *py_srvsvc_NetShareInfo501_get_name(PyObject *obj, void *closure)
    8095             : {
    8096           0 :         struct srvsvc_NetShareInfo501 *object = (struct srvsvc_NetShareInfo501 *)pytalloc_get_ptr(obj);
    8097             :         PyObject *py_name;
    8098           0 :         if (object->name == NULL) {
    8099           0 :                 Py_RETURN_NONE;
    8100             :         }
    8101           0 :         if (object->name == NULL) {
    8102           0 :                 py_name = Py_None;
    8103           0 :                 Py_INCREF(py_name);
    8104             :         } else {
    8105           0 :                 if (object->name == NULL) {
    8106           0 :                         py_name = Py_None;
    8107           0 :                         Py_INCREF(py_name);
    8108             :                 } else {
    8109           0 :                         py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
    8110             :                 }
    8111             :         }
    8112           0 :         return py_name;
    8113             : }
    8114             : 
    8115           0 : static int py_srvsvc_NetShareInfo501_set_name(PyObject *py_obj, PyObject *value, void *closure)
    8116             : {
    8117           0 :         struct srvsvc_NetShareInfo501 *object = (struct srvsvc_NetShareInfo501 *)pytalloc_get_ptr(py_obj);
    8118           0 :         if (value == NULL) {
    8119           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->name");
    8120           0 :                 return -1;
    8121             :         }
    8122           0 :         if (value == Py_None) {
    8123           0 :                 object->name = NULL;
    8124             :         } else {
    8125           0 :                 object->name = NULL;
    8126             :                 {
    8127             :                         const char *test_str;
    8128             :                         const char *talloc_str;
    8129           0 :                         PyObject *unicode = NULL;
    8130           0 :                         if (PyUnicode_Check(value)) {
    8131           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    8132           0 :                                 if (unicode == NULL) {
    8133           0 :                                         PyErr_NoMemory();
    8134           0 :                                         return -1;
    8135             :                                 }
    8136           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    8137           0 :                         } else if (PyBytes_Check(value)) {
    8138           0 :                                 test_str = PyBytes_AS_STRING(value);
    8139             :                         } else {
    8140           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    8141           0 :                                 return -1;
    8142             :                         }
    8143           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    8144           0 :                         if (unicode != NULL) {
    8145           0 :                                 Py_DECREF(unicode);
    8146             :                         }
    8147           0 :                         if (talloc_str == NULL) {
    8148           0 :                                 PyErr_NoMemory();
    8149           0 :                                 return -1;
    8150             :                         }
    8151           0 :                         object->name = talloc_str;
    8152             :                 }
    8153             :         }
    8154           0 :         return 0;
    8155             : }
    8156             : 
    8157           0 : static PyObject *py_srvsvc_NetShareInfo501_get_type(PyObject *obj, void *closure)
    8158             : {
    8159           0 :         struct srvsvc_NetShareInfo501 *object = (struct srvsvc_NetShareInfo501 *)pytalloc_get_ptr(obj);
    8160             :         PyObject *py_type;
    8161           0 :         py_type = PyLong_FromUnsignedLongLong((uint32_t)object->type);
    8162           0 :         return py_type;
    8163             : }
    8164             : 
    8165           0 : static int py_srvsvc_NetShareInfo501_set_type(PyObject *py_obj, PyObject *value, void *closure)
    8166             : {
    8167           0 :         struct srvsvc_NetShareInfo501 *object = (struct srvsvc_NetShareInfo501 *)pytalloc_get_ptr(py_obj);
    8168           0 :         if (value == NULL) {
    8169           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->type");
    8170           0 :                 return -1;
    8171             :         }
    8172             :         {
    8173           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
    8174           0 :                 if (PyLong_Check(value)) {
    8175             :                         unsigned long long test_var;
    8176           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8177           0 :                         if (PyErr_Occurred() != NULL) {
    8178           0 :                                 return -1;
    8179             :                         }
    8180           0 :                         if (test_var > uint_max) {
    8181           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8182             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8183           0 :                                 return -1;
    8184             :                         }
    8185           0 :                         object->type = test_var;
    8186             :                 } else {
    8187           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8188             :                           PyLong_Type.tp_name);
    8189           0 :                         return -1;
    8190             :                 }
    8191             :         }
    8192           0 :         return 0;
    8193             : }
    8194             : 
    8195           0 : static PyObject *py_srvsvc_NetShareInfo501_get_comment(PyObject *obj, void *closure)
    8196             : {
    8197           0 :         struct srvsvc_NetShareInfo501 *object = (struct srvsvc_NetShareInfo501 *)pytalloc_get_ptr(obj);
    8198             :         PyObject *py_comment;
    8199           0 :         if (object->comment == NULL) {
    8200           0 :                 Py_RETURN_NONE;
    8201             :         }
    8202           0 :         if (object->comment == NULL) {
    8203           0 :                 py_comment = Py_None;
    8204           0 :                 Py_INCREF(py_comment);
    8205             :         } else {
    8206           0 :                 if (object->comment == NULL) {
    8207           0 :                         py_comment = Py_None;
    8208           0 :                         Py_INCREF(py_comment);
    8209             :                 } else {
    8210           0 :                         py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
    8211             :                 }
    8212             :         }
    8213           0 :         return py_comment;
    8214             : }
    8215             : 
    8216           0 : static int py_srvsvc_NetShareInfo501_set_comment(PyObject *py_obj, PyObject *value, void *closure)
    8217             : {
    8218           0 :         struct srvsvc_NetShareInfo501 *object = (struct srvsvc_NetShareInfo501 *)pytalloc_get_ptr(py_obj);
    8219           0 :         if (value == NULL) {
    8220           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->comment");
    8221           0 :                 return -1;
    8222             :         }
    8223           0 :         if (value == Py_None) {
    8224           0 :                 object->comment = NULL;
    8225             :         } else {
    8226           0 :                 object->comment = NULL;
    8227             :                 {
    8228             :                         const char *test_str;
    8229             :                         const char *talloc_str;
    8230           0 :                         PyObject *unicode = NULL;
    8231           0 :                         if (PyUnicode_Check(value)) {
    8232           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    8233           0 :                                 if (unicode == NULL) {
    8234           0 :                                         PyErr_NoMemory();
    8235           0 :                                         return -1;
    8236             :                                 }
    8237           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    8238           0 :                         } else if (PyBytes_Check(value)) {
    8239           0 :                                 test_str = PyBytes_AS_STRING(value);
    8240             :                         } else {
    8241           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    8242           0 :                                 return -1;
    8243             :                         }
    8244           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    8245           0 :                         if (unicode != NULL) {
    8246           0 :                                 Py_DECREF(unicode);
    8247             :                         }
    8248           0 :                         if (talloc_str == NULL) {
    8249           0 :                                 PyErr_NoMemory();
    8250           0 :                                 return -1;
    8251             :                         }
    8252           0 :                         object->comment = talloc_str;
    8253             :                 }
    8254             :         }
    8255           0 :         return 0;
    8256             : }
    8257             : 
    8258           0 : static PyObject *py_srvsvc_NetShareInfo501_get_csc_policy(PyObject *obj, void *closure)
    8259             : {
    8260           0 :         struct srvsvc_NetShareInfo501 *object = (struct srvsvc_NetShareInfo501 *)pytalloc_get_ptr(obj);
    8261             :         PyObject *py_csc_policy;
    8262           0 :         py_csc_policy = PyLong_FromUnsignedLongLong((uint32_t)object->csc_policy);
    8263           0 :         return py_csc_policy;
    8264             : }
    8265             : 
    8266           0 : static int py_srvsvc_NetShareInfo501_set_csc_policy(PyObject *py_obj, PyObject *value, void *closure)
    8267             : {
    8268           0 :         struct srvsvc_NetShareInfo501 *object = (struct srvsvc_NetShareInfo501 *)pytalloc_get_ptr(py_obj);
    8269           0 :         if (value == NULL) {
    8270           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->csc_policy");
    8271           0 :                 return -1;
    8272             :         }
    8273             :         {
    8274           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->csc_policy));
    8275           0 :                 if (PyLong_Check(value)) {
    8276             :                         unsigned long long test_var;
    8277           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8278           0 :                         if (PyErr_Occurred() != NULL) {
    8279           0 :                                 return -1;
    8280             :                         }
    8281           0 :                         if (test_var > uint_max) {
    8282           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8283             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8284           0 :                                 return -1;
    8285             :                         }
    8286           0 :                         object->csc_policy = test_var;
    8287             :                 } else {
    8288           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8289             :                           PyLong_Type.tp_name);
    8290           0 :                         return -1;
    8291             :                 }
    8292             :         }
    8293           0 :         return 0;
    8294             : }
    8295             : 
    8296             : static PyGetSetDef py_srvsvc_NetShareInfo501_getsetters[] = {
    8297             :         {
    8298             :                 .name = discard_const_p(char, "name"),
    8299             :                 .get = py_srvsvc_NetShareInfo501_get_name,
    8300             :                 .set = py_srvsvc_NetShareInfo501_set_name,
    8301             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    8302             :         },
    8303             :         {
    8304             :                 .name = discard_const_p(char, "type"),
    8305             :                 .get = py_srvsvc_NetShareInfo501_get_type,
    8306             :                 .set = py_srvsvc_NetShareInfo501_set_type,
    8307             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_ShareType")
    8308             :         },
    8309             :         {
    8310             :                 .name = discard_const_p(char, "comment"),
    8311             :                 .get = py_srvsvc_NetShareInfo501_get_comment,
    8312             :                 .set = py_srvsvc_NetShareInfo501_set_comment,
    8313             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    8314             :         },
    8315             :         {
    8316             :                 .name = discard_const_p(char, "csc_policy"),
    8317             :                 .get = py_srvsvc_NetShareInfo501_get_csc_policy,
    8318             :                 .set = py_srvsvc_NetShareInfo501_set_csc_policy,
    8319             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8320             :         },
    8321             :         { .name = NULL }
    8322             : };
    8323             : 
    8324           0 : static PyObject *py_srvsvc_NetShareInfo501_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    8325             : {
    8326           0 :         return pytalloc_new(struct srvsvc_NetShareInfo501, type);
    8327             : }
    8328             : 
    8329             : 
    8330             : static PyTypeObject srvsvc_NetShareInfo501_Type = {
    8331             :         PyVarObject_HEAD_INIT(NULL, 0)
    8332             :         .tp_name = "srvsvc.NetShareInfo501",
    8333             :         .tp_getset = py_srvsvc_NetShareInfo501_getsetters,
    8334             :         .tp_methods = NULL,
    8335             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    8336             :         .tp_new = py_srvsvc_NetShareInfo501_new,
    8337             : };
    8338             : 
    8339             : 
    8340           0 : static PyObject *py_srvsvc_NetShareCtr501_get_count(PyObject *obj, void *closure)
    8341             : {
    8342           0 :         struct srvsvc_NetShareCtr501 *object = (struct srvsvc_NetShareCtr501 *)pytalloc_get_ptr(obj);
    8343             :         PyObject *py_count;
    8344           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
    8345           0 :         return py_count;
    8346             : }
    8347             : 
    8348           0 : static int py_srvsvc_NetShareCtr501_set_count(PyObject *py_obj, PyObject *value, void *closure)
    8349             : {
    8350           0 :         struct srvsvc_NetShareCtr501 *object = (struct srvsvc_NetShareCtr501 *)pytalloc_get_ptr(py_obj);
    8351           0 :         if (value == NULL) {
    8352           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
    8353           0 :                 return -1;
    8354             :         }
    8355             :         {
    8356           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    8357           0 :                 if (PyLong_Check(value)) {
    8358             :                         unsigned long long test_var;
    8359           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8360           0 :                         if (PyErr_Occurred() != NULL) {
    8361           0 :                                 return -1;
    8362             :                         }
    8363           0 :                         if (test_var > uint_max) {
    8364           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8365             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8366           0 :                                 return -1;
    8367             :                         }
    8368           0 :                         object->count = test_var;
    8369             :                 } else {
    8370           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8371             :                           PyLong_Type.tp_name);
    8372           0 :                         return -1;
    8373             :                 }
    8374             :         }
    8375           0 :         return 0;
    8376             : }
    8377             : 
    8378           0 : static PyObject *py_srvsvc_NetShareCtr501_get_array(PyObject *obj, void *closure)
    8379             : {
    8380           0 :         struct srvsvc_NetShareCtr501 *object = (struct srvsvc_NetShareCtr501 *)pytalloc_get_ptr(obj);
    8381             :         PyObject *py_array;
    8382           0 :         if (object->array == NULL) {
    8383           0 :                 Py_RETURN_NONE;
    8384             :         }
    8385           0 :         if (object->array == NULL) {
    8386           0 :                 py_array = Py_None;
    8387           0 :                 Py_INCREF(py_array);
    8388             :         } else {
    8389           0 :                 py_array = PyList_New(object->count);
    8390           0 :                 if (py_array == NULL) {
    8391           0 :                         return NULL;
    8392             :                 }
    8393             :                 {
    8394             :                         int array_cntr_1;
    8395           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    8396             :                                 PyObject *py_array_1;
    8397           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo501_Type, object->array, &object->array[array_cntr_1]);
    8398           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    8399             :                         }
    8400             :                 }
    8401             :         }
    8402           0 :         return py_array;
    8403             : }
    8404             : 
    8405           0 : static int py_srvsvc_NetShareCtr501_set_array(PyObject *py_obj, PyObject *value, void *closure)
    8406             : {
    8407           0 :         struct srvsvc_NetShareCtr501 *object = (struct srvsvc_NetShareCtr501 *)pytalloc_get_ptr(py_obj);
    8408           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    8409           0 :         if (value == NULL) {
    8410           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
    8411           0 :                 return -1;
    8412             :         }
    8413           0 :         if (value == Py_None) {
    8414           0 :                 object->array = NULL;
    8415             :         } else {
    8416           0 :                 object->array = NULL;
    8417           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    8418             :                 {
    8419             :                         int array_cntr_1;
    8420           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    8421           0 :                         if (!object->array) { return -1;; }
    8422           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    8423           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    8424           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    8425           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
    8426           0 :                                         return -1;
    8427             :                                 }
    8428           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo501_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    8429           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    8430           0 :                                         PyErr_NoMemory();
    8431           0 :                                         return -1;
    8432             :                                 }
    8433           0 :                                 object->array[array_cntr_1] = *(struct srvsvc_NetShareInfo501 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    8434             :                         }
    8435             :                 }
    8436             :         }
    8437           0 :         return 0;
    8438             : }
    8439             : 
    8440             : static PyGetSetDef py_srvsvc_NetShareCtr501_getsetters[] = {
    8441             :         {
    8442             :                 .name = discard_const_p(char, "count"),
    8443             :                 .get = py_srvsvc_NetShareCtr501_get_count,
    8444             :                 .set = py_srvsvc_NetShareCtr501_set_count,
    8445             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8446             :         },
    8447             :         {
    8448             :                 .name = discard_const_p(char, "array"),
    8449             :                 .get = py_srvsvc_NetShareCtr501_get_array,
    8450             :                 .set = py_srvsvc_NetShareCtr501_set_array,
    8451             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfo501")
    8452             :         },
    8453             :         { .name = NULL }
    8454             : };
    8455             : 
    8456           0 : static PyObject *py_srvsvc_NetShareCtr501_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    8457             : {
    8458           0 :         return pytalloc_new(struct srvsvc_NetShareCtr501, type);
    8459             : }
    8460             : 
    8461             : 
    8462             : static PyTypeObject srvsvc_NetShareCtr501_Type = {
    8463             :         PyVarObject_HEAD_INIT(NULL, 0)
    8464             :         .tp_name = "srvsvc.NetShareCtr501",
    8465             :         .tp_getset = py_srvsvc_NetShareCtr501_getsetters,
    8466             :         .tp_methods = NULL,
    8467             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    8468             :         .tp_new = py_srvsvc_NetShareCtr501_new,
    8469             : };
    8470             : 
    8471             : 
    8472           0 : static PyObject *py_srvsvc_NetShareInfo502_get_name(PyObject *obj, void *closure)
    8473             : {
    8474           0 :         struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(obj);
    8475             :         PyObject *py_name;
    8476           0 :         if (object->name == NULL) {
    8477           0 :                 Py_RETURN_NONE;
    8478             :         }
    8479           0 :         if (object->name == NULL) {
    8480           0 :                 py_name = Py_None;
    8481           0 :                 Py_INCREF(py_name);
    8482             :         } else {
    8483           0 :                 if (object->name == NULL) {
    8484           0 :                         py_name = Py_None;
    8485           0 :                         Py_INCREF(py_name);
    8486             :                 } else {
    8487           0 :                         py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
    8488             :                 }
    8489             :         }
    8490           0 :         return py_name;
    8491             : }
    8492             : 
    8493           0 : static int py_srvsvc_NetShareInfo502_set_name(PyObject *py_obj, PyObject *value, void *closure)
    8494             : {
    8495           0 :         struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(py_obj);
    8496           0 :         if (value == NULL) {
    8497           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->name");
    8498           0 :                 return -1;
    8499             :         }
    8500           0 :         if (value == Py_None) {
    8501           0 :                 object->name = NULL;
    8502             :         } else {
    8503           0 :                 object->name = NULL;
    8504             :                 {
    8505             :                         const char *test_str;
    8506             :                         const char *talloc_str;
    8507           0 :                         PyObject *unicode = NULL;
    8508           0 :                         if (PyUnicode_Check(value)) {
    8509           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    8510           0 :                                 if (unicode == NULL) {
    8511           0 :                                         PyErr_NoMemory();
    8512           0 :                                         return -1;
    8513             :                                 }
    8514           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    8515           0 :                         } else if (PyBytes_Check(value)) {
    8516           0 :                                 test_str = PyBytes_AS_STRING(value);
    8517             :                         } else {
    8518           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    8519           0 :                                 return -1;
    8520             :                         }
    8521           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    8522           0 :                         if (unicode != NULL) {
    8523           0 :                                 Py_DECREF(unicode);
    8524             :                         }
    8525           0 :                         if (talloc_str == NULL) {
    8526           0 :                                 PyErr_NoMemory();
    8527           0 :                                 return -1;
    8528             :                         }
    8529           0 :                         object->name = talloc_str;
    8530             :                 }
    8531             :         }
    8532           0 :         return 0;
    8533             : }
    8534             : 
    8535           0 : static PyObject *py_srvsvc_NetShareInfo502_get_type(PyObject *obj, void *closure)
    8536             : {
    8537           0 :         struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(obj);
    8538             :         PyObject *py_type;
    8539           0 :         py_type = PyLong_FromUnsignedLongLong((uint32_t)object->type);
    8540           0 :         return py_type;
    8541             : }
    8542             : 
    8543           0 : static int py_srvsvc_NetShareInfo502_set_type(PyObject *py_obj, PyObject *value, void *closure)
    8544             : {
    8545           0 :         struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(py_obj);
    8546           0 :         if (value == NULL) {
    8547           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->type");
    8548           0 :                 return -1;
    8549             :         }
    8550             :         {
    8551           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
    8552           0 :                 if (PyLong_Check(value)) {
    8553             :                         unsigned long long test_var;
    8554           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8555           0 :                         if (PyErr_Occurred() != NULL) {
    8556           0 :                                 return -1;
    8557             :                         }
    8558           0 :                         if (test_var > uint_max) {
    8559           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8560             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8561           0 :                                 return -1;
    8562             :                         }
    8563           0 :                         object->type = test_var;
    8564             :                 } else {
    8565           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8566             :                           PyLong_Type.tp_name);
    8567           0 :                         return -1;
    8568             :                 }
    8569             :         }
    8570           0 :         return 0;
    8571             : }
    8572             : 
    8573           0 : static PyObject *py_srvsvc_NetShareInfo502_get_comment(PyObject *obj, void *closure)
    8574             : {
    8575           0 :         struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(obj);
    8576             :         PyObject *py_comment;
    8577           0 :         if (object->comment == NULL) {
    8578           0 :                 Py_RETURN_NONE;
    8579             :         }
    8580           0 :         if (object->comment == NULL) {
    8581           0 :                 py_comment = Py_None;
    8582           0 :                 Py_INCREF(py_comment);
    8583             :         } else {
    8584           0 :                 if (object->comment == NULL) {
    8585           0 :                         py_comment = Py_None;
    8586           0 :                         Py_INCREF(py_comment);
    8587             :                 } else {
    8588           0 :                         py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
    8589             :                 }
    8590             :         }
    8591           0 :         return py_comment;
    8592             : }
    8593             : 
    8594           0 : static int py_srvsvc_NetShareInfo502_set_comment(PyObject *py_obj, PyObject *value, void *closure)
    8595             : {
    8596           0 :         struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(py_obj);
    8597           0 :         if (value == NULL) {
    8598           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->comment");
    8599           0 :                 return -1;
    8600             :         }
    8601           0 :         if (value == Py_None) {
    8602           0 :                 object->comment = NULL;
    8603             :         } else {
    8604           0 :                 object->comment = NULL;
    8605             :                 {
    8606             :                         const char *test_str;
    8607             :                         const char *talloc_str;
    8608           0 :                         PyObject *unicode = NULL;
    8609           0 :                         if (PyUnicode_Check(value)) {
    8610           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    8611           0 :                                 if (unicode == NULL) {
    8612           0 :                                         PyErr_NoMemory();
    8613           0 :                                         return -1;
    8614             :                                 }
    8615           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    8616           0 :                         } else if (PyBytes_Check(value)) {
    8617           0 :                                 test_str = PyBytes_AS_STRING(value);
    8618             :                         } else {
    8619           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    8620           0 :                                 return -1;
    8621             :                         }
    8622           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    8623           0 :                         if (unicode != NULL) {
    8624           0 :                                 Py_DECREF(unicode);
    8625             :                         }
    8626           0 :                         if (talloc_str == NULL) {
    8627           0 :                                 PyErr_NoMemory();
    8628           0 :                                 return -1;
    8629             :                         }
    8630           0 :                         object->comment = talloc_str;
    8631             :                 }
    8632             :         }
    8633           0 :         return 0;
    8634             : }
    8635             : 
    8636           0 : static PyObject *py_srvsvc_NetShareInfo502_get_permissions(PyObject *obj, void *closure)
    8637             : {
    8638           0 :         struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(obj);
    8639             :         PyObject *py_permissions;
    8640           0 :         py_permissions = PyLong_FromUnsignedLongLong((uint32_t)object->permissions);
    8641           0 :         return py_permissions;
    8642             : }
    8643             : 
    8644           0 : static int py_srvsvc_NetShareInfo502_set_permissions(PyObject *py_obj, PyObject *value, void *closure)
    8645             : {
    8646           0 :         struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(py_obj);
    8647           0 :         if (value == NULL) {
    8648           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->permissions");
    8649           0 :                 return -1;
    8650             :         }
    8651             :         {
    8652           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->permissions));
    8653           0 :                 if (PyLong_Check(value)) {
    8654             :                         unsigned long long test_var;
    8655           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8656           0 :                         if (PyErr_Occurred() != NULL) {
    8657           0 :                                 return -1;
    8658             :                         }
    8659           0 :                         if (test_var > uint_max) {
    8660           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8661             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8662           0 :                                 return -1;
    8663             :                         }
    8664           0 :                         object->permissions = test_var;
    8665             :                 } else {
    8666           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8667             :                           PyLong_Type.tp_name);
    8668           0 :                         return -1;
    8669             :                 }
    8670             :         }
    8671           0 :         return 0;
    8672             : }
    8673             : 
    8674           0 : static PyObject *py_srvsvc_NetShareInfo502_get_max_users(PyObject *obj, void *closure)
    8675             : {
    8676           0 :         struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(obj);
    8677             :         PyObject *py_max_users;
    8678           0 :         py_max_users = PyLong_FromUnsignedLongLong((uint32_t)object->max_users);
    8679           0 :         return py_max_users;
    8680             : }
    8681             : 
    8682           0 : static int py_srvsvc_NetShareInfo502_set_max_users(PyObject *py_obj, PyObject *value, void *closure)
    8683             : {
    8684           0 :         struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(py_obj);
    8685           0 :         if (value == NULL) {
    8686           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->max_users");
    8687           0 :                 return -1;
    8688             :         }
    8689             :         {
    8690           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_users));
    8691           0 :                 if (PyLong_Check(value)) {
    8692             :                         unsigned long long test_var;
    8693           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8694           0 :                         if (PyErr_Occurred() != NULL) {
    8695           0 :                                 return -1;
    8696             :                         }
    8697           0 :                         if (test_var > uint_max) {
    8698           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8699             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8700           0 :                                 return -1;
    8701             :                         }
    8702           0 :                         object->max_users = test_var;
    8703             :                 } else {
    8704           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8705             :                           PyLong_Type.tp_name);
    8706           0 :                         return -1;
    8707             :                 }
    8708             :         }
    8709           0 :         return 0;
    8710             : }
    8711             : 
    8712           0 : static PyObject *py_srvsvc_NetShareInfo502_get_current_users(PyObject *obj, void *closure)
    8713             : {
    8714           0 :         struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(obj);
    8715             :         PyObject *py_current_users;
    8716           0 :         py_current_users = PyLong_FromUnsignedLongLong((uint32_t)object->current_users);
    8717           0 :         return py_current_users;
    8718             : }
    8719             : 
    8720           0 : static int py_srvsvc_NetShareInfo502_set_current_users(PyObject *py_obj, PyObject *value, void *closure)
    8721             : {
    8722           0 :         struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(py_obj);
    8723           0 :         if (value == NULL) {
    8724           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->current_users");
    8725           0 :                 return -1;
    8726             :         }
    8727             :         {
    8728           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->current_users));
    8729           0 :                 if (PyLong_Check(value)) {
    8730             :                         unsigned long long test_var;
    8731           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8732           0 :                         if (PyErr_Occurred() != NULL) {
    8733           0 :                                 return -1;
    8734             :                         }
    8735           0 :                         if (test_var > uint_max) {
    8736           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8737             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8738           0 :                                 return -1;
    8739             :                         }
    8740           0 :                         object->current_users = test_var;
    8741             :                 } else {
    8742           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8743             :                           PyLong_Type.tp_name);
    8744           0 :                         return -1;
    8745             :                 }
    8746             :         }
    8747           0 :         return 0;
    8748             : }
    8749             : 
    8750           0 : static PyObject *py_srvsvc_NetShareInfo502_get_path(PyObject *obj, void *closure)
    8751             : {
    8752           0 :         struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(obj);
    8753             :         PyObject *py_path;
    8754           0 :         if (object->path == NULL) {
    8755           0 :                 Py_RETURN_NONE;
    8756             :         }
    8757           0 :         if (object->path == NULL) {
    8758           0 :                 py_path = Py_None;
    8759           0 :                 Py_INCREF(py_path);
    8760             :         } else {
    8761           0 :                 if (object->path == NULL) {
    8762           0 :                         py_path = Py_None;
    8763           0 :                         Py_INCREF(py_path);
    8764             :                 } else {
    8765           0 :                         py_path = PyUnicode_Decode(object->path, strlen(object->path), "utf-8", "ignore");
    8766             :                 }
    8767             :         }
    8768           0 :         return py_path;
    8769             : }
    8770             : 
    8771           0 : static int py_srvsvc_NetShareInfo502_set_path(PyObject *py_obj, PyObject *value, void *closure)
    8772             : {
    8773           0 :         struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(py_obj);
    8774           0 :         if (value == NULL) {
    8775           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->path");
    8776           0 :                 return -1;
    8777             :         }
    8778           0 :         if (value == Py_None) {
    8779           0 :                 object->path = NULL;
    8780             :         } else {
    8781           0 :                 object->path = NULL;
    8782             :                 {
    8783             :                         const char *test_str;
    8784             :                         const char *talloc_str;
    8785           0 :                         PyObject *unicode = NULL;
    8786           0 :                         if (PyUnicode_Check(value)) {
    8787           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    8788           0 :                                 if (unicode == NULL) {
    8789           0 :                                         PyErr_NoMemory();
    8790           0 :                                         return -1;
    8791             :                                 }
    8792           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    8793           0 :                         } else if (PyBytes_Check(value)) {
    8794           0 :                                 test_str = PyBytes_AS_STRING(value);
    8795             :                         } else {
    8796           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    8797           0 :                                 return -1;
    8798             :                         }
    8799           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    8800           0 :                         if (unicode != NULL) {
    8801           0 :                                 Py_DECREF(unicode);
    8802             :                         }
    8803           0 :                         if (talloc_str == NULL) {
    8804           0 :                                 PyErr_NoMemory();
    8805           0 :                                 return -1;
    8806             :                         }
    8807           0 :                         object->path = talloc_str;
    8808             :                 }
    8809             :         }
    8810           0 :         return 0;
    8811             : }
    8812             : 
    8813           0 : static PyObject *py_srvsvc_NetShareInfo502_get_password(PyObject *obj, void *closure)
    8814             : {
    8815           0 :         struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(obj);
    8816             :         PyObject *py_password;
    8817           0 :         if (object->password == NULL) {
    8818           0 :                 Py_RETURN_NONE;
    8819             :         }
    8820           0 :         if (object->password == NULL) {
    8821           0 :                 py_password = Py_None;
    8822           0 :                 Py_INCREF(py_password);
    8823             :         } else {
    8824           0 :                 if (object->password == NULL) {
    8825           0 :                         py_password = Py_None;
    8826           0 :                         Py_INCREF(py_password);
    8827             :                 } else {
    8828           0 :                         py_password = PyUnicode_Decode(object->password, strlen(object->password), "utf-8", "ignore");
    8829             :                 }
    8830             :         }
    8831           0 :         return py_password;
    8832             : }
    8833             : 
    8834           0 : static int py_srvsvc_NetShareInfo502_set_password(PyObject *py_obj, PyObject *value, void *closure)
    8835             : {
    8836           0 :         struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(py_obj);
    8837           0 :         if (value == NULL) {
    8838           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->password");
    8839           0 :                 return -1;
    8840             :         }
    8841           0 :         if (value == Py_None) {
    8842           0 :                 object->password = NULL;
    8843             :         } else {
    8844           0 :                 object->password = NULL;
    8845             :                 {
    8846             :                         const char *test_str;
    8847             :                         const char *talloc_str;
    8848           0 :                         PyObject *unicode = NULL;
    8849           0 :                         if (PyUnicode_Check(value)) {
    8850           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    8851           0 :                                 if (unicode == NULL) {
    8852           0 :                                         PyErr_NoMemory();
    8853           0 :                                         return -1;
    8854             :                                 }
    8855           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    8856           0 :                         } else if (PyBytes_Check(value)) {
    8857           0 :                                 test_str = PyBytes_AS_STRING(value);
    8858             :                         } else {
    8859           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    8860           0 :                                 return -1;
    8861             :                         }
    8862           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    8863           0 :                         if (unicode != NULL) {
    8864           0 :                                 Py_DECREF(unicode);
    8865             :                         }
    8866           0 :                         if (talloc_str == NULL) {
    8867           0 :                                 PyErr_NoMemory();
    8868           0 :                                 return -1;
    8869             :                         }
    8870           0 :                         object->password = talloc_str;
    8871             :                 }
    8872             :         }
    8873           0 :         return 0;
    8874             : }
    8875             : 
    8876           0 : static PyObject *py_srvsvc_NetShareInfo502_get_sd_buf(PyObject *obj, void *closure)
    8877             : {
    8878           0 :         struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(obj);
    8879             :         PyObject *py_sd_buf;
    8880           0 :         py_sd_buf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sd_buf);
    8881           0 :         return py_sd_buf;
    8882             : }
    8883             : 
    8884           0 : static int py_srvsvc_NetShareInfo502_set_sd_buf(PyObject *py_obj, PyObject *value, void *closure)
    8885             : {
    8886           0 :         struct srvsvc_NetShareInfo502 *object = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(py_obj);
    8887           0 :         if (value == NULL) {
    8888           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sd_buf");
    8889           0 :                 return -1;
    8890             :         }
    8891           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
    8892           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8893           0 :                 PyErr_NoMemory();
    8894           0 :                 return -1;
    8895             :         }
    8896           0 :         object->sd_buf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
    8897           0 :         return 0;
    8898             : }
    8899             : 
    8900             : static PyGetSetDef py_srvsvc_NetShareInfo502_getsetters[] = {
    8901             :         {
    8902             :                 .name = discard_const_p(char, "name"),
    8903             :                 .get = py_srvsvc_NetShareInfo502_get_name,
    8904             :                 .set = py_srvsvc_NetShareInfo502_set_name,
    8905             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    8906             :         },
    8907             :         {
    8908             :                 .name = discard_const_p(char, "type"),
    8909             :                 .get = py_srvsvc_NetShareInfo502_get_type,
    8910             :                 .set = py_srvsvc_NetShareInfo502_set_type,
    8911             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_ShareType")
    8912             :         },
    8913             :         {
    8914             :                 .name = discard_const_p(char, "comment"),
    8915             :                 .get = py_srvsvc_NetShareInfo502_get_comment,
    8916             :                 .set = py_srvsvc_NetShareInfo502_set_comment,
    8917             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    8918             :         },
    8919             :         {
    8920             :                 .name = discard_const_p(char, "permissions"),
    8921             :                 .get = py_srvsvc_NetShareInfo502_get_permissions,
    8922             :                 .set = py_srvsvc_NetShareInfo502_set_permissions,
    8923             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8924             :         },
    8925             :         {
    8926             :                 .name = discard_const_p(char, "max_users"),
    8927             :                 .get = py_srvsvc_NetShareInfo502_get_max_users,
    8928             :                 .set = py_srvsvc_NetShareInfo502_set_max_users,
    8929             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8930             :         },
    8931             :         {
    8932             :                 .name = discard_const_p(char, "current_users"),
    8933             :                 .get = py_srvsvc_NetShareInfo502_get_current_users,
    8934             :                 .set = py_srvsvc_NetShareInfo502_set_current_users,
    8935             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8936             :         },
    8937             :         {
    8938             :                 .name = discard_const_p(char, "path"),
    8939             :                 .get = py_srvsvc_NetShareInfo502_get_path,
    8940             :                 .set = py_srvsvc_NetShareInfo502_set_path,
    8941             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    8942             :         },
    8943             :         {
    8944             :                 .name = discard_const_p(char, "password"),
    8945             :                 .get = py_srvsvc_NetShareInfo502_get_password,
    8946             :                 .set = py_srvsvc_NetShareInfo502_set_password,
    8947             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    8948             :         },
    8949             :         {
    8950             :                 .name = discard_const_p(char, "sd_buf"),
    8951             :                 .get = py_srvsvc_NetShareInfo502_get_sd_buf,
    8952             :                 .set = py_srvsvc_NetShareInfo502_set_sd_buf,
    8953             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
    8954             :         },
    8955             :         { .name = NULL }
    8956             : };
    8957             : 
    8958           0 : static PyObject *py_srvsvc_NetShareInfo502_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    8959             : {
    8960           0 :         return pytalloc_new(struct srvsvc_NetShareInfo502, type);
    8961             : }
    8962             : 
    8963             : 
    8964             : static PyTypeObject srvsvc_NetShareInfo502_Type = {
    8965             :         PyVarObject_HEAD_INIT(NULL, 0)
    8966             :         .tp_name = "srvsvc.NetShareInfo502",
    8967             :         .tp_getset = py_srvsvc_NetShareInfo502_getsetters,
    8968             :         .tp_methods = NULL,
    8969             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    8970             :         .tp_new = py_srvsvc_NetShareInfo502_new,
    8971             : };
    8972             : 
    8973             : 
    8974           0 : static PyObject *py_srvsvc_NetShareCtr502_get_count(PyObject *obj, void *closure)
    8975             : {
    8976           0 :         struct srvsvc_NetShareCtr502 *object = (struct srvsvc_NetShareCtr502 *)pytalloc_get_ptr(obj);
    8977             :         PyObject *py_count;
    8978           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
    8979           0 :         return py_count;
    8980             : }
    8981             : 
    8982           0 : static int py_srvsvc_NetShareCtr502_set_count(PyObject *py_obj, PyObject *value, void *closure)
    8983             : {
    8984           0 :         struct srvsvc_NetShareCtr502 *object = (struct srvsvc_NetShareCtr502 *)pytalloc_get_ptr(py_obj);
    8985           0 :         if (value == NULL) {
    8986           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
    8987           0 :                 return -1;
    8988             :         }
    8989             :         {
    8990           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    8991           0 :                 if (PyLong_Check(value)) {
    8992             :                         unsigned long long test_var;
    8993           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8994           0 :                         if (PyErr_Occurred() != NULL) {
    8995           0 :                                 return -1;
    8996             :                         }
    8997           0 :                         if (test_var > uint_max) {
    8998           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8999             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9000           0 :                                 return -1;
    9001             :                         }
    9002           0 :                         object->count = test_var;
    9003             :                 } else {
    9004           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9005             :                           PyLong_Type.tp_name);
    9006           0 :                         return -1;
    9007             :                 }
    9008             :         }
    9009           0 :         return 0;
    9010             : }
    9011             : 
    9012           0 : static PyObject *py_srvsvc_NetShareCtr502_get_array(PyObject *obj, void *closure)
    9013             : {
    9014           0 :         struct srvsvc_NetShareCtr502 *object = (struct srvsvc_NetShareCtr502 *)pytalloc_get_ptr(obj);
    9015             :         PyObject *py_array;
    9016           0 :         if (object->array == NULL) {
    9017           0 :                 Py_RETURN_NONE;
    9018             :         }
    9019           0 :         if (object->array == NULL) {
    9020           0 :                 py_array = Py_None;
    9021           0 :                 Py_INCREF(py_array);
    9022             :         } else {
    9023           0 :                 py_array = PyList_New(object->count);
    9024           0 :                 if (py_array == NULL) {
    9025           0 :                         return NULL;
    9026             :                 }
    9027             :                 {
    9028             :                         int array_cntr_1;
    9029           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    9030             :                                 PyObject *py_array_1;
    9031           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo502_Type, object->array, &object->array[array_cntr_1]);
    9032           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    9033             :                         }
    9034             :                 }
    9035             :         }
    9036           0 :         return py_array;
    9037             : }
    9038             : 
    9039           0 : static int py_srvsvc_NetShareCtr502_set_array(PyObject *py_obj, PyObject *value, void *closure)
    9040             : {
    9041           0 :         struct srvsvc_NetShareCtr502 *object = (struct srvsvc_NetShareCtr502 *)pytalloc_get_ptr(py_obj);
    9042           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    9043           0 :         if (value == NULL) {
    9044           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
    9045           0 :                 return -1;
    9046             :         }
    9047           0 :         if (value == Py_None) {
    9048           0 :                 object->array = NULL;
    9049             :         } else {
    9050           0 :                 object->array = NULL;
    9051           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    9052             :                 {
    9053             :                         int array_cntr_1;
    9054           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    9055           0 :                         if (!object->array) { return -1;; }
    9056           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    9057           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    9058           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    9059           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
    9060           0 :                                         return -1;
    9061             :                                 }
    9062           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo502_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    9063           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    9064           0 :                                         PyErr_NoMemory();
    9065           0 :                                         return -1;
    9066             :                                 }
    9067           0 :                                 object->array[array_cntr_1] = *(struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    9068             :                         }
    9069             :                 }
    9070             :         }
    9071           0 :         return 0;
    9072             : }
    9073             : 
    9074             : static PyGetSetDef py_srvsvc_NetShareCtr502_getsetters[] = {
    9075             :         {
    9076             :                 .name = discard_const_p(char, "count"),
    9077             :                 .get = py_srvsvc_NetShareCtr502_get_count,
    9078             :                 .set = py_srvsvc_NetShareCtr502_set_count,
    9079             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9080             :         },
    9081             :         {
    9082             :                 .name = discard_const_p(char, "array"),
    9083             :                 .get = py_srvsvc_NetShareCtr502_get_array,
    9084             :                 .set = py_srvsvc_NetShareCtr502_set_array,
    9085             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfo502")
    9086             :         },
    9087             :         { .name = NULL }
    9088             : };
    9089             : 
    9090           0 : static PyObject *py_srvsvc_NetShareCtr502_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9091             : {
    9092           0 :         return pytalloc_new(struct srvsvc_NetShareCtr502, type);
    9093             : }
    9094             : 
    9095             : 
    9096             : static PyTypeObject srvsvc_NetShareCtr502_Type = {
    9097             :         PyVarObject_HEAD_INIT(NULL, 0)
    9098             :         .tp_name = "srvsvc.NetShareCtr502",
    9099             :         .tp_getset = py_srvsvc_NetShareCtr502_getsetters,
    9100             :         .tp_methods = NULL,
    9101             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9102             :         .tp_new = py_srvsvc_NetShareCtr502_new,
    9103             : };
    9104             : 
    9105             : 
    9106           0 : static PyObject *py_srvsvc_NetShareInfo1004_get_comment(PyObject *obj, void *closure)
    9107             : {
    9108           0 :         struct srvsvc_NetShareInfo1004 *object = (struct srvsvc_NetShareInfo1004 *)pytalloc_get_ptr(obj);
    9109             :         PyObject *py_comment;
    9110           0 :         if (object->comment == NULL) {
    9111           0 :                 Py_RETURN_NONE;
    9112             :         }
    9113           0 :         if (object->comment == NULL) {
    9114           0 :                 py_comment = Py_None;
    9115           0 :                 Py_INCREF(py_comment);
    9116             :         } else {
    9117           0 :                 if (object->comment == NULL) {
    9118           0 :                         py_comment = Py_None;
    9119           0 :                         Py_INCREF(py_comment);
    9120             :                 } else {
    9121           0 :                         py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
    9122             :                 }
    9123             :         }
    9124           0 :         return py_comment;
    9125             : }
    9126             : 
    9127           0 : static int py_srvsvc_NetShareInfo1004_set_comment(PyObject *py_obj, PyObject *value, void *closure)
    9128             : {
    9129           0 :         struct srvsvc_NetShareInfo1004 *object = (struct srvsvc_NetShareInfo1004 *)pytalloc_get_ptr(py_obj);
    9130           0 :         if (value == NULL) {
    9131           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->comment");
    9132           0 :                 return -1;
    9133             :         }
    9134           0 :         if (value == Py_None) {
    9135           0 :                 object->comment = NULL;
    9136             :         } else {
    9137           0 :                 object->comment = NULL;
    9138             :                 {
    9139             :                         const char *test_str;
    9140             :                         const char *talloc_str;
    9141           0 :                         PyObject *unicode = NULL;
    9142           0 :                         if (PyUnicode_Check(value)) {
    9143           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    9144           0 :                                 if (unicode == NULL) {
    9145           0 :                                         PyErr_NoMemory();
    9146           0 :                                         return -1;
    9147             :                                 }
    9148           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    9149           0 :                         } else if (PyBytes_Check(value)) {
    9150           0 :                                 test_str = PyBytes_AS_STRING(value);
    9151             :                         } else {
    9152           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    9153           0 :                                 return -1;
    9154             :                         }
    9155           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    9156           0 :                         if (unicode != NULL) {
    9157           0 :                                 Py_DECREF(unicode);
    9158             :                         }
    9159           0 :                         if (talloc_str == NULL) {
    9160           0 :                                 PyErr_NoMemory();
    9161           0 :                                 return -1;
    9162             :                         }
    9163           0 :                         object->comment = talloc_str;
    9164             :                 }
    9165             :         }
    9166           0 :         return 0;
    9167             : }
    9168             : 
    9169             : static PyGetSetDef py_srvsvc_NetShareInfo1004_getsetters[] = {
    9170             :         {
    9171             :                 .name = discard_const_p(char, "comment"),
    9172             :                 .get = py_srvsvc_NetShareInfo1004_get_comment,
    9173             :                 .set = py_srvsvc_NetShareInfo1004_set_comment,
    9174             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    9175             :         },
    9176             :         { .name = NULL }
    9177             : };
    9178             : 
    9179           0 : static PyObject *py_srvsvc_NetShareInfo1004_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9180             : {
    9181           0 :         return pytalloc_new(struct srvsvc_NetShareInfo1004, type);
    9182             : }
    9183             : 
    9184             : 
    9185             : static PyTypeObject srvsvc_NetShareInfo1004_Type = {
    9186             :         PyVarObject_HEAD_INIT(NULL, 0)
    9187             :         .tp_name = "srvsvc.NetShareInfo1004",
    9188             :         .tp_getset = py_srvsvc_NetShareInfo1004_getsetters,
    9189             :         .tp_methods = NULL,
    9190             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9191             :         .tp_new = py_srvsvc_NetShareInfo1004_new,
    9192             : };
    9193             : 
    9194             : 
    9195           0 : static PyObject *py_srvsvc_NetShareCtr1004_get_count(PyObject *obj, void *closure)
    9196             : {
    9197           0 :         struct srvsvc_NetShareCtr1004 *object = (struct srvsvc_NetShareCtr1004 *)pytalloc_get_ptr(obj);
    9198             :         PyObject *py_count;
    9199           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
    9200           0 :         return py_count;
    9201             : }
    9202             : 
    9203           0 : static int py_srvsvc_NetShareCtr1004_set_count(PyObject *py_obj, PyObject *value, void *closure)
    9204             : {
    9205           0 :         struct srvsvc_NetShareCtr1004 *object = (struct srvsvc_NetShareCtr1004 *)pytalloc_get_ptr(py_obj);
    9206           0 :         if (value == NULL) {
    9207           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
    9208           0 :                 return -1;
    9209             :         }
    9210             :         {
    9211           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    9212           0 :                 if (PyLong_Check(value)) {
    9213             :                         unsigned long long test_var;
    9214           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9215           0 :                         if (PyErr_Occurred() != NULL) {
    9216           0 :                                 return -1;
    9217             :                         }
    9218           0 :                         if (test_var > uint_max) {
    9219           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9220             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9221           0 :                                 return -1;
    9222             :                         }
    9223           0 :                         object->count = test_var;
    9224             :                 } else {
    9225           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9226             :                           PyLong_Type.tp_name);
    9227           0 :                         return -1;
    9228             :                 }
    9229             :         }
    9230           0 :         return 0;
    9231             : }
    9232             : 
    9233           0 : static PyObject *py_srvsvc_NetShareCtr1004_get_array(PyObject *obj, void *closure)
    9234             : {
    9235           0 :         struct srvsvc_NetShareCtr1004 *object = (struct srvsvc_NetShareCtr1004 *)pytalloc_get_ptr(obj);
    9236             :         PyObject *py_array;
    9237           0 :         if (object->array == NULL) {
    9238           0 :                 Py_RETURN_NONE;
    9239             :         }
    9240           0 :         if (object->array == NULL) {
    9241           0 :                 py_array = Py_None;
    9242           0 :                 Py_INCREF(py_array);
    9243             :         } else {
    9244           0 :                 py_array = PyList_New(object->count);
    9245           0 :                 if (py_array == NULL) {
    9246           0 :                         return NULL;
    9247             :                 }
    9248             :                 {
    9249             :                         int array_cntr_1;
    9250           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    9251             :                                 PyObject *py_array_1;
    9252           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo1004_Type, object->array, &object->array[array_cntr_1]);
    9253           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    9254             :                         }
    9255             :                 }
    9256             :         }
    9257           0 :         return py_array;
    9258             : }
    9259             : 
    9260           0 : static int py_srvsvc_NetShareCtr1004_set_array(PyObject *py_obj, PyObject *value, void *closure)
    9261             : {
    9262           0 :         struct srvsvc_NetShareCtr1004 *object = (struct srvsvc_NetShareCtr1004 *)pytalloc_get_ptr(py_obj);
    9263           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    9264           0 :         if (value == NULL) {
    9265           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
    9266           0 :                 return -1;
    9267             :         }
    9268           0 :         if (value == Py_None) {
    9269           0 :                 object->array = NULL;
    9270             :         } else {
    9271           0 :                 object->array = NULL;
    9272           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    9273             :                 {
    9274             :                         int array_cntr_1;
    9275           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    9276           0 :                         if (!object->array) { return -1;; }
    9277           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    9278           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    9279           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    9280           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
    9281           0 :                                         return -1;
    9282             :                                 }
    9283           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo1004_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    9284           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    9285           0 :                                         PyErr_NoMemory();
    9286           0 :                                         return -1;
    9287             :                                 }
    9288           0 :                                 object->array[array_cntr_1] = *(struct srvsvc_NetShareInfo1004 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    9289             :                         }
    9290             :                 }
    9291             :         }
    9292           0 :         return 0;
    9293             : }
    9294             : 
    9295             : static PyGetSetDef py_srvsvc_NetShareCtr1004_getsetters[] = {
    9296             :         {
    9297             :                 .name = discard_const_p(char, "count"),
    9298             :                 .get = py_srvsvc_NetShareCtr1004_get_count,
    9299             :                 .set = py_srvsvc_NetShareCtr1004_set_count,
    9300             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9301             :         },
    9302             :         {
    9303             :                 .name = discard_const_p(char, "array"),
    9304             :                 .get = py_srvsvc_NetShareCtr1004_get_array,
    9305             :                 .set = py_srvsvc_NetShareCtr1004_set_array,
    9306             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfo1004")
    9307             :         },
    9308             :         { .name = NULL }
    9309             : };
    9310             : 
    9311           0 : static PyObject *py_srvsvc_NetShareCtr1004_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9312             : {
    9313           0 :         return pytalloc_new(struct srvsvc_NetShareCtr1004, type);
    9314             : }
    9315             : 
    9316             : 
    9317             : static PyTypeObject srvsvc_NetShareCtr1004_Type = {
    9318             :         PyVarObject_HEAD_INIT(NULL, 0)
    9319             :         .tp_name = "srvsvc.NetShareCtr1004",
    9320             :         .tp_getset = py_srvsvc_NetShareCtr1004_getsetters,
    9321             :         .tp_methods = NULL,
    9322             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9323             :         .tp_new = py_srvsvc_NetShareCtr1004_new,
    9324             : };
    9325             : 
    9326             : 
    9327           0 : static PyObject *py_srvsvc_NetShareInfo1005_get_dfs_flags(PyObject *obj, void *closure)
    9328             : {
    9329           0 :         struct srvsvc_NetShareInfo1005 *object = (struct srvsvc_NetShareInfo1005 *)pytalloc_get_ptr(obj);
    9330             :         PyObject *py_dfs_flags;
    9331           0 :         py_dfs_flags = PyLong_FromUnsignedLongLong((uint32_t)object->dfs_flags);
    9332           0 :         return py_dfs_flags;
    9333             : }
    9334             : 
    9335           0 : static int py_srvsvc_NetShareInfo1005_set_dfs_flags(PyObject *py_obj, PyObject *value, void *closure)
    9336             : {
    9337           0 :         struct srvsvc_NetShareInfo1005 *object = (struct srvsvc_NetShareInfo1005 *)pytalloc_get_ptr(py_obj);
    9338           0 :         if (value == NULL) {
    9339           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dfs_flags");
    9340           0 :                 return -1;
    9341             :         }
    9342             :         {
    9343           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dfs_flags));
    9344           0 :                 if (PyLong_Check(value)) {
    9345             :                         unsigned long long test_var;
    9346           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9347           0 :                         if (PyErr_Occurred() != NULL) {
    9348           0 :                                 return -1;
    9349             :                         }
    9350           0 :                         if (test_var > uint_max) {
    9351           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9352             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9353           0 :                                 return -1;
    9354             :                         }
    9355           0 :                         object->dfs_flags = test_var;
    9356             :                 } else {
    9357           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9358             :                           PyLong_Type.tp_name);
    9359           0 :                         return -1;
    9360             :                 }
    9361             :         }
    9362           0 :         return 0;
    9363             : }
    9364             : 
    9365             : static PyGetSetDef py_srvsvc_NetShareInfo1005_getsetters[] = {
    9366             :         {
    9367             :                 .name = discard_const_p(char, "dfs_flags"),
    9368             :                 .get = py_srvsvc_NetShareInfo1005_get_dfs_flags,
    9369             :                 .set = py_srvsvc_NetShareInfo1005_set_dfs_flags,
    9370             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NetShareInfo1005Flags")
    9371             :         },
    9372             :         { .name = NULL }
    9373             : };
    9374             : 
    9375           0 : static PyObject *py_srvsvc_NetShareInfo1005_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9376             : {
    9377           0 :         return pytalloc_new(struct srvsvc_NetShareInfo1005, type);
    9378             : }
    9379             : 
    9380             : 
    9381             : static PyTypeObject srvsvc_NetShareInfo1005_Type = {
    9382             :         PyVarObject_HEAD_INIT(NULL, 0)
    9383             :         .tp_name = "srvsvc.NetShareInfo1005",
    9384             :         .tp_getset = py_srvsvc_NetShareInfo1005_getsetters,
    9385             :         .tp_methods = NULL,
    9386             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9387             :         .tp_new = py_srvsvc_NetShareInfo1005_new,
    9388             : };
    9389             : 
    9390             : 
    9391           0 : static PyObject *py_srvsvc_NetShareCtr1005_get_count(PyObject *obj, void *closure)
    9392             : {
    9393           0 :         struct srvsvc_NetShareCtr1005 *object = (struct srvsvc_NetShareCtr1005 *)pytalloc_get_ptr(obj);
    9394             :         PyObject *py_count;
    9395           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
    9396           0 :         return py_count;
    9397             : }
    9398             : 
    9399           0 : static int py_srvsvc_NetShareCtr1005_set_count(PyObject *py_obj, PyObject *value, void *closure)
    9400             : {
    9401           0 :         struct srvsvc_NetShareCtr1005 *object = (struct srvsvc_NetShareCtr1005 *)pytalloc_get_ptr(py_obj);
    9402           0 :         if (value == NULL) {
    9403           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
    9404           0 :                 return -1;
    9405             :         }
    9406             :         {
    9407           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    9408           0 :                 if (PyLong_Check(value)) {
    9409             :                         unsigned long long test_var;
    9410           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9411           0 :                         if (PyErr_Occurred() != NULL) {
    9412           0 :                                 return -1;
    9413             :                         }
    9414           0 :                         if (test_var > uint_max) {
    9415           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9416             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9417           0 :                                 return -1;
    9418             :                         }
    9419           0 :                         object->count = test_var;
    9420             :                 } else {
    9421           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9422             :                           PyLong_Type.tp_name);
    9423           0 :                         return -1;
    9424             :                 }
    9425             :         }
    9426           0 :         return 0;
    9427             : }
    9428             : 
    9429           0 : static PyObject *py_srvsvc_NetShareCtr1005_get_array(PyObject *obj, void *closure)
    9430             : {
    9431           0 :         struct srvsvc_NetShareCtr1005 *object = (struct srvsvc_NetShareCtr1005 *)pytalloc_get_ptr(obj);
    9432             :         PyObject *py_array;
    9433           0 :         if (object->array == NULL) {
    9434           0 :                 Py_RETURN_NONE;
    9435             :         }
    9436           0 :         if (object->array == NULL) {
    9437           0 :                 py_array = Py_None;
    9438           0 :                 Py_INCREF(py_array);
    9439             :         } else {
    9440           0 :                 py_array = PyList_New(object->count);
    9441           0 :                 if (py_array == NULL) {
    9442           0 :                         return NULL;
    9443             :                 }
    9444             :                 {
    9445             :                         int array_cntr_1;
    9446           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    9447             :                                 PyObject *py_array_1;
    9448           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo1005_Type, object->array, &object->array[array_cntr_1]);
    9449           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    9450             :                         }
    9451             :                 }
    9452             :         }
    9453           0 :         return py_array;
    9454             : }
    9455             : 
    9456           0 : static int py_srvsvc_NetShareCtr1005_set_array(PyObject *py_obj, PyObject *value, void *closure)
    9457             : {
    9458           0 :         struct srvsvc_NetShareCtr1005 *object = (struct srvsvc_NetShareCtr1005 *)pytalloc_get_ptr(py_obj);
    9459           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    9460           0 :         if (value == NULL) {
    9461           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
    9462           0 :                 return -1;
    9463             :         }
    9464           0 :         if (value == Py_None) {
    9465           0 :                 object->array = NULL;
    9466             :         } else {
    9467           0 :                 object->array = NULL;
    9468           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    9469             :                 {
    9470             :                         int array_cntr_1;
    9471           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    9472           0 :                         if (!object->array) { return -1;; }
    9473           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    9474           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    9475           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    9476           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
    9477           0 :                                         return -1;
    9478             :                                 }
    9479           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo1005_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    9480           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    9481           0 :                                         PyErr_NoMemory();
    9482           0 :                                         return -1;
    9483             :                                 }
    9484           0 :                                 object->array[array_cntr_1] = *(struct srvsvc_NetShareInfo1005 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    9485             :                         }
    9486             :                 }
    9487             :         }
    9488           0 :         return 0;
    9489             : }
    9490             : 
    9491             : static PyGetSetDef py_srvsvc_NetShareCtr1005_getsetters[] = {
    9492             :         {
    9493             :                 .name = discard_const_p(char, "count"),
    9494             :                 .get = py_srvsvc_NetShareCtr1005_get_count,
    9495             :                 .set = py_srvsvc_NetShareCtr1005_set_count,
    9496             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9497             :         },
    9498             :         {
    9499             :                 .name = discard_const_p(char, "array"),
    9500             :                 .get = py_srvsvc_NetShareCtr1005_get_array,
    9501             :                 .set = py_srvsvc_NetShareCtr1005_set_array,
    9502             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfo1005")
    9503             :         },
    9504             :         { .name = NULL }
    9505             : };
    9506             : 
    9507           0 : static PyObject *py_srvsvc_NetShareCtr1005_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9508             : {
    9509           0 :         return pytalloc_new(struct srvsvc_NetShareCtr1005, type);
    9510             : }
    9511             : 
    9512             : 
    9513             : static PyTypeObject srvsvc_NetShareCtr1005_Type = {
    9514             :         PyVarObject_HEAD_INIT(NULL, 0)
    9515             :         .tp_name = "srvsvc.NetShareCtr1005",
    9516             :         .tp_getset = py_srvsvc_NetShareCtr1005_getsetters,
    9517             :         .tp_methods = NULL,
    9518             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9519             :         .tp_new = py_srvsvc_NetShareCtr1005_new,
    9520             : };
    9521             : 
    9522             : 
    9523           0 : static PyObject *py_srvsvc_NetShareInfo1006_get_max_users(PyObject *obj, void *closure)
    9524             : {
    9525           0 :         struct srvsvc_NetShareInfo1006 *object = (struct srvsvc_NetShareInfo1006 *)pytalloc_get_ptr(obj);
    9526             :         PyObject *py_max_users;
    9527           0 :         py_max_users = PyLong_FromUnsignedLongLong((uint32_t)object->max_users);
    9528           0 :         return py_max_users;
    9529             : }
    9530             : 
    9531           0 : static int py_srvsvc_NetShareInfo1006_set_max_users(PyObject *py_obj, PyObject *value, void *closure)
    9532             : {
    9533           0 :         struct srvsvc_NetShareInfo1006 *object = (struct srvsvc_NetShareInfo1006 *)pytalloc_get_ptr(py_obj);
    9534           0 :         if (value == NULL) {
    9535           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->max_users");
    9536           0 :                 return -1;
    9537             :         }
    9538             :         {
    9539           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_users));
    9540           0 :                 if (PyLong_Check(value)) {
    9541             :                         unsigned long long test_var;
    9542           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9543           0 :                         if (PyErr_Occurred() != NULL) {
    9544           0 :                                 return -1;
    9545             :                         }
    9546           0 :                         if (test_var > uint_max) {
    9547           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9548             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9549           0 :                                 return -1;
    9550             :                         }
    9551           0 :                         object->max_users = test_var;
    9552             :                 } else {
    9553           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9554             :                           PyLong_Type.tp_name);
    9555           0 :                         return -1;
    9556             :                 }
    9557             :         }
    9558           0 :         return 0;
    9559             : }
    9560             : 
    9561             : static PyGetSetDef py_srvsvc_NetShareInfo1006_getsetters[] = {
    9562             :         {
    9563             :                 .name = discard_const_p(char, "max_users"),
    9564             :                 .get = py_srvsvc_NetShareInfo1006_get_max_users,
    9565             :                 .set = py_srvsvc_NetShareInfo1006_set_max_users,
    9566             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9567             :         },
    9568             :         { .name = NULL }
    9569             : };
    9570             : 
    9571           0 : static PyObject *py_srvsvc_NetShareInfo1006_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9572             : {
    9573           0 :         return pytalloc_new(struct srvsvc_NetShareInfo1006, type);
    9574             : }
    9575             : 
    9576             : 
    9577             : static PyTypeObject srvsvc_NetShareInfo1006_Type = {
    9578             :         PyVarObject_HEAD_INIT(NULL, 0)
    9579             :         .tp_name = "srvsvc.NetShareInfo1006",
    9580             :         .tp_getset = py_srvsvc_NetShareInfo1006_getsetters,
    9581             :         .tp_methods = NULL,
    9582             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9583             :         .tp_new = py_srvsvc_NetShareInfo1006_new,
    9584             : };
    9585             : 
    9586             : 
    9587           0 : static PyObject *py_srvsvc_NetShareCtr1006_get_count(PyObject *obj, void *closure)
    9588             : {
    9589           0 :         struct srvsvc_NetShareCtr1006 *object = (struct srvsvc_NetShareCtr1006 *)pytalloc_get_ptr(obj);
    9590             :         PyObject *py_count;
    9591           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
    9592           0 :         return py_count;
    9593             : }
    9594             : 
    9595           0 : static int py_srvsvc_NetShareCtr1006_set_count(PyObject *py_obj, PyObject *value, void *closure)
    9596             : {
    9597           0 :         struct srvsvc_NetShareCtr1006 *object = (struct srvsvc_NetShareCtr1006 *)pytalloc_get_ptr(py_obj);
    9598           0 :         if (value == NULL) {
    9599           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
    9600           0 :                 return -1;
    9601             :         }
    9602             :         {
    9603           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    9604           0 :                 if (PyLong_Check(value)) {
    9605             :                         unsigned long long test_var;
    9606           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9607           0 :                         if (PyErr_Occurred() != NULL) {
    9608           0 :                                 return -1;
    9609             :                         }
    9610           0 :                         if (test_var > uint_max) {
    9611           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9612             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9613           0 :                                 return -1;
    9614             :                         }
    9615           0 :                         object->count = test_var;
    9616             :                 } else {
    9617           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9618             :                           PyLong_Type.tp_name);
    9619           0 :                         return -1;
    9620             :                 }
    9621             :         }
    9622           0 :         return 0;
    9623             : }
    9624             : 
    9625           0 : static PyObject *py_srvsvc_NetShareCtr1006_get_array(PyObject *obj, void *closure)
    9626             : {
    9627           0 :         struct srvsvc_NetShareCtr1006 *object = (struct srvsvc_NetShareCtr1006 *)pytalloc_get_ptr(obj);
    9628             :         PyObject *py_array;
    9629           0 :         if (object->array == NULL) {
    9630           0 :                 Py_RETURN_NONE;
    9631             :         }
    9632           0 :         if (object->array == NULL) {
    9633           0 :                 py_array = Py_None;
    9634           0 :                 Py_INCREF(py_array);
    9635             :         } else {
    9636           0 :                 py_array = PyList_New(object->count);
    9637           0 :                 if (py_array == NULL) {
    9638           0 :                         return NULL;
    9639             :                 }
    9640             :                 {
    9641             :                         int array_cntr_1;
    9642           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    9643             :                                 PyObject *py_array_1;
    9644           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo1006_Type, object->array, &object->array[array_cntr_1]);
    9645           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    9646             :                         }
    9647             :                 }
    9648             :         }
    9649           0 :         return py_array;
    9650             : }
    9651             : 
    9652           0 : static int py_srvsvc_NetShareCtr1006_set_array(PyObject *py_obj, PyObject *value, void *closure)
    9653             : {
    9654           0 :         struct srvsvc_NetShareCtr1006 *object = (struct srvsvc_NetShareCtr1006 *)pytalloc_get_ptr(py_obj);
    9655           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    9656           0 :         if (value == NULL) {
    9657           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
    9658           0 :                 return -1;
    9659             :         }
    9660           0 :         if (value == Py_None) {
    9661           0 :                 object->array = NULL;
    9662             :         } else {
    9663           0 :                 object->array = NULL;
    9664           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    9665             :                 {
    9666             :                         int array_cntr_1;
    9667           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    9668           0 :                         if (!object->array) { return -1;; }
    9669           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    9670           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    9671           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    9672           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
    9673           0 :                                         return -1;
    9674             :                                 }
    9675           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo1006_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    9676           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    9677           0 :                                         PyErr_NoMemory();
    9678           0 :                                         return -1;
    9679             :                                 }
    9680           0 :                                 object->array[array_cntr_1] = *(struct srvsvc_NetShareInfo1006 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    9681             :                         }
    9682             :                 }
    9683             :         }
    9684           0 :         return 0;
    9685             : }
    9686             : 
    9687             : static PyGetSetDef py_srvsvc_NetShareCtr1006_getsetters[] = {
    9688             :         {
    9689             :                 .name = discard_const_p(char, "count"),
    9690             :                 .get = py_srvsvc_NetShareCtr1006_get_count,
    9691             :                 .set = py_srvsvc_NetShareCtr1006_set_count,
    9692             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9693             :         },
    9694             :         {
    9695             :                 .name = discard_const_p(char, "array"),
    9696             :                 .get = py_srvsvc_NetShareCtr1006_get_array,
    9697             :                 .set = py_srvsvc_NetShareCtr1006_set_array,
    9698             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfo1006")
    9699             :         },
    9700             :         { .name = NULL }
    9701             : };
    9702             : 
    9703           0 : static PyObject *py_srvsvc_NetShareCtr1006_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9704             : {
    9705           0 :         return pytalloc_new(struct srvsvc_NetShareCtr1006, type);
    9706             : }
    9707             : 
    9708             : 
    9709             : static PyTypeObject srvsvc_NetShareCtr1006_Type = {
    9710             :         PyVarObject_HEAD_INIT(NULL, 0)
    9711             :         .tp_name = "srvsvc.NetShareCtr1006",
    9712             :         .tp_getset = py_srvsvc_NetShareCtr1006_getsetters,
    9713             :         .tp_methods = NULL,
    9714             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9715             :         .tp_new = py_srvsvc_NetShareCtr1006_new,
    9716             : };
    9717             : 
    9718             : 
    9719           0 : static PyObject *py_srvsvc_NetShareInfo1007_get_flags(PyObject *obj, void *closure)
    9720             : {
    9721           0 :         struct srvsvc_NetShareInfo1007 *object = (struct srvsvc_NetShareInfo1007 *)pytalloc_get_ptr(obj);
    9722             :         PyObject *py_flags;
    9723           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->flags);
    9724           0 :         return py_flags;
    9725             : }
    9726             : 
    9727           0 : static int py_srvsvc_NetShareInfo1007_set_flags(PyObject *py_obj, PyObject *value, void *closure)
    9728             : {
    9729           0 :         struct srvsvc_NetShareInfo1007 *object = (struct srvsvc_NetShareInfo1007 *)pytalloc_get_ptr(py_obj);
    9730           0 :         if (value == NULL) {
    9731           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
    9732           0 :                 return -1;
    9733             :         }
    9734             :         {
    9735           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
    9736           0 :                 if (PyLong_Check(value)) {
    9737             :                         unsigned long long test_var;
    9738           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9739           0 :                         if (PyErr_Occurred() != NULL) {
    9740           0 :                                 return -1;
    9741             :                         }
    9742           0 :                         if (test_var > uint_max) {
    9743           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9744             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9745           0 :                                 return -1;
    9746             :                         }
    9747           0 :                         object->flags = test_var;
    9748             :                 } else {
    9749           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9750             :                           PyLong_Type.tp_name);
    9751           0 :                         return -1;
    9752             :                 }
    9753             :         }
    9754           0 :         return 0;
    9755             : }
    9756             : 
    9757           0 : static PyObject *py_srvsvc_NetShareInfo1007_get_alternate_directory_name(PyObject *obj, void *closure)
    9758             : {
    9759           0 :         struct srvsvc_NetShareInfo1007 *object = (struct srvsvc_NetShareInfo1007 *)pytalloc_get_ptr(obj);
    9760             :         PyObject *py_alternate_directory_name;
    9761           0 :         if (object->alternate_directory_name == NULL) {
    9762           0 :                 Py_RETURN_NONE;
    9763             :         }
    9764           0 :         if (object->alternate_directory_name == NULL) {
    9765           0 :                 py_alternate_directory_name = Py_None;
    9766           0 :                 Py_INCREF(py_alternate_directory_name);
    9767             :         } else {
    9768           0 :                 if (object->alternate_directory_name == NULL) {
    9769           0 :                         py_alternate_directory_name = Py_None;
    9770           0 :                         Py_INCREF(py_alternate_directory_name);
    9771             :                 } else {
    9772           0 :                         py_alternate_directory_name = PyUnicode_Decode(object->alternate_directory_name, strlen(object->alternate_directory_name), "utf-8", "ignore");
    9773             :                 }
    9774             :         }
    9775           0 :         return py_alternate_directory_name;
    9776             : }
    9777             : 
    9778           0 : static int py_srvsvc_NetShareInfo1007_set_alternate_directory_name(PyObject *py_obj, PyObject *value, void *closure)
    9779             : {
    9780           0 :         struct srvsvc_NetShareInfo1007 *object = (struct srvsvc_NetShareInfo1007 *)pytalloc_get_ptr(py_obj);
    9781           0 :         if (value == NULL) {
    9782           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->alternate_directory_name");
    9783           0 :                 return -1;
    9784             :         }
    9785           0 :         if (value == Py_None) {
    9786           0 :                 object->alternate_directory_name = NULL;
    9787             :         } else {
    9788           0 :                 object->alternate_directory_name = NULL;
    9789             :                 {
    9790             :                         const char *test_str;
    9791             :                         const char *talloc_str;
    9792           0 :                         PyObject *unicode = NULL;
    9793           0 :                         if (PyUnicode_Check(value)) {
    9794           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    9795           0 :                                 if (unicode == NULL) {
    9796           0 :                                         PyErr_NoMemory();
    9797           0 :                                         return -1;
    9798             :                                 }
    9799           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    9800           0 :                         } else if (PyBytes_Check(value)) {
    9801           0 :                                 test_str = PyBytes_AS_STRING(value);
    9802             :                         } else {
    9803           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    9804           0 :                                 return -1;
    9805             :                         }
    9806           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    9807           0 :                         if (unicode != NULL) {
    9808           0 :                                 Py_DECREF(unicode);
    9809             :                         }
    9810           0 :                         if (talloc_str == NULL) {
    9811           0 :                                 PyErr_NoMemory();
    9812           0 :                                 return -1;
    9813             :                         }
    9814           0 :                         object->alternate_directory_name = talloc_str;
    9815             :                 }
    9816             :         }
    9817           0 :         return 0;
    9818             : }
    9819             : 
    9820             : static PyGetSetDef py_srvsvc_NetShareInfo1007_getsetters[] = {
    9821             :         {
    9822             :                 .name = discard_const_p(char, "flags"),
    9823             :                 .get = py_srvsvc_NetShareInfo1007_get_flags,
    9824             :                 .set = py_srvsvc_NetShareInfo1007_set_flags,
    9825             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9826             :         },
    9827             :         {
    9828             :                 .name = discard_const_p(char, "alternate_directory_name"),
    9829             :                 .get = py_srvsvc_NetShareInfo1007_get_alternate_directory_name,
    9830             :                 .set = py_srvsvc_NetShareInfo1007_set_alternate_directory_name,
    9831             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    9832             :         },
    9833             :         { .name = NULL }
    9834             : };
    9835             : 
    9836           0 : static PyObject *py_srvsvc_NetShareInfo1007_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9837             : {
    9838           0 :         return pytalloc_new(struct srvsvc_NetShareInfo1007, type);
    9839             : }
    9840             : 
    9841             : 
    9842             : static PyTypeObject srvsvc_NetShareInfo1007_Type = {
    9843             :         PyVarObject_HEAD_INIT(NULL, 0)
    9844             :         .tp_name = "srvsvc.NetShareInfo1007",
    9845             :         .tp_getset = py_srvsvc_NetShareInfo1007_getsetters,
    9846             :         .tp_methods = NULL,
    9847             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9848             :         .tp_new = py_srvsvc_NetShareInfo1007_new,
    9849             : };
    9850             : 
    9851             : 
    9852           0 : static PyObject *py_srvsvc_NetShareCtr1007_get_count(PyObject *obj, void *closure)
    9853             : {
    9854           0 :         struct srvsvc_NetShareCtr1007 *object = (struct srvsvc_NetShareCtr1007 *)pytalloc_get_ptr(obj);
    9855             :         PyObject *py_count;
    9856           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
    9857           0 :         return py_count;
    9858             : }
    9859             : 
    9860           0 : static int py_srvsvc_NetShareCtr1007_set_count(PyObject *py_obj, PyObject *value, void *closure)
    9861             : {
    9862           0 :         struct srvsvc_NetShareCtr1007 *object = (struct srvsvc_NetShareCtr1007 *)pytalloc_get_ptr(py_obj);
    9863           0 :         if (value == NULL) {
    9864           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
    9865           0 :                 return -1;
    9866             :         }
    9867             :         {
    9868           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    9869           0 :                 if (PyLong_Check(value)) {
    9870             :                         unsigned long long test_var;
    9871           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9872           0 :                         if (PyErr_Occurred() != NULL) {
    9873           0 :                                 return -1;
    9874             :                         }
    9875           0 :                         if (test_var > uint_max) {
    9876           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9877             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9878           0 :                                 return -1;
    9879             :                         }
    9880           0 :                         object->count = test_var;
    9881             :                 } else {
    9882           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9883             :                           PyLong_Type.tp_name);
    9884           0 :                         return -1;
    9885             :                 }
    9886             :         }
    9887           0 :         return 0;
    9888             : }
    9889             : 
    9890           0 : static PyObject *py_srvsvc_NetShareCtr1007_get_array(PyObject *obj, void *closure)
    9891             : {
    9892           0 :         struct srvsvc_NetShareCtr1007 *object = (struct srvsvc_NetShareCtr1007 *)pytalloc_get_ptr(obj);
    9893             :         PyObject *py_array;
    9894           0 :         if (object->array == NULL) {
    9895           0 :                 Py_RETURN_NONE;
    9896             :         }
    9897           0 :         if (object->array == NULL) {
    9898           0 :                 py_array = Py_None;
    9899           0 :                 Py_INCREF(py_array);
    9900             :         } else {
    9901           0 :                 py_array = PyList_New(object->count);
    9902           0 :                 if (py_array == NULL) {
    9903           0 :                         return NULL;
    9904             :                 }
    9905             :                 {
    9906             :                         int array_cntr_1;
    9907           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
    9908             :                                 PyObject *py_array_1;
    9909           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetShareInfo1007_Type, object->array, &object->array[array_cntr_1]);
    9910           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
    9911             :                         }
    9912             :                 }
    9913             :         }
    9914           0 :         return py_array;
    9915             : }
    9916             : 
    9917           0 : static int py_srvsvc_NetShareCtr1007_set_array(PyObject *py_obj, PyObject *value, void *closure)
    9918             : {
    9919           0 :         struct srvsvc_NetShareCtr1007 *object = (struct srvsvc_NetShareCtr1007 *)pytalloc_get_ptr(py_obj);
    9920           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
    9921           0 :         if (value == NULL) {
    9922           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
    9923           0 :                 return -1;
    9924             :         }
    9925           0 :         if (value == Py_None) {
    9926           0 :                 object->array = NULL;
    9927             :         } else {
    9928           0 :                 object->array = NULL;
    9929           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    9930             :                 {
    9931             :                         int array_cntr_1;
    9932           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
    9933           0 :                         if (!object->array) { return -1;; }
    9934           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
    9935           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
    9936           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
    9937           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
    9938           0 :                                         return -1;
    9939             :                                 }
    9940           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo1007_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
    9941           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
    9942           0 :                                         PyErr_NoMemory();
    9943           0 :                                         return -1;
    9944             :                                 }
    9945           0 :                                 object->array[array_cntr_1] = *(struct srvsvc_NetShareInfo1007 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
    9946             :                         }
    9947             :                 }
    9948             :         }
    9949           0 :         return 0;
    9950             : }
    9951             : 
    9952             : static PyGetSetDef py_srvsvc_NetShareCtr1007_getsetters[] = {
    9953             :         {
    9954             :                 .name = discard_const_p(char, "count"),
    9955             :                 .get = py_srvsvc_NetShareCtr1007_get_count,
    9956             :                 .set = py_srvsvc_NetShareCtr1007_set_count,
    9957             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9958             :         },
    9959             :         {
    9960             :                 .name = discard_const_p(char, "array"),
    9961             :                 .get = py_srvsvc_NetShareCtr1007_get_array,
    9962             :                 .set = py_srvsvc_NetShareCtr1007_set_array,
    9963             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfo1007")
    9964             :         },
    9965             :         { .name = NULL }
    9966             : };
    9967             : 
    9968           0 : static PyObject *py_srvsvc_NetShareCtr1007_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9969             : {
    9970           0 :         return pytalloc_new(struct srvsvc_NetShareCtr1007, type);
    9971             : }
    9972             : 
    9973             : 
    9974             : static PyTypeObject srvsvc_NetShareCtr1007_Type = {
    9975             :         PyVarObject_HEAD_INIT(NULL, 0)
    9976             :         .tp_name = "srvsvc.NetShareCtr1007",
    9977             :         .tp_getset = py_srvsvc_NetShareCtr1007_getsetters,
    9978             :         .tp_methods = NULL,
    9979             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9980             :         .tp_new = py_srvsvc_NetShareCtr1007_new,
    9981             : };
    9982             : 
    9983             : 
    9984           0 : static PyObject *py_srvsvc_NetShareCtr1501_get_count(PyObject *obj, void *closure)
    9985             : {
    9986           0 :         struct srvsvc_NetShareCtr1501 *object = (struct srvsvc_NetShareCtr1501 *)pytalloc_get_ptr(obj);
    9987             :         PyObject *py_count;
    9988           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
    9989           0 :         return py_count;
    9990             : }
    9991             : 
    9992           0 : static int py_srvsvc_NetShareCtr1501_set_count(PyObject *py_obj, PyObject *value, void *closure)
    9993             : {
    9994           0 :         struct srvsvc_NetShareCtr1501 *object = (struct srvsvc_NetShareCtr1501 *)pytalloc_get_ptr(py_obj);
    9995           0 :         if (value == NULL) {
    9996           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
    9997           0 :                 return -1;
    9998             :         }
    9999             :         {
   10000           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   10001           0 :                 if (PyLong_Check(value)) {
   10002             :                         unsigned long long test_var;
   10003           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10004           0 :                         if (PyErr_Occurred() != NULL) {
   10005           0 :                                 return -1;
   10006             :                         }
   10007           0 :                         if (test_var > uint_max) {
   10008           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10009             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10010           0 :                                 return -1;
   10011             :                         }
   10012           0 :                         object->count = test_var;
   10013             :                 } else {
   10014           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10015             :                           PyLong_Type.tp_name);
   10016           0 :                         return -1;
   10017             :                 }
   10018             :         }
   10019           0 :         return 0;
   10020             : }
   10021             : 
   10022           0 : static PyObject *py_srvsvc_NetShareCtr1501_get_array(PyObject *obj, void *closure)
   10023             : {
   10024           0 :         struct srvsvc_NetShareCtr1501 *object = (struct srvsvc_NetShareCtr1501 *)pytalloc_get_ptr(obj);
   10025             :         PyObject *py_array;
   10026           0 :         if (object->array == NULL) {
   10027           0 :                 Py_RETURN_NONE;
   10028             :         }
   10029           0 :         if (object->array == NULL) {
   10030           0 :                 py_array = Py_None;
   10031           0 :                 Py_INCREF(py_array);
   10032             :         } else {
   10033           0 :                 py_array = PyList_New(object->count);
   10034           0 :                 if (py_array == NULL) {
   10035           0 :                         return NULL;
   10036             :                 }
   10037             :                 {
   10038             :                         int array_cntr_1;
   10039           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
   10040             :                                 PyObject *py_array_1;
   10041           0 :                                 py_array_1 = pytalloc_reference_ex(sec_desc_buf_Type, object->array, &object->array[array_cntr_1]);
   10042           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
   10043             :                         }
   10044             :                 }
   10045             :         }
   10046           0 :         return py_array;
   10047             : }
   10048             : 
   10049           0 : static int py_srvsvc_NetShareCtr1501_set_array(PyObject *py_obj, PyObject *value, void *closure)
   10050             : {
   10051           0 :         struct srvsvc_NetShareCtr1501 *object = (struct srvsvc_NetShareCtr1501 *)pytalloc_get_ptr(py_obj);
   10052           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
   10053           0 :         if (value == NULL) {
   10054           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
   10055           0 :                 return -1;
   10056             :         }
   10057           0 :         if (value == Py_None) {
   10058           0 :                 object->array = NULL;
   10059             :         } else {
   10060           0 :                 object->array = NULL;
   10061           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   10062             :                 {
   10063             :                         int array_cntr_1;
   10064           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   10065           0 :                         if (!object->array) { return -1;; }
   10066           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
   10067           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
   10068           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
   10069           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
   10070           0 :                                         return -1;
   10071             :                                 }
   10072           0 :                                 PY_CHECK_TYPE(sec_desc_buf_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
   10073           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
   10074           0 :                                         PyErr_NoMemory();
   10075           0 :                                         return -1;
   10076             :                                 }
   10077           0 :                                 object->array[array_cntr_1] = *(struct sec_desc_buf *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
   10078             :                         }
   10079             :                 }
   10080             :         }
   10081           0 :         return 0;
   10082             : }
   10083             : 
   10084             : static PyGetSetDef py_srvsvc_NetShareCtr1501_getsetters[] = {
   10085             :         {
   10086             :                 .name = discard_const_p(char, "count"),
   10087             :                 .get = py_srvsvc_NetShareCtr1501_get_count,
   10088             :                 .set = py_srvsvc_NetShareCtr1501_set_count,
   10089             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10090             :         },
   10091             :         {
   10092             :                 .name = discard_const_p(char, "array"),
   10093             :                 .get = py_srvsvc_NetShareCtr1501_get_array,
   10094             :                 .set = py_srvsvc_NetShareCtr1501_set_array,
   10095             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
   10096             :         },
   10097             :         { .name = NULL }
   10098             : };
   10099             : 
   10100           0 : static PyObject *py_srvsvc_NetShareCtr1501_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10101             : {
   10102           0 :         return pytalloc_new(struct srvsvc_NetShareCtr1501, type);
   10103             : }
   10104             : 
   10105             : 
   10106             : static PyTypeObject srvsvc_NetShareCtr1501_Type = {
   10107             :         PyVarObject_HEAD_INIT(NULL, 0)
   10108             :         .tp_name = "srvsvc.NetShareCtr1501",
   10109             :         .tp_getset = py_srvsvc_NetShareCtr1501_getsetters,
   10110             :         .tp_methods = NULL,
   10111             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10112             :         .tp_new = py_srvsvc_NetShareCtr1501_new,
   10113             : };
   10114             : 
   10115           1 : static PyObject *py_import_srvsvc_NetShareInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetShareInfo *in)
   10116             : {
   10117             :         PyObject *ret;
   10118             : 
   10119           1 :         switch (level) {
   10120           0 :                 case 0:
   10121           0 :                         if (in->info0 == NULL) {
   10122           0 :                                 ret = Py_None;
   10123           0 :                                 Py_INCREF(ret);
   10124             :                         } else {
   10125           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareInfo0_Type, in->info0, in->info0);
   10126             :                         }
   10127           0 :                         return ret;
   10128             : 
   10129           1 :                 case 1:
   10130           1 :                         if (in->info1 == NULL) {
   10131           0 :                                 ret = Py_None;
   10132           0 :                                 Py_INCREF(ret);
   10133             :                         } else {
   10134           1 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareInfo1_Type, in->info1, in->info1);
   10135             :                         }
   10136           1 :                         return ret;
   10137             : 
   10138           0 :                 case 2:
   10139           0 :                         if (in->info2 == NULL) {
   10140           0 :                                 ret = Py_None;
   10141           0 :                                 Py_INCREF(ret);
   10142             :                         } else {
   10143           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareInfo2_Type, in->info2, in->info2);
   10144             :                         }
   10145           0 :                         return ret;
   10146             : 
   10147           0 :                 case 501:
   10148           0 :                         if (in->info501 == NULL) {
   10149           0 :                                 ret = Py_None;
   10150           0 :                                 Py_INCREF(ret);
   10151             :                         } else {
   10152           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareInfo501_Type, in->info501, in->info501);
   10153             :                         }
   10154           0 :                         return ret;
   10155             : 
   10156           0 :                 case 502:
   10157           0 :                         if (in->info502 == NULL) {
   10158           0 :                                 ret = Py_None;
   10159           0 :                                 Py_INCREF(ret);
   10160             :                         } else {
   10161           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareInfo502_Type, in->info502, in->info502);
   10162             :                         }
   10163           0 :                         return ret;
   10164             : 
   10165           0 :                 case 1004:
   10166           0 :                         if (in->info1004 == NULL) {
   10167           0 :                                 ret = Py_None;
   10168           0 :                                 Py_INCREF(ret);
   10169             :                         } else {
   10170           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareInfo1004_Type, in->info1004, in->info1004);
   10171             :                         }
   10172           0 :                         return ret;
   10173             : 
   10174           0 :                 case 1005:
   10175           0 :                         if (in->info1005 == NULL) {
   10176           0 :                                 ret = Py_None;
   10177           0 :                                 Py_INCREF(ret);
   10178             :                         } else {
   10179           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareInfo1005_Type, in->info1005, in->info1005);
   10180             :                         }
   10181           0 :                         return ret;
   10182             : 
   10183           0 :                 case 1006:
   10184           0 :                         if (in->info1006 == NULL) {
   10185           0 :                                 ret = Py_None;
   10186           0 :                                 Py_INCREF(ret);
   10187             :                         } else {
   10188           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareInfo1006_Type, in->info1006, in->info1006);
   10189             :                         }
   10190           0 :                         return ret;
   10191             : 
   10192           0 :                 case 1007:
   10193           0 :                         if (in->info1007 == NULL) {
   10194           0 :                                 ret = Py_None;
   10195           0 :                                 Py_INCREF(ret);
   10196             :                         } else {
   10197           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareInfo1007_Type, in->info1007, in->info1007);
   10198             :                         }
   10199           0 :                         return ret;
   10200             : 
   10201           0 :                 case 1501:
   10202           0 :                         if (in->info1501 == NULL) {
   10203           0 :                                 ret = Py_None;
   10204           0 :                                 Py_INCREF(ret);
   10205             :                         } else {
   10206           0 :                                 ret = pytalloc_reference_ex(sec_desc_buf_Type, in->info1501, in->info1501);
   10207             :                         }
   10208           0 :                         return ret;
   10209             : 
   10210           0 :                 default:
   10211           0 :                         ret = Py_None;
   10212           0 :                         Py_INCREF(ret);
   10213           0 :                         return ret;
   10214             : 
   10215             :         }
   10216             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   10217             :         return NULL;
   10218             : }
   10219             : 
   10220           0 : static union srvsvc_NetShareInfo *py_export_srvsvc_NetShareInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   10221             : {
   10222           0 :         union srvsvc_NetShareInfo *ret = talloc_zero(mem_ctx, union srvsvc_NetShareInfo);
   10223           0 :         switch (level) {
   10224           0 :                 case 0:
   10225           0 :                         if (in == NULL) {
   10226           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info0");
   10227           0 :                                 talloc_free(ret); return NULL;
   10228             :                         }
   10229           0 :                         if (in == Py_None) {
   10230           0 :                                 ret->info0 = NULL;
   10231             :                         } else {
   10232           0 :                                 ret->info0 = NULL;
   10233           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo0_Type, in, talloc_free(ret); return NULL;);
   10234           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10235           0 :                                         PyErr_NoMemory();
   10236           0 :                                         talloc_free(ret); return NULL;
   10237             :                                 }
   10238           0 :                                 ret->info0 = (struct srvsvc_NetShareInfo0 *)pytalloc_get_ptr(in);
   10239             :                         }
   10240           0 :                         break;
   10241             : 
   10242           0 :                 case 1:
   10243           0 :                         if (in == NULL) {
   10244           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1");
   10245           0 :                                 talloc_free(ret); return NULL;
   10246             :                         }
   10247           0 :                         if (in == Py_None) {
   10248           0 :                                 ret->info1 = NULL;
   10249             :                         } else {
   10250           0 :                                 ret->info1 = NULL;
   10251           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo1_Type, in, talloc_free(ret); return NULL;);
   10252           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10253           0 :                                         PyErr_NoMemory();
   10254           0 :                                         talloc_free(ret); return NULL;
   10255             :                                 }
   10256           0 :                                 ret->info1 = (struct srvsvc_NetShareInfo1 *)pytalloc_get_ptr(in);
   10257             :                         }
   10258           0 :                         break;
   10259             : 
   10260           0 :                 case 2:
   10261           0 :                         if (in == NULL) {
   10262           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info2");
   10263           0 :                                 talloc_free(ret); return NULL;
   10264             :                         }
   10265           0 :                         if (in == Py_None) {
   10266           0 :                                 ret->info2 = NULL;
   10267             :                         } else {
   10268           0 :                                 ret->info2 = NULL;
   10269           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo2_Type, in, talloc_free(ret); return NULL;);
   10270           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10271           0 :                                         PyErr_NoMemory();
   10272           0 :                                         talloc_free(ret); return NULL;
   10273             :                                 }
   10274           0 :                                 ret->info2 = (struct srvsvc_NetShareInfo2 *)pytalloc_get_ptr(in);
   10275             :                         }
   10276           0 :                         break;
   10277             : 
   10278           0 :                 case 501:
   10279           0 :                         if (in == NULL) {
   10280           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info501");
   10281           0 :                                 talloc_free(ret); return NULL;
   10282             :                         }
   10283           0 :                         if (in == Py_None) {
   10284           0 :                                 ret->info501 = NULL;
   10285             :                         } else {
   10286           0 :                                 ret->info501 = NULL;
   10287           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo501_Type, in, talloc_free(ret); return NULL;);
   10288           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10289           0 :                                         PyErr_NoMemory();
   10290           0 :                                         talloc_free(ret); return NULL;
   10291             :                                 }
   10292           0 :                                 ret->info501 = (struct srvsvc_NetShareInfo501 *)pytalloc_get_ptr(in);
   10293             :                         }
   10294           0 :                         break;
   10295             : 
   10296           0 :                 case 502:
   10297           0 :                         if (in == NULL) {
   10298           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info502");
   10299           0 :                                 talloc_free(ret); return NULL;
   10300             :                         }
   10301           0 :                         if (in == Py_None) {
   10302           0 :                                 ret->info502 = NULL;
   10303             :                         } else {
   10304           0 :                                 ret->info502 = NULL;
   10305           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo502_Type, in, talloc_free(ret); return NULL;);
   10306           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10307           0 :                                         PyErr_NoMemory();
   10308           0 :                                         talloc_free(ret); return NULL;
   10309             :                                 }
   10310           0 :                                 ret->info502 = (struct srvsvc_NetShareInfo502 *)pytalloc_get_ptr(in);
   10311             :                         }
   10312           0 :                         break;
   10313             : 
   10314           0 :                 case 1004:
   10315           0 :                         if (in == NULL) {
   10316           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1004");
   10317           0 :                                 talloc_free(ret); return NULL;
   10318             :                         }
   10319           0 :                         if (in == Py_None) {
   10320           0 :                                 ret->info1004 = NULL;
   10321             :                         } else {
   10322           0 :                                 ret->info1004 = NULL;
   10323           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo1004_Type, in, talloc_free(ret); return NULL;);
   10324           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10325           0 :                                         PyErr_NoMemory();
   10326           0 :                                         talloc_free(ret); return NULL;
   10327             :                                 }
   10328           0 :                                 ret->info1004 = (struct srvsvc_NetShareInfo1004 *)pytalloc_get_ptr(in);
   10329             :                         }
   10330           0 :                         break;
   10331             : 
   10332           0 :                 case 1005:
   10333           0 :                         if (in == NULL) {
   10334           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1005");
   10335           0 :                                 talloc_free(ret); return NULL;
   10336             :                         }
   10337           0 :                         if (in == Py_None) {
   10338           0 :                                 ret->info1005 = NULL;
   10339             :                         } else {
   10340           0 :                                 ret->info1005 = NULL;
   10341           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo1005_Type, in, talloc_free(ret); return NULL;);
   10342           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10343           0 :                                         PyErr_NoMemory();
   10344           0 :                                         talloc_free(ret); return NULL;
   10345             :                                 }
   10346           0 :                                 ret->info1005 = (struct srvsvc_NetShareInfo1005 *)pytalloc_get_ptr(in);
   10347             :                         }
   10348           0 :                         break;
   10349             : 
   10350           0 :                 case 1006:
   10351           0 :                         if (in == NULL) {
   10352           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1006");
   10353           0 :                                 talloc_free(ret); return NULL;
   10354             :                         }
   10355           0 :                         if (in == Py_None) {
   10356           0 :                                 ret->info1006 = NULL;
   10357             :                         } else {
   10358           0 :                                 ret->info1006 = NULL;
   10359           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo1006_Type, in, talloc_free(ret); return NULL;);
   10360           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10361           0 :                                         PyErr_NoMemory();
   10362           0 :                                         talloc_free(ret); return NULL;
   10363             :                                 }
   10364           0 :                                 ret->info1006 = (struct srvsvc_NetShareInfo1006 *)pytalloc_get_ptr(in);
   10365             :                         }
   10366           0 :                         break;
   10367             : 
   10368           0 :                 case 1007:
   10369           0 :                         if (in == NULL) {
   10370           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1007");
   10371           0 :                                 talloc_free(ret); return NULL;
   10372             :                         }
   10373           0 :                         if (in == Py_None) {
   10374           0 :                                 ret->info1007 = NULL;
   10375             :                         } else {
   10376           0 :                                 ret->info1007 = NULL;
   10377           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareInfo1007_Type, in, talloc_free(ret); return NULL;);
   10378           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10379           0 :                                         PyErr_NoMemory();
   10380           0 :                                         talloc_free(ret); return NULL;
   10381             :                                 }
   10382           0 :                                 ret->info1007 = (struct srvsvc_NetShareInfo1007 *)pytalloc_get_ptr(in);
   10383             :                         }
   10384           0 :                         break;
   10385             : 
   10386           0 :                 case 1501:
   10387           0 :                         if (in == NULL) {
   10388           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1501");
   10389           0 :                                 talloc_free(ret); return NULL;
   10390             :                         }
   10391           0 :                         if (in == Py_None) {
   10392           0 :                                 ret->info1501 = NULL;
   10393             :                         } else {
   10394           0 :                                 ret->info1501 = NULL;
   10395           0 :                                 PY_CHECK_TYPE(sec_desc_buf_Type, in, talloc_free(ret); return NULL;);
   10396           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10397           0 :                                         PyErr_NoMemory();
   10398           0 :                                         talloc_free(ret); return NULL;
   10399             :                                 }
   10400           0 :                                 ret->info1501 = (struct sec_desc_buf *)pytalloc_get_ptr(in);
   10401             :                         }
   10402           0 :                         break;
   10403             : 
   10404           0 :                 default:
   10405           0 :                         break;
   10406             : 
   10407             :         }
   10408             : 
   10409           0 :         return ret;
   10410             : }
   10411             : 
   10412           1 : static PyObject *py_srvsvc_NetShareInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10413             : {
   10414           1 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   10415           1 :         PyObject *mem_ctx_obj = NULL;
   10416           1 :         TALLOC_CTX *mem_ctx = NULL;
   10417           1 :         int level = 0;
   10418           1 :         PyObject *in_obj = NULL;
   10419           1 :         union srvsvc_NetShareInfo *in = NULL;
   10420             : 
   10421           1 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   10422             :                 discard_const_p(char *, kwnames),
   10423             :                 &mem_ctx_obj,
   10424             :                 &level,
   10425             :                 &in_obj)) {
   10426           0 :                 return NULL;
   10427             :         }
   10428           1 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   10429           1 :         if (mem_ctx == NULL) {
   10430           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   10431           0 :                 return NULL;
   10432             :         }
   10433           1 :         in = (union srvsvc_NetShareInfo *)pytalloc_get_ptr(in_obj);
   10434           1 :         if (in == NULL) {
   10435           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union srvsvc_NetShareInfo!");
   10436           0 :                 return NULL;
   10437             :         }
   10438             : 
   10439           1 :         return py_import_srvsvc_NetShareInfo(mem_ctx, level, in);
   10440             : }
   10441             : 
   10442           0 : static PyObject *py_srvsvc_NetShareInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10443             : {
   10444           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   10445           0 :         PyObject *mem_ctx_obj = NULL;
   10446           0 :         TALLOC_CTX *mem_ctx = NULL;
   10447           0 :         int level = 0;
   10448           0 :         PyObject *in = NULL;
   10449           0 :         union srvsvc_NetShareInfo *out = NULL;
   10450             : 
   10451           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   10452             :                 discard_const_p(char *, kwnames),
   10453             :                 &mem_ctx_obj,
   10454             :                 &level,
   10455             :                 &in)) {
   10456           0 :                 return NULL;
   10457             :         }
   10458           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   10459           0 :         if (mem_ctx == NULL) {
   10460           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   10461           0 :                 return NULL;
   10462             :         }
   10463             : 
   10464           0 :         out = py_export_srvsvc_NetShareInfo(mem_ctx, level, in);
   10465           0 :         if (out == NULL) {
   10466           0 :                 return NULL;
   10467             :         }
   10468             : 
   10469           0 :         return pytalloc_GenericObject_reference(out);
   10470             : }
   10471             : 
   10472             : static PyMethodDef py_srvsvc_NetShareInfo_methods[] = {
   10473             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareInfo_import),
   10474             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   10475             :                 "T.__import__(mem_ctx, level, in) => ret." },
   10476             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareInfo_export),
   10477             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   10478             :                 "T.__export__(mem_ctx, level, in) => ret." },
   10479             :         { NULL, NULL, 0, NULL }
   10480             : };
   10481             : 
   10482           0 : static PyObject *py_srvsvc_NetShareInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10483             : {
   10484           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   10485           0 :         return NULL;
   10486             : }
   10487             : 
   10488             : 
   10489             : static PyTypeObject srvsvc_NetShareInfo_Type = {
   10490             :         PyVarObject_HEAD_INIT(NULL, 0)
   10491             :         .tp_name = "srvsvc.NetShareInfo",
   10492             :         .tp_getset = NULL,
   10493             :         .tp_methods = py_srvsvc_NetShareInfo_methods,
   10494             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10495             :         .tp_new = py_srvsvc_NetShareInfo_new,
   10496             : };
   10497             : 
   10498           0 : static PyObject *py_import_srvsvc_NetShareCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetShareCtr *in)
   10499             : {
   10500             :         PyObject *ret;
   10501             : 
   10502           0 :         switch (level) {
   10503           0 :                 case 0:
   10504           0 :                         if (in->ctr0 == NULL) {
   10505           0 :                                 ret = Py_None;
   10506           0 :                                 Py_INCREF(ret);
   10507             :                         } else {
   10508           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr0_Type, in->ctr0, in->ctr0);
   10509             :                         }
   10510           0 :                         return ret;
   10511             : 
   10512           0 :                 case 1:
   10513           0 :                         if (in->ctr1 == NULL) {
   10514           0 :                                 ret = Py_None;
   10515           0 :                                 Py_INCREF(ret);
   10516             :                         } else {
   10517           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr1_Type, in->ctr1, in->ctr1);
   10518             :                         }
   10519           0 :                         return ret;
   10520             : 
   10521           0 :                 case 2:
   10522           0 :                         if (in->ctr2 == NULL) {
   10523           0 :                                 ret = Py_None;
   10524           0 :                                 Py_INCREF(ret);
   10525             :                         } else {
   10526           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr2_Type, in->ctr2, in->ctr2);
   10527             :                         }
   10528           0 :                         return ret;
   10529             : 
   10530           0 :                 case 501:
   10531           0 :                         if (in->ctr501 == NULL) {
   10532           0 :                                 ret = Py_None;
   10533           0 :                                 Py_INCREF(ret);
   10534             :                         } else {
   10535           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr501_Type, in->ctr501, in->ctr501);
   10536             :                         }
   10537           0 :                         return ret;
   10538             : 
   10539           0 :                 case 502:
   10540           0 :                         if (in->ctr502 == NULL) {
   10541           0 :                                 ret = Py_None;
   10542           0 :                                 Py_INCREF(ret);
   10543             :                         } else {
   10544           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr502_Type, in->ctr502, in->ctr502);
   10545             :                         }
   10546           0 :                         return ret;
   10547             : 
   10548           0 :                 case 1004:
   10549           0 :                         if (in->ctr1004 == NULL) {
   10550           0 :                                 ret = Py_None;
   10551           0 :                                 Py_INCREF(ret);
   10552             :                         } else {
   10553           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr1004_Type, in->ctr1004, in->ctr1004);
   10554             :                         }
   10555           0 :                         return ret;
   10556             : 
   10557           0 :                 case 1005:
   10558           0 :                         if (in->ctr1005 == NULL) {
   10559           0 :                                 ret = Py_None;
   10560           0 :                                 Py_INCREF(ret);
   10561             :                         } else {
   10562           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr1005_Type, in->ctr1005, in->ctr1005);
   10563             :                         }
   10564           0 :                         return ret;
   10565             : 
   10566           0 :                 case 1006:
   10567           0 :                         if (in->ctr1006 == NULL) {
   10568           0 :                                 ret = Py_None;
   10569           0 :                                 Py_INCREF(ret);
   10570             :                         } else {
   10571           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr1006_Type, in->ctr1006, in->ctr1006);
   10572             :                         }
   10573           0 :                         return ret;
   10574             : 
   10575           0 :                 case 1007:
   10576           0 :                         if (in->ctr1007 == NULL) {
   10577           0 :                                 ret = Py_None;
   10578           0 :                                 Py_INCREF(ret);
   10579             :                         } else {
   10580           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr1007_Type, in->ctr1007, in->ctr1007);
   10581             :                         }
   10582           0 :                         return ret;
   10583             : 
   10584           0 :                 case 1501:
   10585           0 :                         if (in->ctr1501 == NULL) {
   10586           0 :                                 ret = Py_None;
   10587           0 :                                 Py_INCREF(ret);
   10588             :                         } else {
   10589           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetShareCtr1501_Type, in->ctr1501, in->ctr1501);
   10590             :                         }
   10591           0 :                         return ret;
   10592             : 
   10593           0 :                 default:
   10594           0 :                         ret = Py_None;
   10595           0 :                         Py_INCREF(ret);
   10596           0 :                         return ret;
   10597             : 
   10598             :         }
   10599             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   10600             :         return NULL;
   10601             : }
   10602             : 
   10603           0 : static union srvsvc_NetShareCtr *py_export_srvsvc_NetShareCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   10604             : {
   10605           0 :         union srvsvc_NetShareCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetShareCtr);
   10606           0 :         switch (level) {
   10607           0 :                 case 0:
   10608           0 :                         if (in == NULL) {
   10609           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr0");
   10610           0 :                                 talloc_free(ret); return NULL;
   10611             :                         }
   10612           0 :                         if (in == Py_None) {
   10613           0 :                                 ret->ctr0 = NULL;
   10614             :                         } else {
   10615           0 :                                 ret->ctr0 = NULL;
   10616           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareCtr0_Type, in, talloc_free(ret); return NULL;);
   10617           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10618           0 :                                         PyErr_NoMemory();
   10619           0 :                                         talloc_free(ret); return NULL;
   10620             :                                 }
   10621           0 :                                 ret->ctr0 = (struct srvsvc_NetShareCtr0 *)pytalloc_get_ptr(in);
   10622             :                         }
   10623           0 :                         break;
   10624             : 
   10625           0 :                 case 1:
   10626           0 :                         if (in == NULL) {
   10627           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
   10628           0 :                                 talloc_free(ret); return NULL;
   10629             :                         }
   10630           0 :                         if (in == Py_None) {
   10631           0 :                                 ret->ctr1 = NULL;
   10632             :                         } else {
   10633           0 :                                 ret->ctr1 = NULL;
   10634           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareCtr1_Type, in, talloc_free(ret); return NULL;);
   10635           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10636           0 :                                         PyErr_NoMemory();
   10637           0 :                                         talloc_free(ret); return NULL;
   10638             :                                 }
   10639           0 :                                 ret->ctr1 = (struct srvsvc_NetShareCtr1 *)pytalloc_get_ptr(in);
   10640             :                         }
   10641           0 :                         break;
   10642             : 
   10643           0 :                 case 2:
   10644           0 :                         if (in == NULL) {
   10645           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr2");
   10646           0 :                                 talloc_free(ret); return NULL;
   10647             :                         }
   10648           0 :                         if (in == Py_None) {
   10649           0 :                                 ret->ctr2 = NULL;
   10650             :                         } else {
   10651           0 :                                 ret->ctr2 = NULL;
   10652           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareCtr2_Type, in, talloc_free(ret); return NULL;);
   10653           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10654           0 :                                         PyErr_NoMemory();
   10655           0 :                                         talloc_free(ret); return NULL;
   10656             :                                 }
   10657           0 :                                 ret->ctr2 = (struct srvsvc_NetShareCtr2 *)pytalloc_get_ptr(in);
   10658             :                         }
   10659           0 :                         break;
   10660             : 
   10661           0 :                 case 501:
   10662           0 :                         if (in == NULL) {
   10663           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr501");
   10664           0 :                                 talloc_free(ret); return NULL;
   10665             :                         }
   10666           0 :                         if (in == Py_None) {
   10667           0 :                                 ret->ctr501 = NULL;
   10668             :                         } else {
   10669           0 :                                 ret->ctr501 = NULL;
   10670           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareCtr501_Type, in, talloc_free(ret); return NULL;);
   10671           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10672           0 :                                         PyErr_NoMemory();
   10673           0 :                                         talloc_free(ret); return NULL;
   10674             :                                 }
   10675           0 :                                 ret->ctr501 = (struct srvsvc_NetShareCtr501 *)pytalloc_get_ptr(in);
   10676             :                         }
   10677           0 :                         break;
   10678             : 
   10679           0 :                 case 502:
   10680           0 :                         if (in == NULL) {
   10681           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr502");
   10682           0 :                                 talloc_free(ret); return NULL;
   10683             :                         }
   10684           0 :                         if (in == Py_None) {
   10685           0 :                                 ret->ctr502 = NULL;
   10686             :                         } else {
   10687           0 :                                 ret->ctr502 = NULL;
   10688           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareCtr502_Type, in, talloc_free(ret); return NULL;);
   10689           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10690           0 :                                         PyErr_NoMemory();
   10691           0 :                                         talloc_free(ret); return NULL;
   10692             :                                 }
   10693           0 :                                 ret->ctr502 = (struct srvsvc_NetShareCtr502 *)pytalloc_get_ptr(in);
   10694             :                         }
   10695           0 :                         break;
   10696             : 
   10697           0 :                 case 1004:
   10698           0 :                         if (in == NULL) {
   10699           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1004");
   10700           0 :                                 talloc_free(ret); return NULL;
   10701             :                         }
   10702           0 :                         if (in == Py_None) {
   10703           0 :                                 ret->ctr1004 = NULL;
   10704             :                         } else {
   10705           0 :                                 ret->ctr1004 = NULL;
   10706           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareCtr1004_Type, in, talloc_free(ret); return NULL;);
   10707           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10708           0 :                                         PyErr_NoMemory();
   10709           0 :                                         talloc_free(ret); return NULL;
   10710             :                                 }
   10711           0 :                                 ret->ctr1004 = (struct srvsvc_NetShareCtr1004 *)pytalloc_get_ptr(in);
   10712             :                         }
   10713           0 :                         break;
   10714             : 
   10715           0 :                 case 1005:
   10716           0 :                         if (in == NULL) {
   10717           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1005");
   10718           0 :                                 talloc_free(ret); return NULL;
   10719             :                         }
   10720           0 :                         if (in == Py_None) {
   10721           0 :                                 ret->ctr1005 = NULL;
   10722             :                         } else {
   10723           0 :                                 ret->ctr1005 = NULL;
   10724           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareCtr1005_Type, in, talloc_free(ret); return NULL;);
   10725           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10726           0 :                                         PyErr_NoMemory();
   10727           0 :                                         talloc_free(ret); return NULL;
   10728             :                                 }
   10729           0 :                                 ret->ctr1005 = (struct srvsvc_NetShareCtr1005 *)pytalloc_get_ptr(in);
   10730             :                         }
   10731           0 :                         break;
   10732             : 
   10733           0 :                 case 1006:
   10734           0 :                         if (in == NULL) {
   10735           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1006");
   10736           0 :                                 talloc_free(ret); return NULL;
   10737             :                         }
   10738           0 :                         if (in == Py_None) {
   10739           0 :                                 ret->ctr1006 = NULL;
   10740             :                         } else {
   10741           0 :                                 ret->ctr1006 = NULL;
   10742           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareCtr1006_Type, in, talloc_free(ret); return NULL;);
   10743           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10744           0 :                                         PyErr_NoMemory();
   10745           0 :                                         talloc_free(ret); return NULL;
   10746             :                                 }
   10747           0 :                                 ret->ctr1006 = (struct srvsvc_NetShareCtr1006 *)pytalloc_get_ptr(in);
   10748             :                         }
   10749           0 :                         break;
   10750             : 
   10751           0 :                 case 1007:
   10752           0 :                         if (in == NULL) {
   10753           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1007");
   10754           0 :                                 talloc_free(ret); return NULL;
   10755             :                         }
   10756           0 :                         if (in == Py_None) {
   10757           0 :                                 ret->ctr1007 = NULL;
   10758             :                         } else {
   10759           0 :                                 ret->ctr1007 = NULL;
   10760           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareCtr1007_Type, in, talloc_free(ret); return NULL;);
   10761           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10762           0 :                                         PyErr_NoMemory();
   10763           0 :                                         talloc_free(ret); return NULL;
   10764             :                                 }
   10765           0 :                                 ret->ctr1007 = (struct srvsvc_NetShareCtr1007 *)pytalloc_get_ptr(in);
   10766             :                         }
   10767           0 :                         break;
   10768             : 
   10769           0 :                 case 1501:
   10770           0 :                         if (in == NULL) {
   10771           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1501");
   10772           0 :                                 talloc_free(ret); return NULL;
   10773             :                         }
   10774           0 :                         if (in == Py_None) {
   10775           0 :                                 ret->ctr1501 = NULL;
   10776             :                         } else {
   10777           0 :                                 ret->ctr1501 = NULL;
   10778           0 :                                 PY_CHECK_TYPE(&srvsvc_NetShareCtr1501_Type, in, talloc_free(ret); return NULL;);
   10779           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10780           0 :                                         PyErr_NoMemory();
   10781           0 :                                         talloc_free(ret); return NULL;
   10782             :                                 }
   10783           0 :                                 ret->ctr1501 = (struct srvsvc_NetShareCtr1501 *)pytalloc_get_ptr(in);
   10784             :                         }
   10785           0 :                         break;
   10786             : 
   10787           0 :                 default:
   10788           0 :                         break;
   10789             : 
   10790             :         }
   10791             : 
   10792           0 :         return ret;
   10793             : }
   10794             : 
   10795           0 : static PyObject *py_srvsvc_NetShareCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10796             : {
   10797           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   10798           0 :         PyObject *mem_ctx_obj = NULL;
   10799           0 :         TALLOC_CTX *mem_ctx = NULL;
   10800           0 :         int level = 0;
   10801           0 :         PyObject *in_obj = NULL;
   10802           0 :         union srvsvc_NetShareCtr *in = NULL;
   10803             : 
   10804           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   10805             :                 discard_const_p(char *, kwnames),
   10806             :                 &mem_ctx_obj,
   10807             :                 &level,
   10808             :                 &in_obj)) {
   10809           0 :                 return NULL;
   10810             :         }
   10811           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   10812           0 :         if (mem_ctx == NULL) {
   10813           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   10814           0 :                 return NULL;
   10815             :         }
   10816           0 :         in = (union srvsvc_NetShareCtr *)pytalloc_get_ptr(in_obj);
   10817           0 :         if (in == NULL) {
   10818           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union srvsvc_NetShareCtr!");
   10819           0 :                 return NULL;
   10820             :         }
   10821             : 
   10822           0 :         return py_import_srvsvc_NetShareCtr(mem_ctx, level, in);
   10823             : }
   10824             : 
   10825           0 : static PyObject *py_srvsvc_NetShareCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10826             : {
   10827           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   10828           0 :         PyObject *mem_ctx_obj = NULL;
   10829           0 :         TALLOC_CTX *mem_ctx = NULL;
   10830           0 :         int level = 0;
   10831           0 :         PyObject *in = NULL;
   10832           0 :         union srvsvc_NetShareCtr *out = NULL;
   10833             : 
   10834           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   10835             :                 discard_const_p(char *, kwnames),
   10836             :                 &mem_ctx_obj,
   10837             :                 &level,
   10838             :                 &in)) {
   10839           0 :                 return NULL;
   10840             :         }
   10841           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   10842           0 :         if (mem_ctx == NULL) {
   10843           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   10844           0 :                 return NULL;
   10845             :         }
   10846             : 
   10847           0 :         out = py_export_srvsvc_NetShareCtr(mem_ctx, level, in);
   10848           0 :         if (out == NULL) {
   10849           0 :                 return NULL;
   10850             :         }
   10851             : 
   10852           0 :         return pytalloc_GenericObject_reference(out);
   10853             : }
   10854             : 
   10855             : static PyMethodDef py_srvsvc_NetShareCtr_methods[] = {
   10856             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareCtr_import),
   10857             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   10858             :                 "T.__import__(mem_ctx, level, in) => ret." },
   10859             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareCtr_export),
   10860             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   10861             :                 "T.__export__(mem_ctx, level, in) => ret." },
   10862             :         { NULL, NULL, 0, NULL }
   10863             : };
   10864             : 
   10865           0 : static PyObject *py_srvsvc_NetShareCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10866             : {
   10867           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   10868           0 :         return NULL;
   10869             : }
   10870             : 
   10871             : 
   10872             : static PyTypeObject srvsvc_NetShareCtr_Type = {
   10873             :         PyVarObject_HEAD_INIT(NULL, 0)
   10874             :         .tp_name = "srvsvc.NetShareCtr",
   10875             :         .tp_getset = NULL,
   10876             :         .tp_methods = py_srvsvc_NetShareCtr_methods,
   10877             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10878             :         .tp_new = py_srvsvc_NetShareCtr_new,
   10879             : };
   10880             : 
   10881             : 
   10882           0 : static PyObject *py_srvsvc_NetShareInfoCtr_get_level(PyObject *obj, void *closure)
   10883             : {
   10884           0 :         struct srvsvc_NetShareInfoCtr *object = (struct srvsvc_NetShareInfoCtr *)pytalloc_get_ptr(obj);
   10885             :         PyObject *py_level;
   10886           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->level);
   10887           0 :         return py_level;
   10888             : }
   10889             : 
   10890           0 : static int py_srvsvc_NetShareInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
   10891             : {
   10892           0 :         struct srvsvc_NetShareInfoCtr *object = (struct srvsvc_NetShareInfoCtr *)pytalloc_get_ptr(py_obj);
   10893           0 :         if (value == NULL) {
   10894           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->level");
   10895           0 :                 return -1;
   10896             :         }
   10897             :         {
   10898           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
   10899           0 :                 if (PyLong_Check(value)) {
   10900             :                         unsigned long long test_var;
   10901           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10902           0 :                         if (PyErr_Occurred() != NULL) {
   10903           0 :                                 return -1;
   10904             :                         }
   10905           0 :                         if (test_var > uint_max) {
   10906           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10907             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10908           0 :                                 return -1;
   10909             :                         }
   10910           0 :                         object->level = test_var;
   10911             :                 } else {
   10912           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10913             :                           PyLong_Type.tp_name);
   10914           0 :                         return -1;
   10915             :                 }
   10916             :         }
   10917           0 :         return 0;
   10918             : }
   10919             : 
   10920           0 : static PyObject *py_srvsvc_NetShareInfoCtr_get_ctr(PyObject *obj, void *closure)
   10921             : {
   10922           0 :         struct srvsvc_NetShareInfoCtr *object = (struct srvsvc_NetShareInfoCtr *)pytalloc_get_ptr(obj);
   10923             :         PyObject *py_ctr;
   10924           0 :         py_ctr = pyrpc_import_union(&srvsvc_NetShareCtr_Type, pytalloc_get_mem_ctx(obj), object->level, &object->ctr, "union srvsvc_NetShareCtr");
   10925           0 :         if (py_ctr == NULL) {
   10926           0 :                 return NULL;
   10927             :         }
   10928           0 :         return py_ctr;
   10929             : }
   10930             : 
   10931           0 : static int py_srvsvc_NetShareInfoCtr_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
   10932             : {
   10933           0 :         struct srvsvc_NetShareInfoCtr *object = (struct srvsvc_NetShareInfoCtr *)pytalloc_get_ptr(py_obj);
   10934           0 :         if (value == NULL) {
   10935           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctr");
   10936           0 :                 return -1;
   10937             :         }
   10938             :         {
   10939             :                 union srvsvc_NetShareCtr *ctr_switch_0;
   10940           0 :                 ctr_switch_0 = (union srvsvc_NetShareCtr *)pyrpc_export_union(&srvsvc_NetShareCtr_Type, pytalloc_get_mem_ctx(py_obj), object->level, value, "union srvsvc_NetShareCtr");
   10941           0 :                 if (ctr_switch_0 == NULL) {
   10942           0 :                         return -1;
   10943             :                 }
   10944           0 :                 object->ctr = *ctr_switch_0;
   10945             :         }
   10946           0 :         return 0;
   10947             : }
   10948             : 
   10949             : static PyGetSetDef py_srvsvc_NetShareInfoCtr_getsetters[] = {
   10950             :         {
   10951             :                 .name = discard_const_p(char, "level"),
   10952             :                 .get = py_srvsvc_NetShareInfoCtr_get_level,
   10953             :                 .set = py_srvsvc_NetShareInfoCtr_set_level,
   10954             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10955             :         },
   10956             :         {
   10957             :                 .name = discard_const_p(char, "ctr"),
   10958             :                 .get = py_srvsvc_NetShareInfoCtr_get_ctr,
   10959             :                 .set = py_srvsvc_NetShareInfoCtr_set_ctr,
   10960             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareCtr")
   10961             :         },
   10962             :         { .name = NULL }
   10963             : };
   10964             : 
   10965           0 : static PyObject *py_srvsvc_NetShareInfoCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10966             : {
   10967           0 :         return pytalloc_new(struct srvsvc_NetShareInfoCtr, type);
   10968             : }
   10969             : 
   10970             : 
   10971             : static PyTypeObject srvsvc_NetShareInfoCtr_Type = {
   10972             :         PyVarObject_HEAD_INIT(NULL, 0)
   10973             :         .tp_name = "srvsvc.NetShareInfoCtr",
   10974             :         .tp_getset = py_srvsvc_NetShareInfoCtr_getsetters,
   10975             :         .tp_methods = NULL,
   10976             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10977             :         .tp_new = py_srvsvc_NetShareInfoCtr_new,
   10978             : };
   10979             : 
   10980             : 
   10981           0 : static PyObject *py_srvsvc_NetSrvInfo100_get_platform_id(PyObject *obj, void *closure)
   10982             : {
   10983           0 :         struct srvsvc_NetSrvInfo100 *object = (struct srvsvc_NetSrvInfo100 *)pytalloc_get_ptr(obj);
   10984             :         PyObject *py_platform_id;
   10985           0 :         py_platform_id = PyLong_FromUnsignedLongLong((uint32_t)object->platform_id);
   10986           0 :         return py_platform_id;
   10987             : }
   10988             : 
   10989           0 : static int py_srvsvc_NetSrvInfo100_set_platform_id(PyObject *py_obj, PyObject *value, void *closure)
   10990             : {
   10991           0 :         struct srvsvc_NetSrvInfo100 *object = (struct srvsvc_NetSrvInfo100 *)pytalloc_get_ptr(py_obj);
   10992           0 :         if (value == NULL) {
   10993           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->platform_id");
   10994           0 :                 return -1;
   10995             :         }
   10996             :         {
   10997           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->platform_id));
   10998           0 :                 if (PyLong_Check(value)) {
   10999             :                         unsigned long long test_var;
   11000           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11001           0 :                         if (PyErr_Occurred() != NULL) {
   11002           0 :                                 return -1;
   11003             :                         }
   11004           0 :                         if (test_var > uint_max) {
   11005           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11006             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11007           0 :                                 return -1;
   11008             :                         }
   11009           0 :                         object->platform_id = test_var;
   11010             :                 } else {
   11011           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11012             :                           PyLong_Type.tp_name);
   11013           0 :                         return -1;
   11014             :                 }
   11015             :         }
   11016           0 :         return 0;
   11017             : }
   11018             : 
   11019           0 : static PyObject *py_srvsvc_NetSrvInfo100_get_server_name(PyObject *obj, void *closure)
   11020             : {
   11021           0 :         struct srvsvc_NetSrvInfo100 *object = (struct srvsvc_NetSrvInfo100 *)pytalloc_get_ptr(obj);
   11022             :         PyObject *py_server_name;
   11023           0 :         if (object->server_name == NULL) {
   11024           0 :                 Py_RETURN_NONE;
   11025             :         }
   11026           0 :         if (object->server_name == NULL) {
   11027           0 :                 py_server_name = Py_None;
   11028           0 :                 Py_INCREF(py_server_name);
   11029             :         } else {
   11030           0 :                 if (object->server_name == NULL) {
   11031           0 :                         py_server_name = Py_None;
   11032           0 :                         Py_INCREF(py_server_name);
   11033             :                 } else {
   11034           0 :                         py_server_name = PyUnicode_Decode(object->server_name, strlen(object->server_name), "utf-8", "ignore");
   11035             :                 }
   11036             :         }
   11037           0 :         return py_server_name;
   11038             : }
   11039             : 
   11040           0 : static int py_srvsvc_NetSrvInfo100_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   11041             : {
   11042           0 :         struct srvsvc_NetSrvInfo100 *object = (struct srvsvc_NetSrvInfo100 *)pytalloc_get_ptr(py_obj);
   11043           0 :         if (value == NULL) {
   11044           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->server_name");
   11045           0 :                 return -1;
   11046             :         }
   11047           0 :         if (value == Py_None) {
   11048           0 :                 object->server_name = NULL;
   11049             :         } else {
   11050           0 :                 object->server_name = NULL;
   11051             :                 {
   11052             :                         const char *test_str;
   11053             :                         const char *talloc_str;
   11054           0 :                         PyObject *unicode = NULL;
   11055           0 :                         if (PyUnicode_Check(value)) {
   11056           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   11057           0 :                                 if (unicode == NULL) {
   11058           0 :                                         PyErr_NoMemory();
   11059           0 :                                         return -1;
   11060             :                                 }
   11061           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   11062           0 :                         } else if (PyBytes_Check(value)) {
   11063           0 :                                 test_str = PyBytes_AS_STRING(value);
   11064             :                         } else {
   11065           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   11066           0 :                                 return -1;
   11067             :                         }
   11068           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   11069           0 :                         if (unicode != NULL) {
   11070           0 :                                 Py_DECREF(unicode);
   11071             :                         }
   11072           0 :                         if (talloc_str == NULL) {
   11073           0 :                                 PyErr_NoMemory();
   11074           0 :                                 return -1;
   11075             :                         }
   11076           0 :                         object->server_name = talloc_str;
   11077             :                 }
   11078             :         }
   11079           0 :         return 0;
   11080             : }
   11081             : 
   11082             : static PyGetSetDef py_srvsvc_NetSrvInfo100_getsetters[] = {
   11083             :         {
   11084             :                 .name = discard_const_p(char, "platform_id"),
   11085             :                 .get = py_srvsvc_NetSrvInfo100_get_platform_id,
   11086             :                 .set = py_srvsvc_NetSrvInfo100_set_platform_id,
   11087             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_PlatformId")
   11088             :         },
   11089             :         {
   11090             :                 .name = discard_const_p(char, "server_name"),
   11091             :                 .get = py_srvsvc_NetSrvInfo100_get_server_name,
   11092             :                 .set = py_srvsvc_NetSrvInfo100_set_server_name,
   11093             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   11094             :         },
   11095             :         { .name = NULL }
   11096             : };
   11097             : 
   11098           0 : static PyObject *py_srvsvc_NetSrvInfo100_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11099             : {
   11100           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo100, type);
   11101             : }
   11102             : 
   11103           0 : static PyObject *py_srvsvc_NetSrvInfo100_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   11104             : {
   11105           0 :         struct srvsvc_NetSrvInfo100 *object = (struct srvsvc_NetSrvInfo100 *)pytalloc_get_ptr(py_obj);
   11106           0 :         PyObject *ret = NULL;
   11107             :         DATA_BLOB blob;
   11108             :         enum ndr_err_code err;
   11109           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   11110           0 :         if (tmp_ctx == NULL) {
   11111           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   11112           0 :                 return NULL;
   11113             :         }
   11114           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSrvInfo100);
   11115           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   11116           0 :                 TALLOC_FREE(tmp_ctx);
   11117           0 :                 PyErr_SetNdrError(err);
   11118           0 :                 return NULL;
   11119             :         }
   11120             : 
   11121           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   11122           0 :         TALLOC_FREE(tmp_ctx);
   11123           0 :         return ret;
   11124             : }
   11125             : 
   11126           0 : static PyObject *py_srvsvc_NetSrvInfo100_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11127             : {
   11128           0 :         struct srvsvc_NetSrvInfo100 *object = (struct srvsvc_NetSrvInfo100 *)pytalloc_get_ptr(py_obj);
   11129           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   11130           0 :         Py_ssize_t blob_length = 0;
   11131             :         enum ndr_err_code err;
   11132           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   11133           0 :         PyObject *allow_remaining_obj = NULL;
   11134           0 :         bool allow_remaining = false;
   11135             : 
   11136           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   11137             :                 discard_const_p(char *, kwnames),
   11138             :                 &blob.data, &blob_length,
   11139             :                 &allow_remaining_obj)) {
   11140           0 :                 return NULL;
   11141             :         }
   11142           0 :         blob.length = blob_length;
   11143             : 
   11144           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   11145           0 :                 allow_remaining = true;
   11146             :         }
   11147             : 
   11148           0 :         if (allow_remaining) {
   11149           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSrvInfo100);
   11150             :         } else {
   11151           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSrvInfo100);
   11152             :         }
   11153           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   11154           0 :                 PyErr_SetNdrError(err);
   11155           0 :                 return NULL;
   11156             :         }
   11157             : 
   11158           0 :         Py_RETURN_NONE;
   11159             : }
   11160             : 
   11161           0 : static PyObject *py_srvsvc_NetSrvInfo100_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   11162             : {
   11163           0 :         struct srvsvc_NetSrvInfo100 *object = (struct srvsvc_NetSrvInfo100 *)pytalloc_get_ptr(py_obj);
   11164             :         PyObject *ret;
   11165             :         char *retstr;
   11166             : 
   11167           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_srvsvc_NetSrvInfo100, "srvsvc_NetSrvInfo100", object);
   11168           0 :         ret = PyUnicode_FromString(retstr);
   11169           0 :         talloc_free(retstr);
   11170             : 
   11171           0 :         return ret;
   11172             : }
   11173             : 
   11174             : static PyMethodDef py_srvsvc_NetSrvInfo100_methods[] = {
   11175             :         { "__ndr_pack__", (PyCFunction)py_srvsvc_NetSrvInfo100_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   11176             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSrvInfo100_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   11177             :         { "__ndr_print__", (PyCFunction)py_srvsvc_NetSrvInfo100_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   11178             :         { NULL, NULL, 0, NULL }
   11179             : };
   11180             : 
   11181             : 
   11182             : static PyTypeObject srvsvc_NetSrvInfo100_Type = {
   11183             :         PyVarObject_HEAD_INIT(NULL, 0)
   11184             :         .tp_name = "srvsvc.NetSrvInfo100",
   11185             :         .tp_getset = py_srvsvc_NetSrvInfo100_getsetters,
   11186             :         .tp_methods = py_srvsvc_NetSrvInfo100_methods,
   11187             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11188             :         .tp_new = py_srvsvc_NetSrvInfo100_new,
   11189             : };
   11190             : 
   11191             : 
   11192           0 : static PyObject *py_srvsvc_NetSrvInfo101_get_platform_id(PyObject *obj, void *closure)
   11193             : {
   11194           0 :         struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(obj);
   11195             :         PyObject *py_platform_id;
   11196           0 :         py_platform_id = PyLong_FromUnsignedLongLong((uint32_t)object->platform_id);
   11197           0 :         return py_platform_id;
   11198             : }
   11199             : 
   11200           0 : static int py_srvsvc_NetSrvInfo101_set_platform_id(PyObject *py_obj, PyObject *value, void *closure)
   11201             : {
   11202           0 :         struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(py_obj);
   11203           0 :         if (value == NULL) {
   11204           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->platform_id");
   11205           0 :                 return -1;
   11206             :         }
   11207             :         {
   11208           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->platform_id));
   11209           0 :                 if (PyLong_Check(value)) {
   11210             :                         unsigned long long test_var;
   11211           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11212           0 :                         if (PyErr_Occurred() != NULL) {
   11213           0 :                                 return -1;
   11214             :                         }
   11215           0 :                         if (test_var > uint_max) {
   11216           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11217             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11218           0 :                                 return -1;
   11219             :                         }
   11220           0 :                         object->platform_id = test_var;
   11221             :                 } else {
   11222           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11223             :                           PyLong_Type.tp_name);
   11224           0 :                         return -1;
   11225             :                 }
   11226             :         }
   11227           0 :         return 0;
   11228             : }
   11229             : 
   11230           0 : static PyObject *py_srvsvc_NetSrvInfo101_get_server_name(PyObject *obj, void *closure)
   11231             : {
   11232           0 :         struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(obj);
   11233             :         PyObject *py_server_name;
   11234           0 :         if (object->server_name == NULL) {
   11235           0 :                 Py_RETURN_NONE;
   11236             :         }
   11237           0 :         if (object->server_name == NULL) {
   11238           0 :                 py_server_name = Py_None;
   11239           0 :                 Py_INCREF(py_server_name);
   11240             :         } else {
   11241           0 :                 if (object->server_name == NULL) {
   11242           0 :                         py_server_name = Py_None;
   11243           0 :                         Py_INCREF(py_server_name);
   11244             :                 } else {
   11245           0 :                         py_server_name = PyUnicode_Decode(object->server_name, strlen(object->server_name), "utf-8", "ignore");
   11246             :                 }
   11247             :         }
   11248           0 :         return py_server_name;
   11249             : }
   11250             : 
   11251           0 : static int py_srvsvc_NetSrvInfo101_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   11252             : {
   11253           0 :         struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(py_obj);
   11254           0 :         if (value == NULL) {
   11255           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->server_name");
   11256           0 :                 return -1;
   11257             :         }
   11258           0 :         if (value == Py_None) {
   11259           0 :                 object->server_name = NULL;
   11260             :         } else {
   11261           0 :                 object->server_name = NULL;
   11262             :                 {
   11263             :                         const char *test_str;
   11264             :                         const char *talloc_str;
   11265           0 :                         PyObject *unicode = NULL;
   11266           0 :                         if (PyUnicode_Check(value)) {
   11267           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   11268           0 :                                 if (unicode == NULL) {
   11269           0 :                                         PyErr_NoMemory();
   11270           0 :                                         return -1;
   11271             :                                 }
   11272           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   11273           0 :                         } else if (PyBytes_Check(value)) {
   11274           0 :                                 test_str = PyBytes_AS_STRING(value);
   11275             :                         } else {
   11276           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   11277           0 :                                 return -1;
   11278             :                         }
   11279           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   11280           0 :                         if (unicode != NULL) {
   11281           0 :                                 Py_DECREF(unicode);
   11282             :                         }
   11283           0 :                         if (talloc_str == NULL) {
   11284           0 :                                 PyErr_NoMemory();
   11285           0 :                                 return -1;
   11286             :                         }
   11287           0 :                         object->server_name = talloc_str;
   11288             :                 }
   11289             :         }
   11290           0 :         return 0;
   11291             : }
   11292             : 
   11293           0 : static PyObject *py_srvsvc_NetSrvInfo101_get_version_major(PyObject *obj, void *closure)
   11294             : {
   11295           0 :         struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(obj);
   11296             :         PyObject *py_version_major;
   11297           0 :         py_version_major = PyLong_FromUnsignedLongLong((uint32_t)object->version_major);
   11298           0 :         return py_version_major;
   11299             : }
   11300             : 
   11301           0 : static int py_srvsvc_NetSrvInfo101_set_version_major(PyObject *py_obj, PyObject *value, void *closure)
   11302             : {
   11303           0 :         struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(py_obj);
   11304           0 :         if (value == NULL) {
   11305           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version_major");
   11306           0 :                 return -1;
   11307             :         }
   11308             :         {
   11309           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version_major));
   11310           0 :                 if (PyLong_Check(value)) {
   11311             :                         unsigned long long test_var;
   11312           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11313           0 :                         if (PyErr_Occurred() != NULL) {
   11314           0 :                                 return -1;
   11315             :                         }
   11316           0 :                         if (test_var > uint_max) {
   11317           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11318             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11319           0 :                                 return -1;
   11320             :                         }
   11321           0 :                         object->version_major = test_var;
   11322             :                 } else {
   11323           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11324             :                           PyLong_Type.tp_name);
   11325           0 :                         return -1;
   11326             :                 }
   11327             :         }
   11328           0 :         return 0;
   11329             : }
   11330             : 
   11331           0 : static PyObject *py_srvsvc_NetSrvInfo101_get_version_minor(PyObject *obj, void *closure)
   11332             : {
   11333           0 :         struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(obj);
   11334             :         PyObject *py_version_minor;
   11335           0 :         py_version_minor = PyLong_FromUnsignedLongLong((uint32_t)object->version_minor);
   11336           0 :         return py_version_minor;
   11337             : }
   11338             : 
   11339           0 : static int py_srvsvc_NetSrvInfo101_set_version_minor(PyObject *py_obj, PyObject *value, void *closure)
   11340             : {
   11341           0 :         struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(py_obj);
   11342           0 :         if (value == NULL) {
   11343           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version_minor");
   11344           0 :                 return -1;
   11345             :         }
   11346             :         {
   11347           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version_minor));
   11348           0 :                 if (PyLong_Check(value)) {
   11349             :                         unsigned long long test_var;
   11350           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11351           0 :                         if (PyErr_Occurred() != NULL) {
   11352           0 :                                 return -1;
   11353             :                         }
   11354           0 :                         if (test_var > uint_max) {
   11355           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11356             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11357           0 :                                 return -1;
   11358             :                         }
   11359           0 :                         object->version_minor = test_var;
   11360             :                 } else {
   11361           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11362             :                           PyLong_Type.tp_name);
   11363           0 :                         return -1;
   11364             :                 }
   11365             :         }
   11366           0 :         return 0;
   11367             : }
   11368             : 
   11369           0 : static PyObject *py_srvsvc_NetSrvInfo101_get_server_type(PyObject *obj, void *closure)
   11370             : {
   11371           0 :         struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(obj);
   11372             :         PyObject *py_server_type;
   11373           0 :         py_server_type = PyLong_FromUnsignedLongLong((uint32_t)object->server_type);
   11374           0 :         return py_server_type;
   11375             : }
   11376             : 
   11377           0 : static int py_srvsvc_NetSrvInfo101_set_server_type(PyObject *py_obj, PyObject *value, void *closure)
   11378             : {
   11379           0 :         struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(py_obj);
   11380           0 :         if (value == NULL) {
   11381           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->server_type");
   11382           0 :                 return -1;
   11383             :         }
   11384             :         {
   11385           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->server_type));
   11386           0 :                 if (PyLong_Check(value)) {
   11387             :                         unsigned long long test_var;
   11388           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11389           0 :                         if (PyErr_Occurred() != NULL) {
   11390           0 :                                 return -1;
   11391             :                         }
   11392           0 :                         if (test_var > uint_max) {
   11393           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11394             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11395           0 :                                 return -1;
   11396             :                         }
   11397           0 :                         object->server_type = test_var;
   11398             :                 } else {
   11399           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11400             :                           PyLong_Type.tp_name);
   11401           0 :                         return -1;
   11402             :                 }
   11403             :         }
   11404           0 :         return 0;
   11405             : }
   11406             : 
   11407           0 : static PyObject *py_srvsvc_NetSrvInfo101_get_comment(PyObject *obj, void *closure)
   11408             : {
   11409           0 :         struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(obj);
   11410             :         PyObject *py_comment;
   11411           0 :         if (object->comment == NULL) {
   11412           0 :                 Py_RETURN_NONE;
   11413             :         }
   11414           0 :         if (object->comment == NULL) {
   11415           0 :                 py_comment = Py_None;
   11416           0 :                 Py_INCREF(py_comment);
   11417             :         } else {
   11418           0 :                 if (object->comment == NULL) {
   11419           0 :                         py_comment = Py_None;
   11420           0 :                         Py_INCREF(py_comment);
   11421             :                 } else {
   11422           0 :                         py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
   11423             :                 }
   11424             :         }
   11425           0 :         return py_comment;
   11426             : }
   11427             : 
   11428           0 : static int py_srvsvc_NetSrvInfo101_set_comment(PyObject *py_obj, PyObject *value, void *closure)
   11429             : {
   11430           0 :         struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(py_obj);
   11431           0 :         if (value == NULL) {
   11432           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->comment");
   11433           0 :                 return -1;
   11434             :         }
   11435           0 :         if (value == Py_None) {
   11436           0 :                 object->comment = NULL;
   11437             :         } else {
   11438           0 :                 object->comment = NULL;
   11439             :                 {
   11440             :                         const char *test_str;
   11441             :                         const char *talloc_str;
   11442           0 :                         PyObject *unicode = NULL;
   11443           0 :                         if (PyUnicode_Check(value)) {
   11444           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   11445           0 :                                 if (unicode == NULL) {
   11446           0 :                                         PyErr_NoMemory();
   11447           0 :                                         return -1;
   11448             :                                 }
   11449           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   11450           0 :                         } else if (PyBytes_Check(value)) {
   11451           0 :                                 test_str = PyBytes_AS_STRING(value);
   11452             :                         } else {
   11453           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   11454           0 :                                 return -1;
   11455             :                         }
   11456           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   11457           0 :                         if (unicode != NULL) {
   11458           0 :                                 Py_DECREF(unicode);
   11459             :                         }
   11460           0 :                         if (talloc_str == NULL) {
   11461           0 :                                 PyErr_NoMemory();
   11462           0 :                                 return -1;
   11463             :                         }
   11464           0 :                         object->comment = talloc_str;
   11465             :                 }
   11466             :         }
   11467           0 :         return 0;
   11468             : }
   11469             : 
   11470             : static PyGetSetDef py_srvsvc_NetSrvInfo101_getsetters[] = {
   11471             :         {
   11472             :                 .name = discard_const_p(char, "platform_id"),
   11473             :                 .get = py_srvsvc_NetSrvInfo101_get_platform_id,
   11474             :                 .set = py_srvsvc_NetSrvInfo101_set_platform_id,
   11475             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_PlatformId")
   11476             :         },
   11477             :         {
   11478             :                 .name = discard_const_p(char, "server_name"),
   11479             :                 .get = py_srvsvc_NetSrvInfo101_get_server_name,
   11480             :                 .set = py_srvsvc_NetSrvInfo101_set_server_name,
   11481             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   11482             :         },
   11483             :         {
   11484             :                 .name = discard_const_p(char, "version_major"),
   11485             :                 .get = py_srvsvc_NetSrvInfo101_get_version_major,
   11486             :                 .set = py_srvsvc_NetSrvInfo101_set_version_major,
   11487             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11488             :         },
   11489             :         {
   11490             :                 .name = discard_const_p(char, "version_minor"),
   11491             :                 .get = py_srvsvc_NetSrvInfo101_get_version_minor,
   11492             :                 .set = py_srvsvc_NetSrvInfo101_set_version_minor,
   11493             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11494             :         },
   11495             :         {
   11496             :                 .name = discard_const_p(char, "server_type"),
   11497             :                 .get = py_srvsvc_NetSrvInfo101_get_server_type,
   11498             :                 .set = py_srvsvc_NetSrvInfo101_set_server_type,
   11499             :                 .doc = discard_const_p(char, "PIDL-generated element of base type svcctl_ServerType")
   11500             :         },
   11501             :         {
   11502             :                 .name = discard_const_p(char, "comment"),
   11503             :                 .get = py_srvsvc_NetSrvInfo101_get_comment,
   11504             :                 .set = py_srvsvc_NetSrvInfo101_set_comment,
   11505             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   11506             :         },
   11507             :         { .name = NULL }
   11508             : };
   11509             : 
   11510           0 : static PyObject *py_srvsvc_NetSrvInfo101_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11511             : {
   11512           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo101, type);
   11513             : }
   11514             : 
   11515           0 : static PyObject *py_srvsvc_NetSrvInfo101_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   11516             : {
   11517           0 :         struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(py_obj);
   11518           0 :         PyObject *ret = NULL;
   11519             :         DATA_BLOB blob;
   11520             :         enum ndr_err_code err;
   11521           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   11522           0 :         if (tmp_ctx == NULL) {
   11523           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   11524           0 :                 return NULL;
   11525             :         }
   11526           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSrvInfo101);
   11527           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   11528           0 :                 TALLOC_FREE(tmp_ctx);
   11529           0 :                 PyErr_SetNdrError(err);
   11530           0 :                 return NULL;
   11531             :         }
   11532             : 
   11533           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   11534           0 :         TALLOC_FREE(tmp_ctx);
   11535           0 :         return ret;
   11536             : }
   11537             : 
   11538           0 : static PyObject *py_srvsvc_NetSrvInfo101_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11539             : {
   11540           0 :         struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(py_obj);
   11541           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   11542           0 :         Py_ssize_t blob_length = 0;
   11543             :         enum ndr_err_code err;
   11544           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   11545           0 :         PyObject *allow_remaining_obj = NULL;
   11546           0 :         bool allow_remaining = false;
   11547             : 
   11548           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   11549             :                 discard_const_p(char *, kwnames),
   11550             :                 &blob.data, &blob_length,
   11551             :                 &allow_remaining_obj)) {
   11552           0 :                 return NULL;
   11553             :         }
   11554           0 :         blob.length = blob_length;
   11555             : 
   11556           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   11557           0 :                 allow_remaining = true;
   11558             :         }
   11559             : 
   11560           0 :         if (allow_remaining) {
   11561           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSrvInfo101);
   11562             :         } else {
   11563           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSrvInfo101);
   11564             :         }
   11565           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   11566           0 :                 PyErr_SetNdrError(err);
   11567           0 :                 return NULL;
   11568             :         }
   11569             : 
   11570           0 :         Py_RETURN_NONE;
   11571             : }
   11572             : 
   11573           0 : static PyObject *py_srvsvc_NetSrvInfo101_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   11574             : {
   11575           0 :         struct srvsvc_NetSrvInfo101 *object = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(py_obj);
   11576             :         PyObject *ret;
   11577             :         char *retstr;
   11578             : 
   11579           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_srvsvc_NetSrvInfo101, "srvsvc_NetSrvInfo101", object);
   11580           0 :         ret = PyUnicode_FromString(retstr);
   11581           0 :         talloc_free(retstr);
   11582             : 
   11583           0 :         return ret;
   11584             : }
   11585             : 
   11586             : static PyMethodDef py_srvsvc_NetSrvInfo101_methods[] = {
   11587             :         { "__ndr_pack__", (PyCFunction)py_srvsvc_NetSrvInfo101_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   11588             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSrvInfo101_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   11589             :         { "__ndr_print__", (PyCFunction)py_srvsvc_NetSrvInfo101_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   11590             :         { NULL, NULL, 0, NULL }
   11591             : };
   11592             : 
   11593             : 
   11594             : static PyTypeObject srvsvc_NetSrvInfo101_Type = {
   11595             :         PyVarObject_HEAD_INIT(NULL, 0)
   11596             :         .tp_name = "srvsvc.NetSrvInfo101",
   11597             :         .tp_getset = py_srvsvc_NetSrvInfo101_getsetters,
   11598             :         .tp_methods = py_srvsvc_NetSrvInfo101_methods,
   11599             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11600             :         .tp_new = py_srvsvc_NetSrvInfo101_new,
   11601             : };
   11602             : 
   11603             : 
   11604           0 : static PyObject *py_srvsvc_NetSrvInfo102_get_platform_id(PyObject *obj, void *closure)
   11605             : {
   11606           0 :         struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
   11607             :         PyObject *py_platform_id;
   11608           0 :         py_platform_id = PyLong_FromUnsignedLongLong((uint32_t)object->platform_id);
   11609           0 :         return py_platform_id;
   11610             : }
   11611             : 
   11612           0 : static int py_srvsvc_NetSrvInfo102_set_platform_id(PyObject *py_obj, PyObject *value, void *closure)
   11613             : {
   11614           0 :         struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
   11615           0 :         if (value == NULL) {
   11616           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->platform_id");
   11617           0 :                 return -1;
   11618             :         }
   11619             :         {
   11620           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->platform_id));
   11621           0 :                 if (PyLong_Check(value)) {
   11622             :                         unsigned long long test_var;
   11623           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11624           0 :                         if (PyErr_Occurred() != NULL) {
   11625           0 :                                 return -1;
   11626             :                         }
   11627           0 :                         if (test_var > uint_max) {
   11628           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11629             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11630           0 :                                 return -1;
   11631             :                         }
   11632           0 :                         object->platform_id = test_var;
   11633             :                 } else {
   11634           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11635             :                           PyLong_Type.tp_name);
   11636           0 :                         return -1;
   11637             :                 }
   11638             :         }
   11639           0 :         return 0;
   11640             : }
   11641             : 
   11642           0 : static PyObject *py_srvsvc_NetSrvInfo102_get_server_name(PyObject *obj, void *closure)
   11643             : {
   11644           0 :         struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
   11645             :         PyObject *py_server_name;
   11646           0 :         if (object->server_name == NULL) {
   11647           0 :                 Py_RETURN_NONE;
   11648             :         }
   11649           0 :         if (object->server_name == NULL) {
   11650           0 :                 py_server_name = Py_None;
   11651           0 :                 Py_INCREF(py_server_name);
   11652             :         } else {
   11653           0 :                 if (object->server_name == NULL) {
   11654           0 :                         py_server_name = Py_None;
   11655           0 :                         Py_INCREF(py_server_name);
   11656             :                 } else {
   11657           0 :                         py_server_name = PyUnicode_Decode(object->server_name, strlen(object->server_name), "utf-8", "ignore");
   11658             :                 }
   11659             :         }
   11660           0 :         return py_server_name;
   11661             : }
   11662             : 
   11663           0 : static int py_srvsvc_NetSrvInfo102_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   11664             : {
   11665           0 :         struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
   11666           0 :         if (value == NULL) {
   11667           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->server_name");
   11668           0 :                 return -1;
   11669             :         }
   11670           0 :         if (value == Py_None) {
   11671           0 :                 object->server_name = NULL;
   11672             :         } else {
   11673           0 :                 object->server_name = NULL;
   11674             :                 {
   11675             :                         const char *test_str;
   11676             :                         const char *talloc_str;
   11677           0 :                         PyObject *unicode = NULL;
   11678           0 :                         if (PyUnicode_Check(value)) {
   11679           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   11680           0 :                                 if (unicode == NULL) {
   11681           0 :                                         PyErr_NoMemory();
   11682           0 :                                         return -1;
   11683             :                                 }
   11684           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   11685           0 :                         } else if (PyBytes_Check(value)) {
   11686           0 :                                 test_str = PyBytes_AS_STRING(value);
   11687             :                         } else {
   11688           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   11689           0 :                                 return -1;
   11690             :                         }
   11691           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   11692           0 :                         if (unicode != NULL) {
   11693           0 :                                 Py_DECREF(unicode);
   11694             :                         }
   11695           0 :                         if (talloc_str == NULL) {
   11696           0 :                                 PyErr_NoMemory();
   11697           0 :                                 return -1;
   11698             :                         }
   11699           0 :                         object->server_name = talloc_str;
   11700             :                 }
   11701             :         }
   11702           0 :         return 0;
   11703             : }
   11704             : 
   11705           0 : static PyObject *py_srvsvc_NetSrvInfo102_get_version_major(PyObject *obj, void *closure)
   11706             : {
   11707           0 :         struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
   11708             :         PyObject *py_version_major;
   11709           0 :         py_version_major = PyLong_FromUnsignedLongLong((uint32_t)object->version_major);
   11710           0 :         return py_version_major;
   11711             : }
   11712             : 
   11713           0 : static int py_srvsvc_NetSrvInfo102_set_version_major(PyObject *py_obj, PyObject *value, void *closure)
   11714             : {
   11715           0 :         struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
   11716           0 :         if (value == NULL) {
   11717           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version_major");
   11718           0 :                 return -1;
   11719             :         }
   11720             :         {
   11721           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version_major));
   11722           0 :                 if (PyLong_Check(value)) {
   11723             :                         unsigned long long test_var;
   11724           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11725           0 :                         if (PyErr_Occurred() != NULL) {
   11726           0 :                                 return -1;
   11727             :                         }
   11728           0 :                         if (test_var > uint_max) {
   11729           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11730             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11731           0 :                                 return -1;
   11732             :                         }
   11733           0 :                         object->version_major = test_var;
   11734             :                 } else {
   11735           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11736             :                           PyLong_Type.tp_name);
   11737           0 :                         return -1;
   11738             :                 }
   11739             :         }
   11740           0 :         return 0;
   11741             : }
   11742             : 
   11743           0 : static PyObject *py_srvsvc_NetSrvInfo102_get_version_minor(PyObject *obj, void *closure)
   11744             : {
   11745           0 :         struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
   11746             :         PyObject *py_version_minor;
   11747           0 :         py_version_minor = PyLong_FromUnsignedLongLong((uint32_t)object->version_minor);
   11748           0 :         return py_version_minor;
   11749             : }
   11750             : 
   11751           0 : static int py_srvsvc_NetSrvInfo102_set_version_minor(PyObject *py_obj, PyObject *value, void *closure)
   11752             : {
   11753           0 :         struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
   11754           0 :         if (value == NULL) {
   11755           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version_minor");
   11756           0 :                 return -1;
   11757             :         }
   11758             :         {
   11759           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version_minor));
   11760           0 :                 if (PyLong_Check(value)) {
   11761             :                         unsigned long long test_var;
   11762           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11763           0 :                         if (PyErr_Occurred() != NULL) {
   11764           0 :                                 return -1;
   11765             :                         }
   11766           0 :                         if (test_var > uint_max) {
   11767           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11768             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11769           0 :                                 return -1;
   11770             :                         }
   11771           0 :                         object->version_minor = test_var;
   11772             :                 } else {
   11773           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11774             :                           PyLong_Type.tp_name);
   11775           0 :                         return -1;
   11776             :                 }
   11777             :         }
   11778           0 :         return 0;
   11779             : }
   11780             : 
   11781           0 : static PyObject *py_srvsvc_NetSrvInfo102_get_server_type(PyObject *obj, void *closure)
   11782             : {
   11783           0 :         struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
   11784             :         PyObject *py_server_type;
   11785           0 :         py_server_type = PyLong_FromUnsignedLongLong((uint32_t)object->server_type);
   11786           0 :         return py_server_type;
   11787             : }
   11788             : 
   11789           0 : static int py_srvsvc_NetSrvInfo102_set_server_type(PyObject *py_obj, PyObject *value, void *closure)
   11790             : {
   11791           0 :         struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
   11792           0 :         if (value == NULL) {
   11793           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->server_type");
   11794           0 :                 return -1;
   11795             :         }
   11796             :         {
   11797           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->server_type));
   11798           0 :                 if (PyLong_Check(value)) {
   11799             :                         unsigned long long test_var;
   11800           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11801           0 :                         if (PyErr_Occurred() != NULL) {
   11802           0 :                                 return -1;
   11803             :                         }
   11804           0 :                         if (test_var > uint_max) {
   11805           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11806             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11807           0 :                                 return -1;
   11808             :                         }
   11809           0 :                         object->server_type = test_var;
   11810             :                 } else {
   11811           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11812             :                           PyLong_Type.tp_name);
   11813           0 :                         return -1;
   11814             :                 }
   11815             :         }
   11816           0 :         return 0;
   11817             : }
   11818             : 
   11819           0 : static PyObject *py_srvsvc_NetSrvInfo102_get_comment(PyObject *obj, void *closure)
   11820             : {
   11821           0 :         struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
   11822             :         PyObject *py_comment;
   11823           0 :         if (object->comment == NULL) {
   11824           0 :                 Py_RETURN_NONE;
   11825             :         }
   11826           0 :         if (object->comment == NULL) {
   11827           0 :                 py_comment = Py_None;
   11828           0 :                 Py_INCREF(py_comment);
   11829             :         } else {
   11830           0 :                 if (object->comment == NULL) {
   11831           0 :                         py_comment = Py_None;
   11832           0 :                         Py_INCREF(py_comment);
   11833             :                 } else {
   11834           0 :                         py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
   11835             :                 }
   11836             :         }
   11837           0 :         return py_comment;
   11838             : }
   11839             : 
   11840           0 : static int py_srvsvc_NetSrvInfo102_set_comment(PyObject *py_obj, PyObject *value, void *closure)
   11841             : {
   11842           0 :         struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
   11843           0 :         if (value == NULL) {
   11844           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->comment");
   11845           0 :                 return -1;
   11846             :         }
   11847           0 :         if (value == Py_None) {
   11848           0 :                 object->comment = NULL;
   11849             :         } else {
   11850           0 :                 object->comment = NULL;
   11851             :                 {
   11852             :                         const char *test_str;
   11853             :                         const char *talloc_str;
   11854           0 :                         PyObject *unicode = NULL;
   11855           0 :                         if (PyUnicode_Check(value)) {
   11856           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   11857           0 :                                 if (unicode == NULL) {
   11858           0 :                                         PyErr_NoMemory();
   11859           0 :                                         return -1;
   11860             :                                 }
   11861           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   11862           0 :                         } else if (PyBytes_Check(value)) {
   11863           0 :                                 test_str = PyBytes_AS_STRING(value);
   11864             :                         } else {
   11865           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   11866           0 :                                 return -1;
   11867             :                         }
   11868           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   11869           0 :                         if (unicode != NULL) {
   11870           0 :                                 Py_DECREF(unicode);
   11871             :                         }
   11872           0 :                         if (talloc_str == NULL) {
   11873           0 :                                 PyErr_NoMemory();
   11874           0 :                                 return -1;
   11875             :                         }
   11876           0 :                         object->comment = talloc_str;
   11877             :                 }
   11878             :         }
   11879           0 :         return 0;
   11880             : }
   11881             : 
   11882           0 : static PyObject *py_srvsvc_NetSrvInfo102_get_users(PyObject *obj, void *closure)
   11883             : {
   11884           0 :         struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
   11885             :         PyObject *py_users;
   11886           0 :         py_users = PyLong_FromUnsignedLongLong((uint32_t)object->users);
   11887           0 :         return py_users;
   11888             : }
   11889             : 
   11890           0 : static int py_srvsvc_NetSrvInfo102_set_users(PyObject *py_obj, PyObject *value, void *closure)
   11891             : {
   11892           0 :         struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
   11893           0 :         if (value == NULL) {
   11894           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->users");
   11895           0 :                 return -1;
   11896             :         }
   11897             :         {
   11898           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->users));
   11899           0 :                 if (PyLong_Check(value)) {
   11900             :                         unsigned long long test_var;
   11901           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11902           0 :                         if (PyErr_Occurred() != NULL) {
   11903           0 :                                 return -1;
   11904             :                         }
   11905           0 :                         if (test_var > uint_max) {
   11906           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11907             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11908           0 :                                 return -1;
   11909             :                         }
   11910           0 :                         object->users = test_var;
   11911             :                 } else {
   11912           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11913             :                           PyLong_Type.tp_name);
   11914           0 :                         return -1;
   11915             :                 }
   11916             :         }
   11917           0 :         return 0;
   11918             : }
   11919             : 
   11920           0 : static PyObject *py_srvsvc_NetSrvInfo102_get_disc(PyObject *obj, void *closure)
   11921             : {
   11922           0 :         struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
   11923             :         PyObject *py_disc;
   11924           0 :         py_disc = PyLong_FromUnsignedLongLong((uint32_t)object->disc);
   11925           0 :         return py_disc;
   11926             : }
   11927             : 
   11928           0 : static int py_srvsvc_NetSrvInfo102_set_disc(PyObject *py_obj, PyObject *value, void *closure)
   11929             : {
   11930           0 :         struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
   11931           0 :         if (value == NULL) {
   11932           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->disc");
   11933           0 :                 return -1;
   11934             :         }
   11935             :         {
   11936           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->disc));
   11937           0 :                 if (PyLong_Check(value)) {
   11938             :                         unsigned long long test_var;
   11939           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11940           0 :                         if (PyErr_Occurred() != NULL) {
   11941           0 :                                 return -1;
   11942             :                         }
   11943           0 :                         if (test_var > uint_max) {
   11944           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11945             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11946           0 :                                 return -1;
   11947             :                         }
   11948           0 :                         object->disc = test_var;
   11949             :                 } else {
   11950           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11951             :                           PyLong_Type.tp_name);
   11952           0 :                         return -1;
   11953             :                 }
   11954             :         }
   11955           0 :         return 0;
   11956             : }
   11957             : 
   11958           0 : static PyObject *py_srvsvc_NetSrvInfo102_get_hidden(PyObject *obj, void *closure)
   11959             : {
   11960           0 :         struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
   11961             :         PyObject *py_hidden;
   11962           0 :         py_hidden = PyLong_FromUnsignedLongLong((uint32_t)object->hidden);
   11963           0 :         return py_hidden;
   11964             : }
   11965             : 
   11966           0 : static int py_srvsvc_NetSrvInfo102_set_hidden(PyObject *py_obj, PyObject *value, void *closure)
   11967             : {
   11968           0 :         struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
   11969           0 :         if (value == NULL) {
   11970           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->hidden");
   11971           0 :                 return -1;
   11972             :         }
   11973             :         {
   11974           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->hidden));
   11975           0 :                 if (PyLong_Check(value)) {
   11976             :                         unsigned long long test_var;
   11977           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11978           0 :                         if (PyErr_Occurred() != NULL) {
   11979           0 :                                 return -1;
   11980             :                         }
   11981           0 :                         if (test_var > uint_max) {
   11982           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11983             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11984           0 :                                 return -1;
   11985             :                         }
   11986           0 :                         object->hidden = test_var;
   11987             :                 } else {
   11988           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11989             :                           PyLong_Type.tp_name);
   11990           0 :                         return -1;
   11991             :                 }
   11992             :         }
   11993           0 :         return 0;
   11994             : }
   11995             : 
   11996           0 : static PyObject *py_srvsvc_NetSrvInfo102_get_announce(PyObject *obj, void *closure)
   11997             : {
   11998           0 :         struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
   11999             :         PyObject *py_announce;
   12000           0 :         py_announce = PyLong_FromUnsignedLongLong((uint32_t)object->announce);
   12001           0 :         return py_announce;
   12002             : }
   12003             : 
   12004           0 : static int py_srvsvc_NetSrvInfo102_set_announce(PyObject *py_obj, PyObject *value, void *closure)
   12005             : {
   12006           0 :         struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
   12007           0 :         if (value == NULL) {
   12008           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->announce");
   12009           0 :                 return -1;
   12010             :         }
   12011             :         {
   12012           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->announce));
   12013           0 :                 if (PyLong_Check(value)) {
   12014             :                         unsigned long long test_var;
   12015           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12016           0 :                         if (PyErr_Occurred() != NULL) {
   12017           0 :                                 return -1;
   12018             :                         }
   12019           0 :                         if (test_var > uint_max) {
   12020           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12021             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12022           0 :                                 return -1;
   12023             :                         }
   12024           0 :                         object->announce = test_var;
   12025             :                 } else {
   12026           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12027             :                           PyLong_Type.tp_name);
   12028           0 :                         return -1;
   12029             :                 }
   12030             :         }
   12031           0 :         return 0;
   12032             : }
   12033             : 
   12034           0 : static PyObject *py_srvsvc_NetSrvInfo102_get_anndelta(PyObject *obj, void *closure)
   12035             : {
   12036           0 :         struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
   12037             :         PyObject *py_anndelta;
   12038           0 :         py_anndelta = PyLong_FromUnsignedLongLong((uint32_t)object->anndelta);
   12039           0 :         return py_anndelta;
   12040             : }
   12041             : 
   12042           0 : static int py_srvsvc_NetSrvInfo102_set_anndelta(PyObject *py_obj, PyObject *value, void *closure)
   12043             : {
   12044           0 :         struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
   12045           0 :         if (value == NULL) {
   12046           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->anndelta");
   12047           0 :                 return -1;
   12048             :         }
   12049             :         {
   12050           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->anndelta));
   12051           0 :                 if (PyLong_Check(value)) {
   12052             :                         unsigned long long test_var;
   12053           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12054           0 :                         if (PyErr_Occurred() != NULL) {
   12055           0 :                                 return -1;
   12056             :                         }
   12057           0 :                         if (test_var > uint_max) {
   12058           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12059             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12060           0 :                                 return -1;
   12061             :                         }
   12062           0 :                         object->anndelta = test_var;
   12063             :                 } else {
   12064           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12065             :                           PyLong_Type.tp_name);
   12066           0 :                         return -1;
   12067             :                 }
   12068             :         }
   12069           0 :         return 0;
   12070             : }
   12071             : 
   12072           0 : static PyObject *py_srvsvc_NetSrvInfo102_get_licenses(PyObject *obj, void *closure)
   12073             : {
   12074           0 :         struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
   12075             :         PyObject *py_licenses;
   12076           0 :         py_licenses = PyLong_FromUnsignedLongLong((uint32_t)object->licenses);
   12077           0 :         return py_licenses;
   12078             : }
   12079             : 
   12080           0 : static int py_srvsvc_NetSrvInfo102_set_licenses(PyObject *py_obj, PyObject *value, void *closure)
   12081             : {
   12082           0 :         struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
   12083           0 :         if (value == NULL) {
   12084           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->licenses");
   12085           0 :                 return -1;
   12086             :         }
   12087             :         {
   12088           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->licenses));
   12089           0 :                 if (PyLong_Check(value)) {
   12090             :                         unsigned long long test_var;
   12091           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12092           0 :                         if (PyErr_Occurred() != NULL) {
   12093           0 :                                 return -1;
   12094             :                         }
   12095           0 :                         if (test_var > uint_max) {
   12096           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12097             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12098           0 :                                 return -1;
   12099             :                         }
   12100           0 :                         object->licenses = test_var;
   12101             :                 } else {
   12102           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12103             :                           PyLong_Type.tp_name);
   12104           0 :                         return -1;
   12105             :                 }
   12106             :         }
   12107           0 :         return 0;
   12108             : }
   12109             : 
   12110           0 : static PyObject *py_srvsvc_NetSrvInfo102_get_userpath(PyObject *obj, void *closure)
   12111             : {
   12112           0 :         struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(obj);
   12113             :         PyObject *py_userpath;
   12114           0 :         if (object->userpath == NULL) {
   12115           0 :                 Py_RETURN_NONE;
   12116             :         }
   12117           0 :         if (object->userpath == NULL) {
   12118           0 :                 py_userpath = Py_None;
   12119           0 :                 Py_INCREF(py_userpath);
   12120             :         } else {
   12121           0 :                 if (object->userpath == NULL) {
   12122           0 :                         py_userpath = Py_None;
   12123           0 :                         Py_INCREF(py_userpath);
   12124             :                 } else {
   12125           0 :                         py_userpath = PyUnicode_Decode(object->userpath, strlen(object->userpath), "utf-8", "ignore");
   12126             :                 }
   12127             :         }
   12128           0 :         return py_userpath;
   12129             : }
   12130             : 
   12131           0 : static int py_srvsvc_NetSrvInfo102_set_userpath(PyObject *py_obj, PyObject *value, void *closure)
   12132             : {
   12133           0 :         struct srvsvc_NetSrvInfo102 *object = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(py_obj);
   12134           0 :         if (value == NULL) {
   12135           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->userpath");
   12136           0 :                 return -1;
   12137             :         }
   12138           0 :         if (value == Py_None) {
   12139           0 :                 object->userpath = NULL;
   12140             :         } else {
   12141           0 :                 object->userpath = NULL;
   12142             :                 {
   12143             :                         const char *test_str;
   12144             :                         const char *talloc_str;
   12145           0 :                         PyObject *unicode = NULL;
   12146           0 :                         if (PyUnicode_Check(value)) {
   12147           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   12148           0 :                                 if (unicode == NULL) {
   12149           0 :                                         PyErr_NoMemory();
   12150           0 :                                         return -1;
   12151             :                                 }
   12152           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   12153           0 :                         } else if (PyBytes_Check(value)) {
   12154           0 :                                 test_str = PyBytes_AS_STRING(value);
   12155             :                         } else {
   12156           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   12157           0 :                                 return -1;
   12158             :                         }
   12159           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   12160           0 :                         if (unicode != NULL) {
   12161           0 :                                 Py_DECREF(unicode);
   12162             :                         }
   12163           0 :                         if (talloc_str == NULL) {
   12164           0 :                                 PyErr_NoMemory();
   12165           0 :                                 return -1;
   12166             :                         }
   12167           0 :                         object->userpath = talloc_str;
   12168             :                 }
   12169             :         }
   12170           0 :         return 0;
   12171             : }
   12172             : 
   12173             : static PyGetSetDef py_srvsvc_NetSrvInfo102_getsetters[] = {
   12174             :         {
   12175             :                 .name = discard_const_p(char, "platform_id"),
   12176             :                 .get = py_srvsvc_NetSrvInfo102_get_platform_id,
   12177             :                 .set = py_srvsvc_NetSrvInfo102_set_platform_id,
   12178             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_PlatformId")
   12179             :         },
   12180             :         {
   12181             :                 .name = discard_const_p(char, "server_name"),
   12182             :                 .get = py_srvsvc_NetSrvInfo102_get_server_name,
   12183             :                 .set = py_srvsvc_NetSrvInfo102_set_server_name,
   12184             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   12185             :         },
   12186             :         {
   12187             :                 .name = discard_const_p(char, "version_major"),
   12188             :                 .get = py_srvsvc_NetSrvInfo102_get_version_major,
   12189             :                 .set = py_srvsvc_NetSrvInfo102_set_version_major,
   12190             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12191             :         },
   12192             :         {
   12193             :                 .name = discard_const_p(char, "version_minor"),
   12194             :                 .get = py_srvsvc_NetSrvInfo102_get_version_minor,
   12195             :                 .set = py_srvsvc_NetSrvInfo102_set_version_minor,
   12196             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12197             :         },
   12198             :         {
   12199             :                 .name = discard_const_p(char, "server_type"),
   12200             :                 .get = py_srvsvc_NetSrvInfo102_get_server_type,
   12201             :                 .set = py_srvsvc_NetSrvInfo102_set_server_type,
   12202             :                 .doc = discard_const_p(char, "PIDL-generated element of base type svcctl_ServerType")
   12203             :         },
   12204             :         {
   12205             :                 .name = discard_const_p(char, "comment"),
   12206             :                 .get = py_srvsvc_NetSrvInfo102_get_comment,
   12207             :                 .set = py_srvsvc_NetSrvInfo102_set_comment,
   12208             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   12209             :         },
   12210             :         {
   12211             :                 .name = discard_const_p(char, "users"),
   12212             :                 .get = py_srvsvc_NetSrvInfo102_get_users,
   12213             :                 .set = py_srvsvc_NetSrvInfo102_set_users,
   12214             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12215             :         },
   12216             :         {
   12217             :                 .name = discard_const_p(char, "disc"),
   12218             :                 .get = py_srvsvc_NetSrvInfo102_get_disc,
   12219             :                 .set = py_srvsvc_NetSrvInfo102_set_disc,
   12220             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12221             :         },
   12222             :         {
   12223             :                 .name = discard_const_p(char, "hidden"),
   12224             :                 .get = py_srvsvc_NetSrvInfo102_get_hidden,
   12225             :                 .set = py_srvsvc_NetSrvInfo102_set_hidden,
   12226             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12227             :         },
   12228             :         {
   12229             :                 .name = discard_const_p(char, "announce"),
   12230             :                 .get = py_srvsvc_NetSrvInfo102_get_announce,
   12231             :                 .set = py_srvsvc_NetSrvInfo102_set_announce,
   12232             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12233             :         },
   12234             :         {
   12235             :                 .name = discard_const_p(char, "anndelta"),
   12236             :                 .get = py_srvsvc_NetSrvInfo102_get_anndelta,
   12237             :                 .set = py_srvsvc_NetSrvInfo102_set_anndelta,
   12238             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12239             :         },
   12240             :         {
   12241             :                 .name = discard_const_p(char, "licenses"),
   12242             :                 .get = py_srvsvc_NetSrvInfo102_get_licenses,
   12243             :                 .set = py_srvsvc_NetSrvInfo102_set_licenses,
   12244             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12245             :         },
   12246             :         {
   12247             :                 .name = discard_const_p(char, "userpath"),
   12248             :                 .get = py_srvsvc_NetSrvInfo102_get_userpath,
   12249             :                 .set = py_srvsvc_NetSrvInfo102_set_userpath,
   12250             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   12251             :         },
   12252             :         { .name = NULL }
   12253             : };
   12254             : 
   12255           0 : static PyObject *py_srvsvc_NetSrvInfo102_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   12256             : {
   12257           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo102, type);
   12258             : }
   12259             : 
   12260             : 
   12261             : static PyTypeObject srvsvc_NetSrvInfo102_Type = {
   12262             :         PyVarObject_HEAD_INIT(NULL, 0)
   12263             :         .tp_name = "srvsvc.NetSrvInfo102",
   12264             :         .tp_getset = py_srvsvc_NetSrvInfo102_getsetters,
   12265             :         .tp_methods = NULL,
   12266             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   12267             :         .tp_new = py_srvsvc_NetSrvInfo102_new,
   12268             : };
   12269             : 
   12270             : 
   12271           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_ulist_mtime(PyObject *obj, void *closure)
   12272             : {
   12273           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   12274             :         PyObject *py_ulist_mtime;
   12275           0 :         py_ulist_mtime = PyLong_FromUnsignedLongLong((uint32_t)object->ulist_mtime);
   12276           0 :         return py_ulist_mtime;
   12277             : }
   12278             : 
   12279           0 : static int py_srvsvc_NetSrvInfo402_set_ulist_mtime(PyObject *py_obj, PyObject *value, void *closure)
   12280             : {
   12281           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   12282           0 :         if (value == NULL) {
   12283           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ulist_mtime");
   12284           0 :                 return -1;
   12285             :         }
   12286             :         {
   12287           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ulist_mtime));
   12288           0 :                 if (PyLong_Check(value)) {
   12289             :                         unsigned long long test_var;
   12290           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12291           0 :                         if (PyErr_Occurred() != NULL) {
   12292           0 :                                 return -1;
   12293             :                         }
   12294           0 :                         if (test_var > uint_max) {
   12295           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12296             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12297           0 :                                 return -1;
   12298             :                         }
   12299           0 :                         object->ulist_mtime = test_var;
   12300             :                 } else {
   12301           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12302             :                           PyLong_Type.tp_name);
   12303           0 :                         return -1;
   12304             :                 }
   12305             :         }
   12306           0 :         return 0;
   12307             : }
   12308             : 
   12309           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_glist_mtime(PyObject *obj, void *closure)
   12310             : {
   12311           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   12312             :         PyObject *py_glist_mtime;
   12313           0 :         py_glist_mtime = PyLong_FromUnsignedLongLong((uint32_t)object->glist_mtime);
   12314           0 :         return py_glist_mtime;
   12315             : }
   12316             : 
   12317           0 : static int py_srvsvc_NetSrvInfo402_set_glist_mtime(PyObject *py_obj, PyObject *value, void *closure)
   12318             : {
   12319           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   12320           0 :         if (value == NULL) {
   12321           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->glist_mtime");
   12322           0 :                 return -1;
   12323             :         }
   12324             :         {
   12325           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->glist_mtime));
   12326           0 :                 if (PyLong_Check(value)) {
   12327             :                         unsigned long long test_var;
   12328           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12329           0 :                         if (PyErr_Occurred() != NULL) {
   12330           0 :                                 return -1;
   12331             :                         }
   12332           0 :                         if (test_var > uint_max) {
   12333           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12334             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12335           0 :                                 return -1;
   12336             :                         }
   12337           0 :                         object->glist_mtime = test_var;
   12338             :                 } else {
   12339           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12340             :                           PyLong_Type.tp_name);
   12341           0 :                         return -1;
   12342             :                 }
   12343             :         }
   12344           0 :         return 0;
   12345             : }
   12346             : 
   12347           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_alist_mtime(PyObject *obj, void *closure)
   12348             : {
   12349           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   12350             :         PyObject *py_alist_mtime;
   12351           0 :         py_alist_mtime = PyLong_FromUnsignedLongLong((uint32_t)object->alist_mtime);
   12352           0 :         return py_alist_mtime;
   12353             : }
   12354             : 
   12355           0 : static int py_srvsvc_NetSrvInfo402_set_alist_mtime(PyObject *py_obj, PyObject *value, void *closure)
   12356             : {
   12357           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   12358           0 :         if (value == NULL) {
   12359           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->alist_mtime");
   12360           0 :                 return -1;
   12361             :         }
   12362             :         {
   12363           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->alist_mtime));
   12364           0 :                 if (PyLong_Check(value)) {
   12365             :                         unsigned long long test_var;
   12366           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12367           0 :                         if (PyErr_Occurred() != NULL) {
   12368           0 :                                 return -1;
   12369             :                         }
   12370           0 :                         if (test_var > uint_max) {
   12371           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12372             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12373           0 :                                 return -1;
   12374             :                         }
   12375           0 :                         object->alist_mtime = test_var;
   12376             :                 } else {
   12377           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12378             :                           PyLong_Type.tp_name);
   12379           0 :                         return -1;
   12380             :                 }
   12381             :         }
   12382           0 :         return 0;
   12383             : }
   12384             : 
   12385           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_alerts(PyObject *obj, void *closure)
   12386             : {
   12387           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   12388             :         PyObject *py_alerts;
   12389           0 :         if (object->alerts == NULL) {
   12390           0 :                 Py_RETURN_NONE;
   12391             :         }
   12392           0 :         if (object->alerts == NULL) {
   12393           0 :                 py_alerts = Py_None;
   12394           0 :                 Py_INCREF(py_alerts);
   12395             :         } else {
   12396           0 :                 if (object->alerts == NULL) {
   12397           0 :                         py_alerts = Py_None;
   12398           0 :                         Py_INCREF(py_alerts);
   12399             :                 } else {
   12400           0 :                         py_alerts = PyUnicode_Decode(object->alerts, strlen(object->alerts), "utf-8", "ignore");
   12401             :                 }
   12402             :         }
   12403           0 :         return py_alerts;
   12404             : }
   12405             : 
   12406           0 : static int py_srvsvc_NetSrvInfo402_set_alerts(PyObject *py_obj, PyObject *value, void *closure)
   12407             : {
   12408           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   12409           0 :         if (value == NULL) {
   12410           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->alerts");
   12411           0 :                 return -1;
   12412             :         }
   12413           0 :         if (value == Py_None) {
   12414           0 :                 object->alerts = NULL;
   12415             :         } else {
   12416           0 :                 object->alerts = NULL;
   12417             :                 {
   12418             :                         const char *test_str;
   12419             :                         const char *talloc_str;
   12420           0 :                         PyObject *unicode = NULL;
   12421           0 :                         if (PyUnicode_Check(value)) {
   12422           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   12423           0 :                                 if (unicode == NULL) {
   12424           0 :                                         PyErr_NoMemory();
   12425           0 :                                         return -1;
   12426             :                                 }
   12427           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   12428           0 :                         } else if (PyBytes_Check(value)) {
   12429           0 :                                 test_str = PyBytes_AS_STRING(value);
   12430             :                         } else {
   12431           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   12432           0 :                                 return -1;
   12433             :                         }
   12434           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   12435           0 :                         if (unicode != NULL) {
   12436           0 :                                 Py_DECREF(unicode);
   12437             :                         }
   12438           0 :                         if (talloc_str == NULL) {
   12439           0 :                                 PyErr_NoMemory();
   12440           0 :                                 return -1;
   12441             :                         }
   12442           0 :                         object->alerts = talloc_str;
   12443             :                 }
   12444             :         }
   12445           0 :         return 0;
   12446             : }
   12447             : 
   12448           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_security(PyObject *obj, void *closure)
   12449             : {
   12450           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   12451             :         PyObject *py_security;
   12452           0 :         py_security = PyLong_FromUnsignedLongLong((uint32_t)object->security);
   12453           0 :         return py_security;
   12454             : }
   12455             : 
   12456           0 : static int py_srvsvc_NetSrvInfo402_set_security(PyObject *py_obj, PyObject *value, void *closure)
   12457             : {
   12458           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   12459           0 :         if (value == NULL) {
   12460           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->security");
   12461           0 :                 return -1;
   12462             :         }
   12463             :         {
   12464           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->security));
   12465           0 :                 if (PyLong_Check(value)) {
   12466             :                         unsigned long long test_var;
   12467           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12468           0 :                         if (PyErr_Occurred() != NULL) {
   12469           0 :                                 return -1;
   12470             :                         }
   12471           0 :                         if (test_var > uint_max) {
   12472           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12473             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12474           0 :                                 return -1;
   12475             :                         }
   12476           0 :                         object->security = test_var;
   12477             :                 } else {
   12478           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12479             :                           PyLong_Type.tp_name);
   12480           0 :                         return -1;
   12481             :                 }
   12482             :         }
   12483           0 :         return 0;
   12484             : }
   12485             : 
   12486           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_numadmin(PyObject *obj, void *closure)
   12487             : {
   12488           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   12489             :         PyObject *py_numadmin;
   12490           0 :         py_numadmin = PyLong_FromUnsignedLongLong((uint32_t)object->numadmin);
   12491           0 :         return py_numadmin;
   12492             : }
   12493             : 
   12494           0 : static int py_srvsvc_NetSrvInfo402_set_numadmin(PyObject *py_obj, PyObject *value, void *closure)
   12495             : {
   12496           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   12497           0 :         if (value == NULL) {
   12498           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->numadmin");
   12499           0 :                 return -1;
   12500             :         }
   12501             :         {
   12502           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numadmin));
   12503           0 :                 if (PyLong_Check(value)) {
   12504             :                         unsigned long long test_var;
   12505           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12506           0 :                         if (PyErr_Occurred() != NULL) {
   12507           0 :                                 return -1;
   12508             :                         }
   12509           0 :                         if (test_var > uint_max) {
   12510           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12511             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12512           0 :                                 return -1;
   12513             :                         }
   12514           0 :                         object->numadmin = test_var;
   12515             :                 } else {
   12516           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12517             :                           PyLong_Type.tp_name);
   12518           0 :                         return -1;
   12519             :                 }
   12520             :         }
   12521           0 :         return 0;
   12522             : }
   12523             : 
   12524           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_lanmask(PyObject *obj, void *closure)
   12525             : {
   12526           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   12527             :         PyObject *py_lanmask;
   12528           0 :         py_lanmask = PyLong_FromUnsignedLongLong((uint32_t)object->lanmask);
   12529           0 :         return py_lanmask;
   12530             : }
   12531             : 
   12532           0 : static int py_srvsvc_NetSrvInfo402_set_lanmask(PyObject *py_obj, PyObject *value, void *closure)
   12533             : {
   12534           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   12535           0 :         if (value == NULL) {
   12536           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lanmask");
   12537           0 :                 return -1;
   12538             :         }
   12539             :         {
   12540           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lanmask));
   12541           0 :                 if (PyLong_Check(value)) {
   12542             :                         unsigned long long test_var;
   12543           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12544           0 :                         if (PyErr_Occurred() != NULL) {
   12545           0 :                                 return -1;
   12546             :                         }
   12547           0 :                         if (test_var > uint_max) {
   12548           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12549             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12550           0 :                                 return -1;
   12551             :                         }
   12552           0 :                         object->lanmask = test_var;
   12553             :                 } else {
   12554           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12555             :                           PyLong_Type.tp_name);
   12556           0 :                         return -1;
   12557             :                 }
   12558             :         }
   12559           0 :         return 0;
   12560             : }
   12561             : 
   12562           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_guestaccount(PyObject *obj, void *closure)
   12563             : {
   12564           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   12565             :         PyObject *py_guestaccount;
   12566           0 :         if (object->guestaccount == NULL) {
   12567           0 :                 Py_RETURN_NONE;
   12568             :         }
   12569           0 :         if (object->guestaccount == NULL) {
   12570           0 :                 py_guestaccount = Py_None;
   12571           0 :                 Py_INCREF(py_guestaccount);
   12572             :         } else {
   12573           0 :                 if (object->guestaccount == NULL) {
   12574           0 :                         py_guestaccount = Py_None;
   12575           0 :                         Py_INCREF(py_guestaccount);
   12576             :                 } else {
   12577           0 :                         py_guestaccount = PyUnicode_Decode(object->guestaccount, strlen(object->guestaccount), "utf-8", "ignore");
   12578             :                 }
   12579             :         }
   12580           0 :         return py_guestaccount;
   12581             : }
   12582             : 
   12583           0 : static int py_srvsvc_NetSrvInfo402_set_guestaccount(PyObject *py_obj, PyObject *value, void *closure)
   12584             : {
   12585           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   12586           0 :         if (value == NULL) {
   12587           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->guestaccount");
   12588           0 :                 return -1;
   12589             :         }
   12590           0 :         if (value == Py_None) {
   12591           0 :                 object->guestaccount = NULL;
   12592             :         } else {
   12593           0 :                 object->guestaccount = NULL;
   12594             :                 {
   12595             :                         const char *test_str;
   12596             :                         const char *talloc_str;
   12597           0 :                         PyObject *unicode = NULL;
   12598           0 :                         if (PyUnicode_Check(value)) {
   12599           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   12600           0 :                                 if (unicode == NULL) {
   12601           0 :                                         PyErr_NoMemory();
   12602           0 :                                         return -1;
   12603             :                                 }
   12604           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   12605           0 :                         } else if (PyBytes_Check(value)) {
   12606           0 :                                 test_str = PyBytes_AS_STRING(value);
   12607             :                         } else {
   12608           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   12609           0 :                                 return -1;
   12610             :                         }
   12611           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   12612           0 :                         if (unicode != NULL) {
   12613           0 :                                 Py_DECREF(unicode);
   12614             :                         }
   12615           0 :                         if (talloc_str == NULL) {
   12616           0 :                                 PyErr_NoMemory();
   12617           0 :                                 return -1;
   12618             :                         }
   12619           0 :                         object->guestaccount = talloc_str;
   12620             :                 }
   12621             :         }
   12622           0 :         return 0;
   12623             : }
   12624             : 
   12625           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_chdevs(PyObject *obj, void *closure)
   12626             : {
   12627           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   12628             :         PyObject *py_chdevs;
   12629           0 :         py_chdevs = PyLong_FromUnsignedLongLong((uint32_t)object->chdevs);
   12630           0 :         return py_chdevs;
   12631             : }
   12632             : 
   12633           0 : static int py_srvsvc_NetSrvInfo402_set_chdevs(PyObject *py_obj, PyObject *value, void *closure)
   12634             : {
   12635           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   12636           0 :         if (value == NULL) {
   12637           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->chdevs");
   12638           0 :                 return -1;
   12639             :         }
   12640             :         {
   12641           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->chdevs));
   12642           0 :                 if (PyLong_Check(value)) {
   12643             :                         unsigned long long test_var;
   12644           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12645           0 :                         if (PyErr_Occurred() != NULL) {
   12646           0 :                                 return -1;
   12647             :                         }
   12648           0 :                         if (test_var > uint_max) {
   12649           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12650             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12651           0 :                                 return -1;
   12652             :                         }
   12653           0 :                         object->chdevs = test_var;
   12654             :                 } else {
   12655           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12656             :                           PyLong_Type.tp_name);
   12657           0 :                         return -1;
   12658             :                 }
   12659             :         }
   12660           0 :         return 0;
   12661             : }
   12662             : 
   12663           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_chdevqs(PyObject *obj, void *closure)
   12664             : {
   12665           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   12666             :         PyObject *py_chdevqs;
   12667           0 :         py_chdevqs = PyLong_FromUnsignedLongLong((uint32_t)object->chdevqs);
   12668           0 :         return py_chdevqs;
   12669             : }
   12670             : 
   12671           0 : static int py_srvsvc_NetSrvInfo402_set_chdevqs(PyObject *py_obj, PyObject *value, void *closure)
   12672             : {
   12673           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   12674           0 :         if (value == NULL) {
   12675           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->chdevqs");
   12676           0 :                 return -1;
   12677             :         }
   12678             :         {
   12679           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->chdevqs));
   12680           0 :                 if (PyLong_Check(value)) {
   12681             :                         unsigned long long test_var;
   12682           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12683           0 :                         if (PyErr_Occurred() != NULL) {
   12684           0 :                                 return -1;
   12685             :                         }
   12686           0 :                         if (test_var > uint_max) {
   12687           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12688             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12689           0 :                                 return -1;
   12690             :                         }
   12691           0 :                         object->chdevqs = test_var;
   12692             :                 } else {
   12693           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12694             :                           PyLong_Type.tp_name);
   12695           0 :                         return -1;
   12696             :                 }
   12697             :         }
   12698           0 :         return 0;
   12699             : }
   12700             : 
   12701           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_chdevjobs(PyObject *obj, void *closure)
   12702             : {
   12703           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   12704             :         PyObject *py_chdevjobs;
   12705           0 :         py_chdevjobs = PyLong_FromUnsignedLongLong((uint32_t)object->chdevjobs);
   12706           0 :         return py_chdevjobs;
   12707             : }
   12708             : 
   12709           0 : static int py_srvsvc_NetSrvInfo402_set_chdevjobs(PyObject *py_obj, PyObject *value, void *closure)
   12710             : {
   12711           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   12712           0 :         if (value == NULL) {
   12713           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->chdevjobs");
   12714           0 :                 return -1;
   12715             :         }
   12716             :         {
   12717           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->chdevjobs));
   12718           0 :                 if (PyLong_Check(value)) {
   12719             :                         unsigned long long test_var;
   12720           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12721           0 :                         if (PyErr_Occurred() != NULL) {
   12722           0 :                                 return -1;
   12723             :                         }
   12724           0 :                         if (test_var > uint_max) {
   12725           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12726             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12727           0 :                                 return -1;
   12728             :                         }
   12729           0 :                         object->chdevjobs = test_var;
   12730             :                 } else {
   12731           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12732             :                           PyLong_Type.tp_name);
   12733           0 :                         return -1;
   12734             :                 }
   12735             :         }
   12736           0 :         return 0;
   12737             : }
   12738             : 
   12739           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_connections(PyObject *obj, void *closure)
   12740             : {
   12741           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   12742             :         PyObject *py_connections;
   12743           0 :         py_connections = PyLong_FromUnsignedLongLong((uint32_t)object->connections);
   12744           0 :         return py_connections;
   12745             : }
   12746             : 
   12747           0 : static int py_srvsvc_NetSrvInfo402_set_connections(PyObject *py_obj, PyObject *value, void *closure)
   12748             : {
   12749           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   12750           0 :         if (value == NULL) {
   12751           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->connections");
   12752           0 :                 return -1;
   12753             :         }
   12754             :         {
   12755           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->connections));
   12756           0 :                 if (PyLong_Check(value)) {
   12757             :                         unsigned long long test_var;
   12758           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12759           0 :                         if (PyErr_Occurred() != NULL) {
   12760           0 :                                 return -1;
   12761             :                         }
   12762           0 :                         if (test_var > uint_max) {
   12763           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12764             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12765           0 :                                 return -1;
   12766             :                         }
   12767           0 :                         object->connections = test_var;
   12768             :                 } else {
   12769           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12770             :                           PyLong_Type.tp_name);
   12771           0 :                         return -1;
   12772             :                 }
   12773             :         }
   12774           0 :         return 0;
   12775             : }
   12776             : 
   12777           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_shares(PyObject *obj, void *closure)
   12778             : {
   12779           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   12780             :         PyObject *py_shares;
   12781           0 :         py_shares = PyLong_FromUnsignedLongLong((uint32_t)object->shares);
   12782           0 :         return py_shares;
   12783             : }
   12784             : 
   12785           0 : static int py_srvsvc_NetSrvInfo402_set_shares(PyObject *py_obj, PyObject *value, void *closure)
   12786             : {
   12787           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   12788           0 :         if (value == NULL) {
   12789           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->shares");
   12790           0 :                 return -1;
   12791             :         }
   12792             :         {
   12793           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->shares));
   12794           0 :                 if (PyLong_Check(value)) {
   12795             :                         unsigned long long test_var;
   12796           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12797           0 :                         if (PyErr_Occurred() != NULL) {
   12798           0 :                                 return -1;
   12799             :                         }
   12800           0 :                         if (test_var > uint_max) {
   12801           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12802             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12803           0 :                                 return -1;
   12804             :                         }
   12805           0 :                         object->shares = test_var;
   12806             :                 } else {
   12807           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12808             :                           PyLong_Type.tp_name);
   12809           0 :                         return -1;
   12810             :                 }
   12811             :         }
   12812           0 :         return 0;
   12813             : }
   12814             : 
   12815           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_openfiles(PyObject *obj, void *closure)
   12816             : {
   12817           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   12818             :         PyObject *py_openfiles;
   12819           0 :         py_openfiles = PyLong_FromUnsignedLongLong((uint32_t)object->openfiles);
   12820           0 :         return py_openfiles;
   12821             : }
   12822             : 
   12823           0 : static int py_srvsvc_NetSrvInfo402_set_openfiles(PyObject *py_obj, PyObject *value, void *closure)
   12824             : {
   12825           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   12826           0 :         if (value == NULL) {
   12827           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->openfiles");
   12828           0 :                 return -1;
   12829             :         }
   12830             :         {
   12831           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->openfiles));
   12832           0 :                 if (PyLong_Check(value)) {
   12833             :                         unsigned long long test_var;
   12834           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12835           0 :                         if (PyErr_Occurred() != NULL) {
   12836           0 :                                 return -1;
   12837             :                         }
   12838           0 :                         if (test_var > uint_max) {
   12839           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12840             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12841           0 :                                 return -1;
   12842             :                         }
   12843           0 :                         object->openfiles = test_var;
   12844             :                 } else {
   12845           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12846             :                           PyLong_Type.tp_name);
   12847           0 :                         return -1;
   12848             :                 }
   12849             :         }
   12850           0 :         return 0;
   12851             : }
   12852             : 
   12853           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_sessopen(PyObject *obj, void *closure)
   12854             : {
   12855           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   12856             :         PyObject *py_sessopen;
   12857           0 :         py_sessopen = PyLong_FromUnsignedLongLong((uint32_t)object->sessopen);
   12858           0 :         return py_sessopen;
   12859             : }
   12860             : 
   12861           0 : static int py_srvsvc_NetSrvInfo402_set_sessopen(PyObject *py_obj, PyObject *value, void *closure)
   12862             : {
   12863           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   12864           0 :         if (value == NULL) {
   12865           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessopen");
   12866           0 :                 return -1;
   12867             :         }
   12868             :         {
   12869           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessopen));
   12870           0 :                 if (PyLong_Check(value)) {
   12871             :                         unsigned long long test_var;
   12872           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12873           0 :                         if (PyErr_Occurred() != NULL) {
   12874           0 :                                 return -1;
   12875             :                         }
   12876           0 :                         if (test_var > uint_max) {
   12877           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12878             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12879           0 :                                 return -1;
   12880             :                         }
   12881           0 :                         object->sessopen = test_var;
   12882             :                 } else {
   12883           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12884             :                           PyLong_Type.tp_name);
   12885           0 :                         return -1;
   12886             :                 }
   12887             :         }
   12888           0 :         return 0;
   12889             : }
   12890             : 
   12891           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_sesssvc(PyObject *obj, void *closure)
   12892             : {
   12893           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   12894             :         PyObject *py_sesssvc;
   12895           0 :         py_sesssvc = PyLong_FromUnsignedLongLong((uint32_t)object->sesssvc);
   12896           0 :         return py_sesssvc;
   12897             : }
   12898             : 
   12899           0 : static int py_srvsvc_NetSrvInfo402_set_sesssvc(PyObject *py_obj, PyObject *value, void *closure)
   12900             : {
   12901           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   12902           0 :         if (value == NULL) {
   12903           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sesssvc");
   12904           0 :                 return -1;
   12905             :         }
   12906             :         {
   12907           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sesssvc));
   12908           0 :                 if (PyLong_Check(value)) {
   12909             :                         unsigned long long test_var;
   12910           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12911           0 :                         if (PyErr_Occurred() != NULL) {
   12912           0 :                                 return -1;
   12913             :                         }
   12914           0 :                         if (test_var > uint_max) {
   12915           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12916             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12917           0 :                                 return -1;
   12918             :                         }
   12919           0 :                         object->sesssvc = test_var;
   12920             :                 } else {
   12921           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12922             :                           PyLong_Type.tp_name);
   12923           0 :                         return -1;
   12924             :                 }
   12925             :         }
   12926           0 :         return 0;
   12927             : }
   12928             : 
   12929           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_sessreqs(PyObject *obj, void *closure)
   12930             : {
   12931           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   12932             :         PyObject *py_sessreqs;
   12933           0 :         py_sessreqs = PyLong_FromUnsignedLongLong((uint32_t)object->sessreqs);
   12934           0 :         return py_sessreqs;
   12935             : }
   12936             : 
   12937           0 : static int py_srvsvc_NetSrvInfo402_set_sessreqs(PyObject *py_obj, PyObject *value, void *closure)
   12938             : {
   12939           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   12940           0 :         if (value == NULL) {
   12941           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessreqs");
   12942           0 :                 return -1;
   12943             :         }
   12944             :         {
   12945           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessreqs));
   12946           0 :                 if (PyLong_Check(value)) {
   12947             :                         unsigned long long test_var;
   12948           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12949           0 :                         if (PyErr_Occurred() != NULL) {
   12950           0 :                                 return -1;
   12951             :                         }
   12952           0 :                         if (test_var > uint_max) {
   12953           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12954             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12955           0 :                                 return -1;
   12956             :                         }
   12957           0 :                         object->sessreqs = test_var;
   12958             :                 } else {
   12959           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12960             :                           PyLong_Type.tp_name);
   12961           0 :                         return -1;
   12962             :                 }
   12963             :         }
   12964           0 :         return 0;
   12965             : }
   12966             : 
   12967           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_opensearch(PyObject *obj, void *closure)
   12968             : {
   12969           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   12970             :         PyObject *py_opensearch;
   12971           0 :         py_opensearch = PyLong_FromUnsignedLongLong((uint32_t)object->opensearch);
   12972           0 :         return py_opensearch;
   12973             : }
   12974             : 
   12975           0 : static int py_srvsvc_NetSrvInfo402_set_opensearch(PyObject *py_obj, PyObject *value, void *closure)
   12976             : {
   12977           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   12978           0 :         if (value == NULL) {
   12979           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->opensearch");
   12980           0 :                 return -1;
   12981             :         }
   12982             :         {
   12983           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->opensearch));
   12984           0 :                 if (PyLong_Check(value)) {
   12985             :                         unsigned long long test_var;
   12986           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12987           0 :                         if (PyErr_Occurred() != NULL) {
   12988           0 :                                 return -1;
   12989             :                         }
   12990           0 :                         if (test_var > uint_max) {
   12991           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12992             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12993           0 :                                 return -1;
   12994             :                         }
   12995           0 :                         object->opensearch = test_var;
   12996             :                 } else {
   12997           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12998             :                           PyLong_Type.tp_name);
   12999           0 :                         return -1;
   13000             :                 }
   13001             :         }
   13002           0 :         return 0;
   13003             : }
   13004             : 
   13005           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_activelocks(PyObject *obj, void *closure)
   13006             : {
   13007           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   13008             :         PyObject *py_activelocks;
   13009           0 :         py_activelocks = PyLong_FromUnsignedLongLong((uint32_t)object->activelocks);
   13010           0 :         return py_activelocks;
   13011             : }
   13012             : 
   13013           0 : static int py_srvsvc_NetSrvInfo402_set_activelocks(PyObject *py_obj, PyObject *value, void *closure)
   13014             : {
   13015           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   13016           0 :         if (value == NULL) {
   13017           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->activelocks");
   13018           0 :                 return -1;
   13019             :         }
   13020             :         {
   13021           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->activelocks));
   13022           0 :                 if (PyLong_Check(value)) {
   13023             :                         unsigned long long test_var;
   13024           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13025           0 :                         if (PyErr_Occurred() != NULL) {
   13026           0 :                                 return -1;
   13027             :                         }
   13028           0 :                         if (test_var > uint_max) {
   13029           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13030             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13031           0 :                                 return -1;
   13032             :                         }
   13033           0 :                         object->activelocks = test_var;
   13034             :                 } else {
   13035           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13036             :                           PyLong_Type.tp_name);
   13037           0 :                         return -1;
   13038             :                 }
   13039             :         }
   13040           0 :         return 0;
   13041             : }
   13042             : 
   13043           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_numreqbufs(PyObject *obj, void *closure)
   13044             : {
   13045           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   13046             :         PyObject *py_numreqbufs;
   13047           0 :         py_numreqbufs = PyLong_FromUnsignedLongLong((uint32_t)object->numreqbufs);
   13048           0 :         return py_numreqbufs;
   13049             : }
   13050             : 
   13051           0 : static int py_srvsvc_NetSrvInfo402_set_numreqbufs(PyObject *py_obj, PyObject *value, void *closure)
   13052             : {
   13053           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   13054           0 :         if (value == NULL) {
   13055           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->numreqbufs");
   13056           0 :                 return -1;
   13057             :         }
   13058             :         {
   13059           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numreqbufs));
   13060           0 :                 if (PyLong_Check(value)) {
   13061             :                         unsigned long long test_var;
   13062           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13063           0 :                         if (PyErr_Occurred() != NULL) {
   13064           0 :                                 return -1;
   13065             :                         }
   13066           0 :                         if (test_var > uint_max) {
   13067           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13068             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13069           0 :                                 return -1;
   13070             :                         }
   13071           0 :                         object->numreqbufs = test_var;
   13072             :                 } else {
   13073           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13074             :                           PyLong_Type.tp_name);
   13075           0 :                         return -1;
   13076             :                 }
   13077             :         }
   13078           0 :         return 0;
   13079             : }
   13080             : 
   13081           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_sizereqbufs(PyObject *obj, void *closure)
   13082             : {
   13083           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   13084             :         PyObject *py_sizereqbufs;
   13085           0 :         py_sizereqbufs = PyLong_FromUnsignedLongLong((uint32_t)object->sizereqbufs);
   13086           0 :         return py_sizereqbufs;
   13087             : }
   13088             : 
   13089           0 : static int py_srvsvc_NetSrvInfo402_set_sizereqbufs(PyObject *py_obj, PyObject *value, void *closure)
   13090             : {
   13091           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   13092           0 :         if (value == NULL) {
   13093           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sizereqbufs");
   13094           0 :                 return -1;
   13095             :         }
   13096             :         {
   13097           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sizereqbufs));
   13098           0 :                 if (PyLong_Check(value)) {
   13099             :                         unsigned long long test_var;
   13100           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13101           0 :                         if (PyErr_Occurred() != NULL) {
   13102           0 :                                 return -1;
   13103             :                         }
   13104           0 :                         if (test_var > uint_max) {
   13105           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13106             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13107           0 :                                 return -1;
   13108             :                         }
   13109           0 :                         object->sizereqbufs = test_var;
   13110             :                 } else {
   13111           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13112             :                           PyLong_Type.tp_name);
   13113           0 :                         return -1;
   13114             :                 }
   13115             :         }
   13116           0 :         return 0;
   13117             : }
   13118             : 
   13119           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_numbigbufs(PyObject *obj, void *closure)
   13120             : {
   13121           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   13122             :         PyObject *py_numbigbufs;
   13123           0 :         py_numbigbufs = PyLong_FromUnsignedLongLong((uint32_t)object->numbigbufs);
   13124           0 :         return py_numbigbufs;
   13125             : }
   13126             : 
   13127           0 : static int py_srvsvc_NetSrvInfo402_set_numbigbufs(PyObject *py_obj, PyObject *value, void *closure)
   13128             : {
   13129           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   13130           0 :         if (value == NULL) {
   13131           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->numbigbufs");
   13132           0 :                 return -1;
   13133             :         }
   13134             :         {
   13135           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numbigbufs));
   13136           0 :                 if (PyLong_Check(value)) {
   13137             :                         unsigned long long test_var;
   13138           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13139           0 :                         if (PyErr_Occurred() != NULL) {
   13140           0 :                                 return -1;
   13141             :                         }
   13142           0 :                         if (test_var > uint_max) {
   13143           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13144             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13145           0 :                                 return -1;
   13146             :                         }
   13147           0 :                         object->numbigbufs = test_var;
   13148             :                 } else {
   13149           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13150             :                           PyLong_Type.tp_name);
   13151           0 :                         return -1;
   13152             :                 }
   13153             :         }
   13154           0 :         return 0;
   13155             : }
   13156             : 
   13157           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_numfiletasks(PyObject *obj, void *closure)
   13158             : {
   13159           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   13160             :         PyObject *py_numfiletasks;
   13161           0 :         py_numfiletasks = PyLong_FromUnsignedLongLong((uint32_t)object->numfiletasks);
   13162           0 :         return py_numfiletasks;
   13163             : }
   13164             : 
   13165           0 : static int py_srvsvc_NetSrvInfo402_set_numfiletasks(PyObject *py_obj, PyObject *value, void *closure)
   13166             : {
   13167           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   13168           0 :         if (value == NULL) {
   13169           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->numfiletasks");
   13170           0 :                 return -1;
   13171             :         }
   13172             :         {
   13173           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numfiletasks));
   13174           0 :                 if (PyLong_Check(value)) {
   13175             :                         unsigned long long test_var;
   13176           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13177           0 :                         if (PyErr_Occurred() != NULL) {
   13178           0 :                                 return -1;
   13179             :                         }
   13180           0 :                         if (test_var > uint_max) {
   13181           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13182             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13183           0 :                                 return -1;
   13184             :                         }
   13185           0 :                         object->numfiletasks = test_var;
   13186             :                 } else {
   13187           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13188             :                           PyLong_Type.tp_name);
   13189           0 :                         return -1;
   13190             :                 }
   13191             :         }
   13192           0 :         return 0;
   13193             : }
   13194             : 
   13195           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_alertsched(PyObject *obj, void *closure)
   13196             : {
   13197           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   13198             :         PyObject *py_alertsched;
   13199           0 :         py_alertsched = PyLong_FromUnsignedLongLong((uint32_t)object->alertsched);
   13200           0 :         return py_alertsched;
   13201             : }
   13202             : 
   13203           0 : static int py_srvsvc_NetSrvInfo402_set_alertsched(PyObject *py_obj, PyObject *value, void *closure)
   13204             : {
   13205           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   13206           0 :         if (value == NULL) {
   13207           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->alertsched");
   13208           0 :                 return -1;
   13209             :         }
   13210             :         {
   13211           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->alertsched));
   13212           0 :                 if (PyLong_Check(value)) {
   13213             :                         unsigned long long test_var;
   13214           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13215           0 :                         if (PyErr_Occurred() != NULL) {
   13216           0 :                                 return -1;
   13217             :                         }
   13218           0 :                         if (test_var > uint_max) {
   13219           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13220             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13221           0 :                                 return -1;
   13222             :                         }
   13223           0 :                         object->alertsched = test_var;
   13224             :                 } else {
   13225           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13226             :                           PyLong_Type.tp_name);
   13227           0 :                         return -1;
   13228             :                 }
   13229             :         }
   13230           0 :         return 0;
   13231             : }
   13232             : 
   13233           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_erroralert(PyObject *obj, void *closure)
   13234             : {
   13235           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   13236             :         PyObject *py_erroralert;
   13237           0 :         py_erroralert = PyLong_FromUnsignedLongLong((uint32_t)object->erroralert);
   13238           0 :         return py_erroralert;
   13239             : }
   13240             : 
   13241           0 : static int py_srvsvc_NetSrvInfo402_set_erroralert(PyObject *py_obj, PyObject *value, void *closure)
   13242             : {
   13243           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   13244           0 :         if (value == NULL) {
   13245           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->erroralert");
   13246           0 :                 return -1;
   13247             :         }
   13248             :         {
   13249           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->erroralert));
   13250           0 :                 if (PyLong_Check(value)) {
   13251             :                         unsigned long long test_var;
   13252           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13253           0 :                         if (PyErr_Occurred() != NULL) {
   13254           0 :                                 return -1;
   13255             :                         }
   13256           0 :                         if (test_var > uint_max) {
   13257           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13258             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13259           0 :                                 return -1;
   13260             :                         }
   13261           0 :                         object->erroralert = test_var;
   13262             :                 } else {
   13263           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13264             :                           PyLong_Type.tp_name);
   13265           0 :                         return -1;
   13266             :                 }
   13267             :         }
   13268           0 :         return 0;
   13269             : }
   13270             : 
   13271           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_logonalert(PyObject *obj, void *closure)
   13272             : {
   13273           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   13274             :         PyObject *py_logonalert;
   13275           0 :         py_logonalert = PyLong_FromUnsignedLongLong((uint32_t)object->logonalert);
   13276           0 :         return py_logonalert;
   13277             : }
   13278             : 
   13279           0 : static int py_srvsvc_NetSrvInfo402_set_logonalert(PyObject *py_obj, PyObject *value, void *closure)
   13280             : {
   13281           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   13282           0 :         if (value == NULL) {
   13283           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logonalert");
   13284           0 :                 return -1;
   13285             :         }
   13286             :         {
   13287           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logonalert));
   13288           0 :                 if (PyLong_Check(value)) {
   13289             :                         unsigned long long test_var;
   13290           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13291           0 :                         if (PyErr_Occurred() != NULL) {
   13292           0 :                                 return -1;
   13293             :                         }
   13294           0 :                         if (test_var > uint_max) {
   13295           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13296             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13297           0 :                                 return -1;
   13298             :                         }
   13299           0 :                         object->logonalert = test_var;
   13300             :                 } else {
   13301           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13302             :                           PyLong_Type.tp_name);
   13303           0 :                         return -1;
   13304             :                 }
   13305             :         }
   13306           0 :         return 0;
   13307             : }
   13308             : 
   13309           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_accessalert(PyObject *obj, void *closure)
   13310             : {
   13311           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   13312             :         PyObject *py_accessalert;
   13313           0 :         py_accessalert = PyLong_FromUnsignedLongLong((uint32_t)object->accessalert);
   13314           0 :         return py_accessalert;
   13315             : }
   13316             : 
   13317           0 : static int py_srvsvc_NetSrvInfo402_set_accessalert(PyObject *py_obj, PyObject *value, void *closure)
   13318             : {
   13319           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   13320           0 :         if (value == NULL) {
   13321           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->accessalert");
   13322           0 :                 return -1;
   13323             :         }
   13324             :         {
   13325           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->accessalert));
   13326           0 :                 if (PyLong_Check(value)) {
   13327             :                         unsigned long long test_var;
   13328           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13329           0 :                         if (PyErr_Occurred() != NULL) {
   13330           0 :                                 return -1;
   13331             :                         }
   13332           0 :                         if (test_var > uint_max) {
   13333           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13334             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13335           0 :                                 return -1;
   13336             :                         }
   13337           0 :                         object->accessalert = test_var;
   13338             :                 } else {
   13339           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13340             :                           PyLong_Type.tp_name);
   13341           0 :                         return -1;
   13342             :                 }
   13343             :         }
   13344           0 :         return 0;
   13345             : }
   13346             : 
   13347           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_diskalert(PyObject *obj, void *closure)
   13348             : {
   13349           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   13350             :         PyObject *py_diskalert;
   13351           0 :         py_diskalert = PyLong_FromUnsignedLongLong((uint32_t)object->diskalert);
   13352           0 :         return py_diskalert;
   13353             : }
   13354             : 
   13355           0 : static int py_srvsvc_NetSrvInfo402_set_diskalert(PyObject *py_obj, PyObject *value, void *closure)
   13356             : {
   13357           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   13358           0 :         if (value == NULL) {
   13359           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->diskalert");
   13360           0 :                 return -1;
   13361             :         }
   13362             :         {
   13363           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->diskalert));
   13364           0 :                 if (PyLong_Check(value)) {
   13365             :                         unsigned long long test_var;
   13366           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13367           0 :                         if (PyErr_Occurred() != NULL) {
   13368           0 :                                 return -1;
   13369             :                         }
   13370           0 :                         if (test_var > uint_max) {
   13371           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13372             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13373           0 :                                 return -1;
   13374             :                         }
   13375           0 :                         object->diskalert = test_var;
   13376             :                 } else {
   13377           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13378             :                           PyLong_Type.tp_name);
   13379           0 :                         return -1;
   13380             :                 }
   13381             :         }
   13382           0 :         return 0;
   13383             : }
   13384             : 
   13385           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_netioalert(PyObject *obj, void *closure)
   13386             : {
   13387           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   13388             :         PyObject *py_netioalert;
   13389           0 :         py_netioalert = PyLong_FromUnsignedLongLong((uint32_t)object->netioalert);
   13390           0 :         return py_netioalert;
   13391             : }
   13392             : 
   13393           0 : static int py_srvsvc_NetSrvInfo402_set_netioalert(PyObject *py_obj, PyObject *value, void *closure)
   13394             : {
   13395           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   13396           0 :         if (value == NULL) {
   13397           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->netioalert");
   13398           0 :                 return -1;
   13399             :         }
   13400             :         {
   13401           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->netioalert));
   13402           0 :                 if (PyLong_Check(value)) {
   13403             :                         unsigned long long test_var;
   13404           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13405           0 :                         if (PyErr_Occurred() != NULL) {
   13406           0 :                                 return -1;
   13407             :                         }
   13408           0 :                         if (test_var > uint_max) {
   13409           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13410             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13411           0 :                                 return -1;
   13412             :                         }
   13413           0 :                         object->netioalert = test_var;
   13414             :                 } else {
   13415           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13416             :                           PyLong_Type.tp_name);
   13417           0 :                         return -1;
   13418             :                 }
   13419             :         }
   13420           0 :         return 0;
   13421             : }
   13422             : 
   13423           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_maxaudits(PyObject *obj, void *closure)
   13424             : {
   13425           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   13426             :         PyObject *py_maxaudits;
   13427           0 :         py_maxaudits = PyLong_FromUnsignedLongLong((uint32_t)object->maxaudits);
   13428           0 :         return py_maxaudits;
   13429             : }
   13430             : 
   13431           0 : static int py_srvsvc_NetSrvInfo402_set_maxaudits(PyObject *py_obj, PyObject *value, void *closure)
   13432             : {
   13433           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   13434           0 :         if (value == NULL) {
   13435           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxaudits");
   13436           0 :                 return -1;
   13437             :         }
   13438             :         {
   13439           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxaudits));
   13440           0 :                 if (PyLong_Check(value)) {
   13441             :                         unsigned long long test_var;
   13442           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13443           0 :                         if (PyErr_Occurred() != NULL) {
   13444           0 :                                 return -1;
   13445             :                         }
   13446           0 :                         if (test_var > uint_max) {
   13447           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13448             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13449           0 :                                 return -1;
   13450             :                         }
   13451           0 :                         object->maxaudits = test_var;
   13452             :                 } else {
   13453           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13454             :                           PyLong_Type.tp_name);
   13455           0 :                         return -1;
   13456             :                 }
   13457             :         }
   13458           0 :         return 0;
   13459             : }
   13460             : 
   13461           0 : static PyObject *py_srvsvc_NetSrvInfo402_get_srvheuristics(PyObject *obj, void *closure)
   13462             : {
   13463           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(obj);
   13464             :         PyObject *py_srvheuristics;
   13465           0 :         if (object->srvheuristics == NULL) {
   13466           0 :                 Py_RETURN_NONE;
   13467             :         }
   13468           0 :         if (object->srvheuristics == NULL) {
   13469           0 :                 py_srvheuristics = Py_None;
   13470           0 :                 Py_INCREF(py_srvheuristics);
   13471             :         } else {
   13472           0 :                 if (object->srvheuristics == NULL) {
   13473           0 :                         py_srvheuristics = Py_None;
   13474           0 :                         Py_INCREF(py_srvheuristics);
   13475             :                 } else {
   13476           0 :                         py_srvheuristics = PyUnicode_Decode(object->srvheuristics, strlen(object->srvheuristics), "utf-8", "ignore");
   13477             :                 }
   13478             :         }
   13479           0 :         return py_srvheuristics;
   13480             : }
   13481             : 
   13482           0 : static int py_srvsvc_NetSrvInfo402_set_srvheuristics(PyObject *py_obj, PyObject *value, void *closure)
   13483             : {
   13484           0 :         struct srvsvc_NetSrvInfo402 *object = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(py_obj);
   13485           0 :         if (value == NULL) {
   13486           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->srvheuristics");
   13487           0 :                 return -1;
   13488             :         }
   13489           0 :         if (value == Py_None) {
   13490           0 :                 object->srvheuristics = NULL;
   13491             :         } else {
   13492           0 :                 object->srvheuristics = NULL;
   13493             :                 {
   13494             :                         const char *test_str;
   13495             :                         const char *talloc_str;
   13496           0 :                         PyObject *unicode = NULL;
   13497           0 :                         if (PyUnicode_Check(value)) {
   13498           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   13499           0 :                                 if (unicode == NULL) {
   13500           0 :                                         PyErr_NoMemory();
   13501           0 :                                         return -1;
   13502             :                                 }
   13503           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   13504           0 :                         } else if (PyBytes_Check(value)) {
   13505           0 :                                 test_str = PyBytes_AS_STRING(value);
   13506             :                         } else {
   13507           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   13508           0 :                                 return -1;
   13509             :                         }
   13510           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   13511           0 :                         if (unicode != NULL) {
   13512           0 :                                 Py_DECREF(unicode);
   13513             :                         }
   13514           0 :                         if (talloc_str == NULL) {
   13515           0 :                                 PyErr_NoMemory();
   13516           0 :                                 return -1;
   13517             :                         }
   13518           0 :                         object->srvheuristics = talloc_str;
   13519             :                 }
   13520             :         }
   13521           0 :         return 0;
   13522             : }
   13523             : 
   13524             : static PyGetSetDef py_srvsvc_NetSrvInfo402_getsetters[] = {
   13525             :         {
   13526             :                 .name = discard_const_p(char, "ulist_mtime"),
   13527             :                 .get = py_srvsvc_NetSrvInfo402_get_ulist_mtime,
   13528             :                 .set = py_srvsvc_NetSrvInfo402_set_ulist_mtime,
   13529             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13530             :         },
   13531             :         {
   13532             :                 .name = discard_const_p(char, "glist_mtime"),
   13533             :                 .get = py_srvsvc_NetSrvInfo402_get_glist_mtime,
   13534             :                 .set = py_srvsvc_NetSrvInfo402_set_glist_mtime,
   13535             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13536             :         },
   13537             :         {
   13538             :                 .name = discard_const_p(char, "alist_mtime"),
   13539             :                 .get = py_srvsvc_NetSrvInfo402_get_alist_mtime,
   13540             :                 .set = py_srvsvc_NetSrvInfo402_set_alist_mtime,
   13541             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13542             :         },
   13543             :         {
   13544             :                 .name = discard_const_p(char, "alerts"),
   13545             :                 .get = py_srvsvc_NetSrvInfo402_get_alerts,
   13546             :                 .set = py_srvsvc_NetSrvInfo402_set_alerts,
   13547             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   13548             :         },
   13549             :         {
   13550             :                 .name = discard_const_p(char, "security"),
   13551             :                 .get = py_srvsvc_NetSrvInfo402_get_security,
   13552             :                 .set = py_srvsvc_NetSrvInfo402_set_security,
   13553             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13554             :         },
   13555             :         {
   13556             :                 .name = discard_const_p(char, "numadmin"),
   13557             :                 .get = py_srvsvc_NetSrvInfo402_get_numadmin,
   13558             :                 .set = py_srvsvc_NetSrvInfo402_set_numadmin,
   13559             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13560             :         },
   13561             :         {
   13562             :                 .name = discard_const_p(char, "lanmask"),
   13563             :                 .get = py_srvsvc_NetSrvInfo402_get_lanmask,
   13564             :                 .set = py_srvsvc_NetSrvInfo402_set_lanmask,
   13565             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13566             :         },
   13567             :         {
   13568             :                 .name = discard_const_p(char, "guestaccount"),
   13569             :                 .get = py_srvsvc_NetSrvInfo402_get_guestaccount,
   13570             :                 .set = py_srvsvc_NetSrvInfo402_set_guestaccount,
   13571             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   13572             :         },
   13573             :         {
   13574             :                 .name = discard_const_p(char, "chdevs"),
   13575             :                 .get = py_srvsvc_NetSrvInfo402_get_chdevs,
   13576             :                 .set = py_srvsvc_NetSrvInfo402_set_chdevs,
   13577             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13578             :         },
   13579             :         {
   13580             :                 .name = discard_const_p(char, "chdevqs"),
   13581             :                 .get = py_srvsvc_NetSrvInfo402_get_chdevqs,
   13582             :                 .set = py_srvsvc_NetSrvInfo402_set_chdevqs,
   13583             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13584             :         },
   13585             :         {
   13586             :                 .name = discard_const_p(char, "chdevjobs"),
   13587             :                 .get = py_srvsvc_NetSrvInfo402_get_chdevjobs,
   13588             :                 .set = py_srvsvc_NetSrvInfo402_set_chdevjobs,
   13589             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13590             :         },
   13591             :         {
   13592             :                 .name = discard_const_p(char, "connections"),
   13593             :                 .get = py_srvsvc_NetSrvInfo402_get_connections,
   13594             :                 .set = py_srvsvc_NetSrvInfo402_set_connections,
   13595             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13596             :         },
   13597             :         {
   13598             :                 .name = discard_const_p(char, "shares"),
   13599             :                 .get = py_srvsvc_NetSrvInfo402_get_shares,
   13600             :                 .set = py_srvsvc_NetSrvInfo402_set_shares,
   13601             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13602             :         },
   13603             :         {
   13604             :                 .name = discard_const_p(char, "openfiles"),
   13605             :                 .get = py_srvsvc_NetSrvInfo402_get_openfiles,
   13606             :                 .set = py_srvsvc_NetSrvInfo402_set_openfiles,
   13607             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13608             :         },
   13609             :         {
   13610             :                 .name = discard_const_p(char, "sessopen"),
   13611             :                 .get = py_srvsvc_NetSrvInfo402_get_sessopen,
   13612             :                 .set = py_srvsvc_NetSrvInfo402_set_sessopen,
   13613             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13614             :         },
   13615             :         {
   13616             :                 .name = discard_const_p(char, "sesssvc"),
   13617             :                 .get = py_srvsvc_NetSrvInfo402_get_sesssvc,
   13618             :                 .set = py_srvsvc_NetSrvInfo402_set_sesssvc,
   13619             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13620             :         },
   13621             :         {
   13622             :                 .name = discard_const_p(char, "sessreqs"),
   13623             :                 .get = py_srvsvc_NetSrvInfo402_get_sessreqs,
   13624             :                 .set = py_srvsvc_NetSrvInfo402_set_sessreqs,
   13625             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13626             :         },
   13627             :         {
   13628             :                 .name = discard_const_p(char, "opensearch"),
   13629             :                 .get = py_srvsvc_NetSrvInfo402_get_opensearch,
   13630             :                 .set = py_srvsvc_NetSrvInfo402_set_opensearch,
   13631             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13632             :         },
   13633             :         {
   13634             :                 .name = discard_const_p(char, "activelocks"),
   13635             :                 .get = py_srvsvc_NetSrvInfo402_get_activelocks,
   13636             :                 .set = py_srvsvc_NetSrvInfo402_set_activelocks,
   13637             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13638             :         },
   13639             :         {
   13640             :                 .name = discard_const_p(char, "numreqbufs"),
   13641             :                 .get = py_srvsvc_NetSrvInfo402_get_numreqbufs,
   13642             :                 .set = py_srvsvc_NetSrvInfo402_set_numreqbufs,
   13643             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13644             :         },
   13645             :         {
   13646             :                 .name = discard_const_p(char, "sizereqbufs"),
   13647             :                 .get = py_srvsvc_NetSrvInfo402_get_sizereqbufs,
   13648             :                 .set = py_srvsvc_NetSrvInfo402_set_sizereqbufs,
   13649             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13650             :         },
   13651             :         {
   13652             :                 .name = discard_const_p(char, "numbigbufs"),
   13653             :                 .get = py_srvsvc_NetSrvInfo402_get_numbigbufs,
   13654             :                 .set = py_srvsvc_NetSrvInfo402_set_numbigbufs,
   13655             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13656             :         },
   13657             :         {
   13658             :                 .name = discard_const_p(char, "numfiletasks"),
   13659             :                 .get = py_srvsvc_NetSrvInfo402_get_numfiletasks,
   13660             :                 .set = py_srvsvc_NetSrvInfo402_set_numfiletasks,
   13661             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13662             :         },
   13663             :         {
   13664             :                 .name = discard_const_p(char, "alertsched"),
   13665             :                 .get = py_srvsvc_NetSrvInfo402_get_alertsched,
   13666             :                 .set = py_srvsvc_NetSrvInfo402_set_alertsched,
   13667             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13668             :         },
   13669             :         {
   13670             :                 .name = discard_const_p(char, "erroralert"),
   13671             :                 .get = py_srvsvc_NetSrvInfo402_get_erroralert,
   13672             :                 .set = py_srvsvc_NetSrvInfo402_set_erroralert,
   13673             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13674             :         },
   13675             :         {
   13676             :                 .name = discard_const_p(char, "logonalert"),
   13677             :                 .get = py_srvsvc_NetSrvInfo402_get_logonalert,
   13678             :                 .set = py_srvsvc_NetSrvInfo402_set_logonalert,
   13679             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13680             :         },
   13681             :         {
   13682             :                 .name = discard_const_p(char, "accessalert"),
   13683             :                 .get = py_srvsvc_NetSrvInfo402_get_accessalert,
   13684             :                 .set = py_srvsvc_NetSrvInfo402_set_accessalert,
   13685             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13686             :         },
   13687             :         {
   13688             :                 .name = discard_const_p(char, "diskalert"),
   13689             :                 .get = py_srvsvc_NetSrvInfo402_get_diskalert,
   13690             :                 .set = py_srvsvc_NetSrvInfo402_set_diskalert,
   13691             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13692             :         },
   13693             :         {
   13694             :                 .name = discard_const_p(char, "netioalert"),
   13695             :                 .get = py_srvsvc_NetSrvInfo402_get_netioalert,
   13696             :                 .set = py_srvsvc_NetSrvInfo402_set_netioalert,
   13697             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13698             :         },
   13699             :         {
   13700             :                 .name = discard_const_p(char, "maxaudits"),
   13701             :                 .get = py_srvsvc_NetSrvInfo402_get_maxaudits,
   13702             :                 .set = py_srvsvc_NetSrvInfo402_set_maxaudits,
   13703             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13704             :         },
   13705             :         {
   13706             :                 .name = discard_const_p(char, "srvheuristics"),
   13707             :                 .get = py_srvsvc_NetSrvInfo402_get_srvheuristics,
   13708             :                 .set = py_srvsvc_NetSrvInfo402_set_srvheuristics,
   13709             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   13710             :         },
   13711             :         { .name = NULL }
   13712             : };
   13713             : 
   13714           0 : static PyObject *py_srvsvc_NetSrvInfo402_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13715             : {
   13716           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo402, type);
   13717             : }
   13718             : 
   13719             : 
   13720             : static PyTypeObject srvsvc_NetSrvInfo402_Type = {
   13721             :         PyVarObject_HEAD_INIT(NULL, 0)
   13722             :         .tp_name = "srvsvc.NetSrvInfo402",
   13723             :         .tp_getset = py_srvsvc_NetSrvInfo402_getsetters,
   13724             :         .tp_methods = NULL,
   13725             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   13726             :         .tp_new = py_srvsvc_NetSrvInfo402_new,
   13727             : };
   13728             : 
   13729             : 
   13730           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_ulist_mtime(PyObject *obj, void *closure)
   13731             : {
   13732           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   13733             :         PyObject *py_ulist_mtime;
   13734           0 :         py_ulist_mtime = PyLong_FromUnsignedLongLong((uint32_t)object->ulist_mtime);
   13735           0 :         return py_ulist_mtime;
   13736             : }
   13737             : 
   13738           0 : static int py_srvsvc_NetSrvInfo403_set_ulist_mtime(PyObject *py_obj, PyObject *value, void *closure)
   13739             : {
   13740           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   13741           0 :         if (value == NULL) {
   13742           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ulist_mtime");
   13743           0 :                 return -1;
   13744             :         }
   13745             :         {
   13746           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ulist_mtime));
   13747           0 :                 if (PyLong_Check(value)) {
   13748             :                         unsigned long long test_var;
   13749           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13750           0 :                         if (PyErr_Occurred() != NULL) {
   13751           0 :                                 return -1;
   13752             :                         }
   13753           0 :                         if (test_var > uint_max) {
   13754           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13755             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13756           0 :                                 return -1;
   13757             :                         }
   13758           0 :                         object->ulist_mtime = test_var;
   13759             :                 } else {
   13760           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13761             :                           PyLong_Type.tp_name);
   13762           0 :                         return -1;
   13763             :                 }
   13764             :         }
   13765           0 :         return 0;
   13766             : }
   13767             : 
   13768           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_glist_mtime(PyObject *obj, void *closure)
   13769             : {
   13770           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   13771             :         PyObject *py_glist_mtime;
   13772           0 :         py_glist_mtime = PyLong_FromUnsignedLongLong((uint32_t)object->glist_mtime);
   13773           0 :         return py_glist_mtime;
   13774             : }
   13775             : 
   13776           0 : static int py_srvsvc_NetSrvInfo403_set_glist_mtime(PyObject *py_obj, PyObject *value, void *closure)
   13777             : {
   13778           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   13779           0 :         if (value == NULL) {
   13780           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->glist_mtime");
   13781           0 :                 return -1;
   13782             :         }
   13783             :         {
   13784           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->glist_mtime));
   13785           0 :                 if (PyLong_Check(value)) {
   13786             :                         unsigned long long test_var;
   13787           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13788           0 :                         if (PyErr_Occurred() != NULL) {
   13789           0 :                                 return -1;
   13790             :                         }
   13791           0 :                         if (test_var > uint_max) {
   13792           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13793             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13794           0 :                                 return -1;
   13795             :                         }
   13796           0 :                         object->glist_mtime = test_var;
   13797             :                 } else {
   13798           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13799             :                           PyLong_Type.tp_name);
   13800           0 :                         return -1;
   13801             :                 }
   13802             :         }
   13803           0 :         return 0;
   13804             : }
   13805             : 
   13806           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_alist_mtime(PyObject *obj, void *closure)
   13807             : {
   13808           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   13809             :         PyObject *py_alist_mtime;
   13810           0 :         py_alist_mtime = PyLong_FromUnsignedLongLong((uint32_t)object->alist_mtime);
   13811           0 :         return py_alist_mtime;
   13812             : }
   13813             : 
   13814           0 : static int py_srvsvc_NetSrvInfo403_set_alist_mtime(PyObject *py_obj, PyObject *value, void *closure)
   13815             : {
   13816           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   13817           0 :         if (value == NULL) {
   13818           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->alist_mtime");
   13819           0 :                 return -1;
   13820             :         }
   13821             :         {
   13822           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->alist_mtime));
   13823           0 :                 if (PyLong_Check(value)) {
   13824             :                         unsigned long long test_var;
   13825           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13826           0 :                         if (PyErr_Occurred() != NULL) {
   13827           0 :                                 return -1;
   13828             :                         }
   13829           0 :                         if (test_var > uint_max) {
   13830           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13831             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13832           0 :                                 return -1;
   13833             :                         }
   13834           0 :                         object->alist_mtime = test_var;
   13835             :                 } else {
   13836           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13837             :                           PyLong_Type.tp_name);
   13838           0 :                         return -1;
   13839             :                 }
   13840             :         }
   13841           0 :         return 0;
   13842             : }
   13843             : 
   13844           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_alerts(PyObject *obj, void *closure)
   13845             : {
   13846           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   13847             :         PyObject *py_alerts;
   13848           0 :         if (object->alerts == NULL) {
   13849           0 :                 Py_RETURN_NONE;
   13850             :         }
   13851           0 :         if (object->alerts == NULL) {
   13852           0 :                 py_alerts = Py_None;
   13853           0 :                 Py_INCREF(py_alerts);
   13854             :         } else {
   13855           0 :                 if (object->alerts == NULL) {
   13856           0 :                         py_alerts = Py_None;
   13857           0 :                         Py_INCREF(py_alerts);
   13858             :                 } else {
   13859           0 :                         py_alerts = PyUnicode_Decode(object->alerts, strlen(object->alerts), "utf-8", "ignore");
   13860             :                 }
   13861             :         }
   13862           0 :         return py_alerts;
   13863             : }
   13864             : 
   13865           0 : static int py_srvsvc_NetSrvInfo403_set_alerts(PyObject *py_obj, PyObject *value, void *closure)
   13866             : {
   13867           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   13868           0 :         if (value == NULL) {
   13869           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->alerts");
   13870           0 :                 return -1;
   13871             :         }
   13872           0 :         if (value == Py_None) {
   13873           0 :                 object->alerts = NULL;
   13874             :         } else {
   13875           0 :                 object->alerts = NULL;
   13876             :                 {
   13877             :                         const char *test_str;
   13878             :                         const char *talloc_str;
   13879           0 :                         PyObject *unicode = NULL;
   13880           0 :                         if (PyUnicode_Check(value)) {
   13881           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   13882           0 :                                 if (unicode == NULL) {
   13883           0 :                                         PyErr_NoMemory();
   13884           0 :                                         return -1;
   13885             :                                 }
   13886           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   13887           0 :                         } else if (PyBytes_Check(value)) {
   13888           0 :                                 test_str = PyBytes_AS_STRING(value);
   13889             :                         } else {
   13890           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   13891           0 :                                 return -1;
   13892             :                         }
   13893           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   13894           0 :                         if (unicode != NULL) {
   13895           0 :                                 Py_DECREF(unicode);
   13896             :                         }
   13897           0 :                         if (talloc_str == NULL) {
   13898           0 :                                 PyErr_NoMemory();
   13899           0 :                                 return -1;
   13900             :                         }
   13901           0 :                         object->alerts = talloc_str;
   13902             :                 }
   13903             :         }
   13904           0 :         return 0;
   13905             : }
   13906             : 
   13907           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_security(PyObject *obj, void *closure)
   13908             : {
   13909           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   13910             :         PyObject *py_security;
   13911           0 :         py_security = PyLong_FromUnsignedLongLong((uint32_t)object->security);
   13912           0 :         return py_security;
   13913             : }
   13914             : 
   13915           0 : static int py_srvsvc_NetSrvInfo403_set_security(PyObject *py_obj, PyObject *value, void *closure)
   13916             : {
   13917           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   13918           0 :         if (value == NULL) {
   13919           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->security");
   13920           0 :                 return -1;
   13921             :         }
   13922             :         {
   13923           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->security));
   13924           0 :                 if (PyLong_Check(value)) {
   13925             :                         unsigned long long test_var;
   13926           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13927           0 :                         if (PyErr_Occurred() != NULL) {
   13928           0 :                                 return -1;
   13929             :                         }
   13930           0 :                         if (test_var > uint_max) {
   13931           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13932             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13933           0 :                                 return -1;
   13934             :                         }
   13935           0 :                         object->security = test_var;
   13936             :                 } else {
   13937           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13938             :                           PyLong_Type.tp_name);
   13939           0 :                         return -1;
   13940             :                 }
   13941             :         }
   13942           0 :         return 0;
   13943             : }
   13944             : 
   13945           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_numadmin(PyObject *obj, void *closure)
   13946             : {
   13947           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   13948             :         PyObject *py_numadmin;
   13949           0 :         py_numadmin = PyLong_FromUnsignedLongLong((uint32_t)object->numadmin);
   13950           0 :         return py_numadmin;
   13951             : }
   13952             : 
   13953           0 : static int py_srvsvc_NetSrvInfo403_set_numadmin(PyObject *py_obj, PyObject *value, void *closure)
   13954             : {
   13955           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   13956           0 :         if (value == NULL) {
   13957           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->numadmin");
   13958           0 :                 return -1;
   13959             :         }
   13960             :         {
   13961           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numadmin));
   13962           0 :                 if (PyLong_Check(value)) {
   13963             :                         unsigned long long test_var;
   13964           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13965           0 :                         if (PyErr_Occurred() != NULL) {
   13966           0 :                                 return -1;
   13967             :                         }
   13968           0 :                         if (test_var > uint_max) {
   13969           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13970             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13971           0 :                                 return -1;
   13972             :                         }
   13973           0 :                         object->numadmin = test_var;
   13974             :                 } else {
   13975           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13976             :                           PyLong_Type.tp_name);
   13977           0 :                         return -1;
   13978             :                 }
   13979             :         }
   13980           0 :         return 0;
   13981             : }
   13982             : 
   13983           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_lanmask(PyObject *obj, void *closure)
   13984             : {
   13985           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   13986             :         PyObject *py_lanmask;
   13987           0 :         py_lanmask = PyLong_FromUnsignedLongLong((uint32_t)object->lanmask);
   13988           0 :         return py_lanmask;
   13989             : }
   13990             : 
   13991           0 : static int py_srvsvc_NetSrvInfo403_set_lanmask(PyObject *py_obj, PyObject *value, void *closure)
   13992             : {
   13993           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   13994           0 :         if (value == NULL) {
   13995           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lanmask");
   13996           0 :                 return -1;
   13997             :         }
   13998             :         {
   13999           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lanmask));
   14000           0 :                 if (PyLong_Check(value)) {
   14001             :                         unsigned long long test_var;
   14002           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14003           0 :                         if (PyErr_Occurred() != NULL) {
   14004           0 :                                 return -1;
   14005             :                         }
   14006           0 :                         if (test_var > uint_max) {
   14007           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14008             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14009           0 :                                 return -1;
   14010             :                         }
   14011           0 :                         object->lanmask = test_var;
   14012             :                 } else {
   14013           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14014             :                           PyLong_Type.tp_name);
   14015           0 :                         return -1;
   14016             :                 }
   14017             :         }
   14018           0 :         return 0;
   14019             : }
   14020             : 
   14021           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_guestaccount(PyObject *obj, void *closure)
   14022             : {
   14023           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   14024             :         PyObject *py_guestaccount;
   14025           0 :         if (object->guestaccount == NULL) {
   14026           0 :                 Py_RETURN_NONE;
   14027             :         }
   14028           0 :         if (object->guestaccount == NULL) {
   14029           0 :                 py_guestaccount = Py_None;
   14030           0 :                 Py_INCREF(py_guestaccount);
   14031             :         } else {
   14032           0 :                 if (object->guestaccount == NULL) {
   14033           0 :                         py_guestaccount = Py_None;
   14034           0 :                         Py_INCREF(py_guestaccount);
   14035             :                 } else {
   14036           0 :                         py_guestaccount = PyUnicode_Decode(object->guestaccount, strlen(object->guestaccount), "utf-8", "ignore");
   14037             :                 }
   14038             :         }
   14039           0 :         return py_guestaccount;
   14040             : }
   14041             : 
   14042           0 : static int py_srvsvc_NetSrvInfo403_set_guestaccount(PyObject *py_obj, PyObject *value, void *closure)
   14043             : {
   14044           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   14045           0 :         if (value == NULL) {
   14046           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->guestaccount");
   14047           0 :                 return -1;
   14048             :         }
   14049           0 :         if (value == Py_None) {
   14050           0 :                 object->guestaccount = NULL;
   14051             :         } else {
   14052           0 :                 object->guestaccount = NULL;
   14053             :                 {
   14054             :                         const char *test_str;
   14055             :                         const char *talloc_str;
   14056           0 :                         PyObject *unicode = NULL;
   14057           0 :                         if (PyUnicode_Check(value)) {
   14058           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   14059           0 :                                 if (unicode == NULL) {
   14060           0 :                                         PyErr_NoMemory();
   14061           0 :                                         return -1;
   14062             :                                 }
   14063           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   14064           0 :                         } else if (PyBytes_Check(value)) {
   14065           0 :                                 test_str = PyBytes_AS_STRING(value);
   14066             :                         } else {
   14067           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   14068           0 :                                 return -1;
   14069             :                         }
   14070           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   14071           0 :                         if (unicode != NULL) {
   14072           0 :                                 Py_DECREF(unicode);
   14073             :                         }
   14074           0 :                         if (talloc_str == NULL) {
   14075           0 :                                 PyErr_NoMemory();
   14076           0 :                                 return -1;
   14077             :                         }
   14078           0 :                         object->guestaccount = talloc_str;
   14079             :                 }
   14080             :         }
   14081           0 :         return 0;
   14082             : }
   14083             : 
   14084           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_chdevs(PyObject *obj, void *closure)
   14085             : {
   14086           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   14087             :         PyObject *py_chdevs;
   14088           0 :         py_chdevs = PyLong_FromUnsignedLongLong((uint32_t)object->chdevs);
   14089           0 :         return py_chdevs;
   14090             : }
   14091             : 
   14092           0 : static int py_srvsvc_NetSrvInfo403_set_chdevs(PyObject *py_obj, PyObject *value, void *closure)
   14093             : {
   14094           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   14095           0 :         if (value == NULL) {
   14096           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->chdevs");
   14097           0 :                 return -1;
   14098             :         }
   14099             :         {
   14100           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->chdevs));
   14101           0 :                 if (PyLong_Check(value)) {
   14102             :                         unsigned long long test_var;
   14103           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14104           0 :                         if (PyErr_Occurred() != NULL) {
   14105           0 :                                 return -1;
   14106             :                         }
   14107           0 :                         if (test_var > uint_max) {
   14108           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14109             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14110           0 :                                 return -1;
   14111             :                         }
   14112           0 :                         object->chdevs = test_var;
   14113             :                 } else {
   14114           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14115             :                           PyLong_Type.tp_name);
   14116           0 :                         return -1;
   14117             :                 }
   14118             :         }
   14119           0 :         return 0;
   14120             : }
   14121             : 
   14122           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_chdevqs(PyObject *obj, void *closure)
   14123             : {
   14124           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   14125             :         PyObject *py_chdevqs;
   14126           0 :         py_chdevqs = PyLong_FromUnsignedLongLong((uint32_t)object->chdevqs);
   14127           0 :         return py_chdevqs;
   14128             : }
   14129             : 
   14130           0 : static int py_srvsvc_NetSrvInfo403_set_chdevqs(PyObject *py_obj, PyObject *value, void *closure)
   14131             : {
   14132           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   14133           0 :         if (value == NULL) {
   14134           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->chdevqs");
   14135           0 :                 return -1;
   14136             :         }
   14137             :         {
   14138           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->chdevqs));
   14139           0 :                 if (PyLong_Check(value)) {
   14140             :                         unsigned long long test_var;
   14141           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14142           0 :                         if (PyErr_Occurred() != NULL) {
   14143           0 :                                 return -1;
   14144             :                         }
   14145           0 :                         if (test_var > uint_max) {
   14146           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14147             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14148           0 :                                 return -1;
   14149             :                         }
   14150           0 :                         object->chdevqs = test_var;
   14151             :                 } else {
   14152           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14153             :                           PyLong_Type.tp_name);
   14154           0 :                         return -1;
   14155             :                 }
   14156             :         }
   14157           0 :         return 0;
   14158             : }
   14159             : 
   14160           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_chdevjobs(PyObject *obj, void *closure)
   14161             : {
   14162           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   14163             :         PyObject *py_chdevjobs;
   14164           0 :         py_chdevjobs = PyLong_FromUnsignedLongLong((uint32_t)object->chdevjobs);
   14165           0 :         return py_chdevjobs;
   14166             : }
   14167             : 
   14168           0 : static int py_srvsvc_NetSrvInfo403_set_chdevjobs(PyObject *py_obj, PyObject *value, void *closure)
   14169             : {
   14170           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   14171           0 :         if (value == NULL) {
   14172           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->chdevjobs");
   14173           0 :                 return -1;
   14174             :         }
   14175             :         {
   14176           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->chdevjobs));
   14177           0 :                 if (PyLong_Check(value)) {
   14178             :                         unsigned long long test_var;
   14179           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14180           0 :                         if (PyErr_Occurred() != NULL) {
   14181           0 :                                 return -1;
   14182             :                         }
   14183           0 :                         if (test_var > uint_max) {
   14184           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14185             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14186           0 :                                 return -1;
   14187             :                         }
   14188           0 :                         object->chdevjobs = test_var;
   14189             :                 } else {
   14190           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14191             :                           PyLong_Type.tp_name);
   14192           0 :                         return -1;
   14193             :                 }
   14194             :         }
   14195           0 :         return 0;
   14196             : }
   14197             : 
   14198           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_connections(PyObject *obj, void *closure)
   14199             : {
   14200           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   14201             :         PyObject *py_connections;
   14202           0 :         py_connections = PyLong_FromUnsignedLongLong((uint32_t)object->connections);
   14203           0 :         return py_connections;
   14204             : }
   14205             : 
   14206           0 : static int py_srvsvc_NetSrvInfo403_set_connections(PyObject *py_obj, PyObject *value, void *closure)
   14207             : {
   14208           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   14209           0 :         if (value == NULL) {
   14210           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->connections");
   14211           0 :                 return -1;
   14212             :         }
   14213             :         {
   14214           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->connections));
   14215           0 :                 if (PyLong_Check(value)) {
   14216             :                         unsigned long long test_var;
   14217           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14218           0 :                         if (PyErr_Occurred() != NULL) {
   14219           0 :                                 return -1;
   14220             :                         }
   14221           0 :                         if (test_var > uint_max) {
   14222           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14223             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14224           0 :                                 return -1;
   14225             :                         }
   14226           0 :                         object->connections = test_var;
   14227             :                 } else {
   14228           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14229             :                           PyLong_Type.tp_name);
   14230           0 :                         return -1;
   14231             :                 }
   14232             :         }
   14233           0 :         return 0;
   14234             : }
   14235             : 
   14236           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_shares(PyObject *obj, void *closure)
   14237             : {
   14238           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   14239             :         PyObject *py_shares;
   14240           0 :         py_shares = PyLong_FromUnsignedLongLong((uint32_t)object->shares);
   14241           0 :         return py_shares;
   14242             : }
   14243             : 
   14244           0 : static int py_srvsvc_NetSrvInfo403_set_shares(PyObject *py_obj, PyObject *value, void *closure)
   14245             : {
   14246           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   14247           0 :         if (value == NULL) {
   14248           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->shares");
   14249           0 :                 return -1;
   14250             :         }
   14251             :         {
   14252           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->shares));
   14253           0 :                 if (PyLong_Check(value)) {
   14254             :                         unsigned long long test_var;
   14255           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14256           0 :                         if (PyErr_Occurred() != NULL) {
   14257           0 :                                 return -1;
   14258             :                         }
   14259           0 :                         if (test_var > uint_max) {
   14260           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14261             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14262           0 :                                 return -1;
   14263             :                         }
   14264           0 :                         object->shares = test_var;
   14265             :                 } else {
   14266           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14267             :                           PyLong_Type.tp_name);
   14268           0 :                         return -1;
   14269             :                 }
   14270             :         }
   14271           0 :         return 0;
   14272             : }
   14273             : 
   14274           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_openfiles(PyObject *obj, void *closure)
   14275             : {
   14276           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   14277             :         PyObject *py_openfiles;
   14278           0 :         py_openfiles = PyLong_FromUnsignedLongLong((uint32_t)object->openfiles);
   14279           0 :         return py_openfiles;
   14280             : }
   14281             : 
   14282           0 : static int py_srvsvc_NetSrvInfo403_set_openfiles(PyObject *py_obj, PyObject *value, void *closure)
   14283             : {
   14284           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   14285           0 :         if (value == NULL) {
   14286           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->openfiles");
   14287           0 :                 return -1;
   14288             :         }
   14289             :         {
   14290           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->openfiles));
   14291           0 :                 if (PyLong_Check(value)) {
   14292             :                         unsigned long long test_var;
   14293           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14294           0 :                         if (PyErr_Occurred() != NULL) {
   14295           0 :                                 return -1;
   14296             :                         }
   14297           0 :                         if (test_var > uint_max) {
   14298           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14299             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14300           0 :                                 return -1;
   14301             :                         }
   14302           0 :                         object->openfiles = test_var;
   14303             :                 } else {
   14304           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14305             :                           PyLong_Type.tp_name);
   14306           0 :                         return -1;
   14307             :                 }
   14308             :         }
   14309           0 :         return 0;
   14310             : }
   14311             : 
   14312           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_sessopen(PyObject *obj, void *closure)
   14313             : {
   14314           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   14315             :         PyObject *py_sessopen;
   14316           0 :         py_sessopen = PyLong_FromUnsignedLongLong((uint32_t)object->sessopen);
   14317           0 :         return py_sessopen;
   14318             : }
   14319             : 
   14320           0 : static int py_srvsvc_NetSrvInfo403_set_sessopen(PyObject *py_obj, PyObject *value, void *closure)
   14321             : {
   14322           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   14323           0 :         if (value == NULL) {
   14324           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessopen");
   14325           0 :                 return -1;
   14326             :         }
   14327             :         {
   14328           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessopen));
   14329           0 :                 if (PyLong_Check(value)) {
   14330             :                         unsigned long long test_var;
   14331           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14332           0 :                         if (PyErr_Occurred() != NULL) {
   14333           0 :                                 return -1;
   14334             :                         }
   14335           0 :                         if (test_var > uint_max) {
   14336           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14337             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14338           0 :                                 return -1;
   14339             :                         }
   14340           0 :                         object->sessopen = test_var;
   14341             :                 } else {
   14342           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14343             :                           PyLong_Type.tp_name);
   14344           0 :                         return -1;
   14345             :                 }
   14346             :         }
   14347           0 :         return 0;
   14348             : }
   14349             : 
   14350           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_sesssvc(PyObject *obj, void *closure)
   14351             : {
   14352           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   14353             :         PyObject *py_sesssvc;
   14354           0 :         py_sesssvc = PyLong_FromUnsignedLongLong((uint32_t)object->sesssvc);
   14355           0 :         return py_sesssvc;
   14356             : }
   14357             : 
   14358           0 : static int py_srvsvc_NetSrvInfo403_set_sesssvc(PyObject *py_obj, PyObject *value, void *closure)
   14359             : {
   14360           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   14361           0 :         if (value == NULL) {
   14362           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sesssvc");
   14363           0 :                 return -1;
   14364             :         }
   14365             :         {
   14366           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sesssvc));
   14367           0 :                 if (PyLong_Check(value)) {
   14368             :                         unsigned long long test_var;
   14369           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14370           0 :                         if (PyErr_Occurred() != NULL) {
   14371           0 :                                 return -1;
   14372             :                         }
   14373           0 :                         if (test_var > uint_max) {
   14374           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14375             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14376           0 :                                 return -1;
   14377             :                         }
   14378           0 :                         object->sesssvc = test_var;
   14379             :                 } else {
   14380           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14381             :                           PyLong_Type.tp_name);
   14382           0 :                         return -1;
   14383             :                 }
   14384             :         }
   14385           0 :         return 0;
   14386             : }
   14387             : 
   14388           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_sessreqs(PyObject *obj, void *closure)
   14389             : {
   14390           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   14391             :         PyObject *py_sessreqs;
   14392           0 :         py_sessreqs = PyLong_FromUnsignedLongLong((uint32_t)object->sessreqs);
   14393           0 :         return py_sessreqs;
   14394             : }
   14395             : 
   14396           0 : static int py_srvsvc_NetSrvInfo403_set_sessreqs(PyObject *py_obj, PyObject *value, void *closure)
   14397             : {
   14398           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   14399           0 :         if (value == NULL) {
   14400           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessreqs");
   14401           0 :                 return -1;
   14402             :         }
   14403             :         {
   14404           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessreqs));
   14405           0 :                 if (PyLong_Check(value)) {
   14406             :                         unsigned long long test_var;
   14407           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14408           0 :                         if (PyErr_Occurred() != NULL) {
   14409           0 :                                 return -1;
   14410             :                         }
   14411           0 :                         if (test_var > uint_max) {
   14412           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14413             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14414           0 :                                 return -1;
   14415             :                         }
   14416           0 :                         object->sessreqs = test_var;
   14417             :                 } else {
   14418           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14419             :                           PyLong_Type.tp_name);
   14420           0 :                         return -1;
   14421             :                 }
   14422             :         }
   14423           0 :         return 0;
   14424             : }
   14425             : 
   14426           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_opensearch(PyObject *obj, void *closure)
   14427             : {
   14428           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   14429             :         PyObject *py_opensearch;
   14430           0 :         py_opensearch = PyLong_FromUnsignedLongLong((uint32_t)object->opensearch);
   14431           0 :         return py_opensearch;
   14432             : }
   14433             : 
   14434           0 : static int py_srvsvc_NetSrvInfo403_set_opensearch(PyObject *py_obj, PyObject *value, void *closure)
   14435             : {
   14436           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   14437           0 :         if (value == NULL) {
   14438           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->opensearch");
   14439           0 :                 return -1;
   14440             :         }
   14441             :         {
   14442           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->opensearch));
   14443           0 :                 if (PyLong_Check(value)) {
   14444             :                         unsigned long long test_var;
   14445           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14446           0 :                         if (PyErr_Occurred() != NULL) {
   14447           0 :                                 return -1;
   14448             :                         }
   14449           0 :                         if (test_var > uint_max) {
   14450           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14451             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14452           0 :                                 return -1;
   14453             :                         }
   14454           0 :                         object->opensearch = test_var;
   14455             :                 } else {
   14456           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14457             :                           PyLong_Type.tp_name);
   14458           0 :                         return -1;
   14459             :                 }
   14460             :         }
   14461           0 :         return 0;
   14462             : }
   14463             : 
   14464           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_activelocks(PyObject *obj, void *closure)
   14465             : {
   14466           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   14467             :         PyObject *py_activelocks;
   14468           0 :         py_activelocks = PyLong_FromUnsignedLongLong((uint32_t)object->activelocks);
   14469           0 :         return py_activelocks;
   14470             : }
   14471             : 
   14472           0 : static int py_srvsvc_NetSrvInfo403_set_activelocks(PyObject *py_obj, PyObject *value, void *closure)
   14473             : {
   14474           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   14475           0 :         if (value == NULL) {
   14476           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->activelocks");
   14477           0 :                 return -1;
   14478             :         }
   14479             :         {
   14480           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->activelocks));
   14481           0 :                 if (PyLong_Check(value)) {
   14482             :                         unsigned long long test_var;
   14483           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14484           0 :                         if (PyErr_Occurred() != NULL) {
   14485           0 :                                 return -1;
   14486             :                         }
   14487           0 :                         if (test_var > uint_max) {
   14488           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14489             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14490           0 :                                 return -1;
   14491             :                         }
   14492           0 :                         object->activelocks = test_var;
   14493             :                 } else {
   14494           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14495             :                           PyLong_Type.tp_name);
   14496           0 :                         return -1;
   14497             :                 }
   14498             :         }
   14499           0 :         return 0;
   14500             : }
   14501             : 
   14502           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_numreqbufs(PyObject *obj, void *closure)
   14503             : {
   14504           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   14505             :         PyObject *py_numreqbufs;
   14506           0 :         py_numreqbufs = PyLong_FromUnsignedLongLong((uint32_t)object->numreqbufs);
   14507           0 :         return py_numreqbufs;
   14508             : }
   14509             : 
   14510           0 : static int py_srvsvc_NetSrvInfo403_set_numreqbufs(PyObject *py_obj, PyObject *value, void *closure)
   14511             : {
   14512           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   14513           0 :         if (value == NULL) {
   14514           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->numreqbufs");
   14515           0 :                 return -1;
   14516             :         }
   14517             :         {
   14518           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numreqbufs));
   14519           0 :                 if (PyLong_Check(value)) {
   14520             :                         unsigned long long test_var;
   14521           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14522           0 :                         if (PyErr_Occurred() != NULL) {
   14523           0 :                                 return -1;
   14524             :                         }
   14525           0 :                         if (test_var > uint_max) {
   14526           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14527             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14528           0 :                                 return -1;
   14529             :                         }
   14530           0 :                         object->numreqbufs = test_var;
   14531             :                 } else {
   14532           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14533             :                           PyLong_Type.tp_name);
   14534           0 :                         return -1;
   14535             :                 }
   14536             :         }
   14537           0 :         return 0;
   14538             : }
   14539             : 
   14540           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_sizereqbufs(PyObject *obj, void *closure)
   14541             : {
   14542           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   14543             :         PyObject *py_sizereqbufs;
   14544           0 :         py_sizereqbufs = PyLong_FromUnsignedLongLong((uint32_t)object->sizereqbufs);
   14545           0 :         return py_sizereqbufs;
   14546             : }
   14547             : 
   14548           0 : static int py_srvsvc_NetSrvInfo403_set_sizereqbufs(PyObject *py_obj, PyObject *value, void *closure)
   14549             : {
   14550           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   14551           0 :         if (value == NULL) {
   14552           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sizereqbufs");
   14553           0 :                 return -1;
   14554             :         }
   14555             :         {
   14556           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sizereqbufs));
   14557           0 :                 if (PyLong_Check(value)) {
   14558             :                         unsigned long long test_var;
   14559           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14560           0 :                         if (PyErr_Occurred() != NULL) {
   14561           0 :                                 return -1;
   14562             :                         }
   14563           0 :                         if (test_var > uint_max) {
   14564           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14565             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14566           0 :                                 return -1;
   14567             :                         }
   14568           0 :                         object->sizereqbufs = test_var;
   14569             :                 } else {
   14570           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14571             :                           PyLong_Type.tp_name);
   14572           0 :                         return -1;
   14573             :                 }
   14574             :         }
   14575           0 :         return 0;
   14576             : }
   14577             : 
   14578           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_numbigbufs(PyObject *obj, void *closure)
   14579             : {
   14580           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   14581             :         PyObject *py_numbigbufs;
   14582           0 :         py_numbigbufs = PyLong_FromUnsignedLongLong((uint32_t)object->numbigbufs);
   14583           0 :         return py_numbigbufs;
   14584             : }
   14585             : 
   14586           0 : static int py_srvsvc_NetSrvInfo403_set_numbigbufs(PyObject *py_obj, PyObject *value, void *closure)
   14587             : {
   14588           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   14589           0 :         if (value == NULL) {
   14590           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->numbigbufs");
   14591           0 :                 return -1;
   14592             :         }
   14593             :         {
   14594           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numbigbufs));
   14595           0 :                 if (PyLong_Check(value)) {
   14596             :                         unsigned long long test_var;
   14597           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14598           0 :                         if (PyErr_Occurred() != NULL) {
   14599           0 :                                 return -1;
   14600             :                         }
   14601           0 :                         if (test_var > uint_max) {
   14602           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14603             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14604           0 :                                 return -1;
   14605             :                         }
   14606           0 :                         object->numbigbufs = test_var;
   14607             :                 } else {
   14608           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14609             :                           PyLong_Type.tp_name);
   14610           0 :                         return -1;
   14611             :                 }
   14612             :         }
   14613           0 :         return 0;
   14614             : }
   14615             : 
   14616           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_numfiletasks(PyObject *obj, void *closure)
   14617             : {
   14618           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   14619             :         PyObject *py_numfiletasks;
   14620           0 :         py_numfiletasks = PyLong_FromUnsignedLongLong((uint32_t)object->numfiletasks);
   14621           0 :         return py_numfiletasks;
   14622             : }
   14623             : 
   14624           0 : static int py_srvsvc_NetSrvInfo403_set_numfiletasks(PyObject *py_obj, PyObject *value, void *closure)
   14625             : {
   14626           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   14627           0 :         if (value == NULL) {
   14628           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->numfiletasks");
   14629           0 :                 return -1;
   14630             :         }
   14631             :         {
   14632           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numfiletasks));
   14633           0 :                 if (PyLong_Check(value)) {
   14634             :                         unsigned long long test_var;
   14635           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14636           0 :                         if (PyErr_Occurred() != NULL) {
   14637           0 :                                 return -1;
   14638             :                         }
   14639           0 :                         if (test_var > uint_max) {
   14640           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14641             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14642           0 :                                 return -1;
   14643             :                         }
   14644           0 :                         object->numfiletasks = test_var;
   14645             :                 } else {
   14646           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14647             :                           PyLong_Type.tp_name);
   14648           0 :                         return -1;
   14649             :                 }
   14650             :         }
   14651           0 :         return 0;
   14652             : }
   14653             : 
   14654           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_alertsched(PyObject *obj, void *closure)
   14655             : {
   14656           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   14657             :         PyObject *py_alertsched;
   14658           0 :         py_alertsched = PyLong_FromUnsignedLongLong((uint32_t)object->alertsched);
   14659           0 :         return py_alertsched;
   14660             : }
   14661             : 
   14662           0 : static int py_srvsvc_NetSrvInfo403_set_alertsched(PyObject *py_obj, PyObject *value, void *closure)
   14663             : {
   14664           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   14665           0 :         if (value == NULL) {
   14666           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->alertsched");
   14667           0 :                 return -1;
   14668             :         }
   14669             :         {
   14670           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->alertsched));
   14671           0 :                 if (PyLong_Check(value)) {
   14672             :                         unsigned long long test_var;
   14673           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14674           0 :                         if (PyErr_Occurred() != NULL) {
   14675           0 :                                 return -1;
   14676             :                         }
   14677           0 :                         if (test_var > uint_max) {
   14678           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14679             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14680           0 :                                 return -1;
   14681             :                         }
   14682           0 :                         object->alertsched = test_var;
   14683             :                 } else {
   14684           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14685             :                           PyLong_Type.tp_name);
   14686           0 :                         return -1;
   14687             :                 }
   14688             :         }
   14689           0 :         return 0;
   14690             : }
   14691             : 
   14692           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_erroralert(PyObject *obj, void *closure)
   14693             : {
   14694           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   14695             :         PyObject *py_erroralert;
   14696           0 :         py_erroralert = PyLong_FromUnsignedLongLong((uint32_t)object->erroralert);
   14697           0 :         return py_erroralert;
   14698             : }
   14699             : 
   14700           0 : static int py_srvsvc_NetSrvInfo403_set_erroralert(PyObject *py_obj, PyObject *value, void *closure)
   14701             : {
   14702           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   14703           0 :         if (value == NULL) {
   14704           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->erroralert");
   14705           0 :                 return -1;
   14706             :         }
   14707             :         {
   14708           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->erroralert));
   14709           0 :                 if (PyLong_Check(value)) {
   14710             :                         unsigned long long test_var;
   14711           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14712           0 :                         if (PyErr_Occurred() != NULL) {
   14713           0 :                                 return -1;
   14714             :                         }
   14715           0 :                         if (test_var > uint_max) {
   14716           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14717             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14718           0 :                                 return -1;
   14719             :                         }
   14720           0 :                         object->erroralert = test_var;
   14721             :                 } else {
   14722           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14723             :                           PyLong_Type.tp_name);
   14724           0 :                         return -1;
   14725             :                 }
   14726             :         }
   14727           0 :         return 0;
   14728             : }
   14729             : 
   14730           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_logonalert(PyObject *obj, void *closure)
   14731             : {
   14732           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   14733             :         PyObject *py_logonalert;
   14734           0 :         py_logonalert = PyLong_FromUnsignedLongLong((uint32_t)object->logonalert);
   14735           0 :         return py_logonalert;
   14736             : }
   14737             : 
   14738           0 : static int py_srvsvc_NetSrvInfo403_set_logonalert(PyObject *py_obj, PyObject *value, void *closure)
   14739             : {
   14740           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   14741           0 :         if (value == NULL) {
   14742           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logonalert");
   14743           0 :                 return -1;
   14744             :         }
   14745             :         {
   14746           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logonalert));
   14747           0 :                 if (PyLong_Check(value)) {
   14748             :                         unsigned long long test_var;
   14749           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14750           0 :                         if (PyErr_Occurred() != NULL) {
   14751           0 :                                 return -1;
   14752             :                         }
   14753           0 :                         if (test_var > uint_max) {
   14754           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14755             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14756           0 :                                 return -1;
   14757             :                         }
   14758           0 :                         object->logonalert = test_var;
   14759             :                 } else {
   14760           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14761             :                           PyLong_Type.tp_name);
   14762           0 :                         return -1;
   14763             :                 }
   14764             :         }
   14765           0 :         return 0;
   14766             : }
   14767             : 
   14768           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_accessalert(PyObject *obj, void *closure)
   14769             : {
   14770           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   14771             :         PyObject *py_accessalert;
   14772           0 :         py_accessalert = PyLong_FromUnsignedLongLong((uint32_t)object->accessalert);
   14773           0 :         return py_accessalert;
   14774             : }
   14775             : 
   14776           0 : static int py_srvsvc_NetSrvInfo403_set_accessalert(PyObject *py_obj, PyObject *value, void *closure)
   14777             : {
   14778           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   14779           0 :         if (value == NULL) {
   14780           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->accessalert");
   14781           0 :                 return -1;
   14782             :         }
   14783             :         {
   14784           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->accessalert));
   14785           0 :                 if (PyLong_Check(value)) {
   14786             :                         unsigned long long test_var;
   14787           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14788           0 :                         if (PyErr_Occurred() != NULL) {
   14789           0 :                                 return -1;
   14790             :                         }
   14791           0 :                         if (test_var > uint_max) {
   14792           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14793             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14794           0 :                                 return -1;
   14795             :                         }
   14796           0 :                         object->accessalert = test_var;
   14797             :                 } else {
   14798           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14799             :                           PyLong_Type.tp_name);
   14800           0 :                         return -1;
   14801             :                 }
   14802             :         }
   14803           0 :         return 0;
   14804             : }
   14805             : 
   14806           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_diskalert(PyObject *obj, void *closure)
   14807             : {
   14808           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   14809             :         PyObject *py_diskalert;
   14810           0 :         py_diskalert = PyLong_FromUnsignedLongLong((uint32_t)object->diskalert);
   14811           0 :         return py_diskalert;
   14812             : }
   14813             : 
   14814           0 : static int py_srvsvc_NetSrvInfo403_set_diskalert(PyObject *py_obj, PyObject *value, void *closure)
   14815             : {
   14816           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   14817           0 :         if (value == NULL) {
   14818           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->diskalert");
   14819           0 :                 return -1;
   14820             :         }
   14821             :         {
   14822           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->diskalert));
   14823           0 :                 if (PyLong_Check(value)) {
   14824             :                         unsigned long long test_var;
   14825           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14826           0 :                         if (PyErr_Occurred() != NULL) {
   14827           0 :                                 return -1;
   14828             :                         }
   14829           0 :                         if (test_var > uint_max) {
   14830           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14831             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14832           0 :                                 return -1;
   14833             :                         }
   14834           0 :                         object->diskalert = test_var;
   14835             :                 } else {
   14836           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14837             :                           PyLong_Type.tp_name);
   14838           0 :                         return -1;
   14839             :                 }
   14840             :         }
   14841           0 :         return 0;
   14842             : }
   14843             : 
   14844           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_netioalert(PyObject *obj, void *closure)
   14845             : {
   14846           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   14847             :         PyObject *py_netioalert;
   14848           0 :         py_netioalert = PyLong_FromUnsignedLongLong((uint32_t)object->netioalert);
   14849           0 :         return py_netioalert;
   14850             : }
   14851             : 
   14852           0 : static int py_srvsvc_NetSrvInfo403_set_netioalert(PyObject *py_obj, PyObject *value, void *closure)
   14853             : {
   14854           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   14855           0 :         if (value == NULL) {
   14856           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->netioalert");
   14857           0 :                 return -1;
   14858             :         }
   14859             :         {
   14860           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->netioalert));
   14861           0 :                 if (PyLong_Check(value)) {
   14862             :                         unsigned long long test_var;
   14863           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14864           0 :                         if (PyErr_Occurred() != NULL) {
   14865           0 :                                 return -1;
   14866             :                         }
   14867           0 :                         if (test_var > uint_max) {
   14868           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14869             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14870           0 :                                 return -1;
   14871             :                         }
   14872           0 :                         object->netioalert = test_var;
   14873             :                 } else {
   14874           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14875             :                           PyLong_Type.tp_name);
   14876           0 :                         return -1;
   14877             :                 }
   14878             :         }
   14879           0 :         return 0;
   14880             : }
   14881             : 
   14882           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_maxaudits(PyObject *obj, void *closure)
   14883             : {
   14884           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   14885             :         PyObject *py_maxaudits;
   14886           0 :         py_maxaudits = PyLong_FromUnsignedLongLong((uint32_t)object->maxaudits);
   14887           0 :         return py_maxaudits;
   14888             : }
   14889             : 
   14890           0 : static int py_srvsvc_NetSrvInfo403_set_maxaudits(PyObject *py_obj, PyObject *value, void *closure)
   14891             : {
   14892           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   14893           0 :         if (value == NULL) {
   14894           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxaudits");
   14895           0 :                 return -1;
   14896             :         }
   14897             :         {
   14898           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxaudits));
   14899           0 :                 if (PyLong_Check(value)) {
   14900             :                         unsigned long long test_var;
   14901           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14902           0 :                         if (PyErr_Occurred() != NULL) {
   14903           0 :                                 return -1;
   14904             :                         }
   14905           0 :                         if (test_var > uint_max) {
   14906           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14907             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14908           0 :                                 return -1;
   14909             :                         }
   14910           0 :                         object->maxaudits = test_var;
   14911             :                 } else {
   14912           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14913             :                           PyLong_Type.tp_name);
   14914           0 :                         return -1;
   14915             :                 }
   14916             :         }
   14917           0 :         return 0;
   14918             : }
   14919             : 
   14920           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_srvheuristics(PyObject *obj, void *closure)
   14921             : {
   14922           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   14923             :         PyObject *py_srvheuristics;
   14924           0 :         if (object->srvheuristics == NULL) {
   14925           0 :                 Py_RETURN_NONE;
   14926             :         }
   14927           0 :         if (object->srvheuristics == NULL) {
   14928           0 :                 py_srvheuristics = Py_None;
   14929           0 :                 Py_INCREF(py_srvheuristics);
   14930             :         } else {
   14931           0 :                 if (object->srvheuristics == NULL) {
   14932           0 :                         py_srvheuristics = Py_None;
   14933           0 :                         Py_INCREF(py_srvheuristics);
   14934             :                 } else {
   14935           0 :                         py_srvheuristics = PyUnicode_Decode(object->srvheuristics, strlen(object->srvheuristics), "utf-8", "ignore");
   14936             :                 }
   14937             :         }
   14938           0 :         return py_srvheuristics;
   14939             : }
   14940             : 
   14941           0 : static int py_srvsvc_NetSrvInfo403_set_srvheuristics(PyObject *py_obj, PyObject *value, void *closure)
   14942             : {
   14943           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   14944           0 :         if (value == NULL) {
   14945           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->srvheuristics");
   14946           0 :                 return -1;
   14947             :         }
   14948           0 :         if (value == Py_None) {
   14949           0 :                 object->srvheuristics = NULL;
   14950             :         } else {
   14951           0 :                 object->srvheuristics = NULL;
   14952             :                 {
   14953             :                         const char *test_str;
   14954             :                         const char *talloc_str;
   14955           0 :                         PyObject *unicode = NULL;
   14956           0 :                         if (PyUnicode_Check(value)) {
   14957           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   14958           0 :                                 if (unicode == NULL) {
   14959           0 :                                         PyErr_NoMemory();
   14960           0 :                                         return -1;
   14961             :                                 }
   14962           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   14963           0 :                         } else if (PyBytes_Check(value)) {
   14964           0 :                                 test_str = PyBytes_AS_STRING(value);
   14965             :                         } else {
   14966           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   14967           0 :                                 return -1;
   14968             :                         }
   14969           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   14970           0 :                         if (unicode != NULL) {
   14971           0 :                                 Py_DECREF(unicode);
   14972             :                         }
   14973           0 :                         if (talloc_str == NULL) {
   14974           0 :                                 PyErr_NoMemory();
   14975           0 :                                 return -1;
   14976             :                         }
   14977           0 :                         object->srvheuristics = talloc_str;
   14978             :                 }
   14979             :         }
   14980           0 :         return 0;
   14981             : }
   14982             : 
   14983           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_auditedevents(PyObject *obj, void *closure)
   14984             : {
   14985           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   14986             :         PyObject *py_auditedevents;
   14987           0 :         py_auditedevents = PyLong_FromUnsignedLongLong((uint32_t)object->auditedevents);
   14988           0 :         return py_auditedevents;
   14989             : }
   14990             : 
   14991           0 : static int py_srvsvc_NetSrvInfo403_set_auditedevents(PyObject *py_obj, PyObject *value, void *closure)
   14992             : {
   14993           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   14994           0 :         if (value == NULL) {
   14995           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auditedevents");
   14996           0 :                 return -1;
   14997             :         }
   14998             :         {
   14999           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auditedevents));
   15000           0 :                 if (PyLong_Check(value)) {
   15001             :                         unsigned long long test_var;
   15002           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15003           0 :                         if (PyErr_Occurred() != NULL) {
   15004           0 :                                 return -1;
   15005             :                         }
   15006           0 :                         if (test_var > uint_max) {
   15007           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15008             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15009           0 :                                 return -1;
   15010             :                         }
   15011           0 :                         object->auditedevents = test_var;
   15012             :                 } else {
   15013           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15014             :                           PyLong_Type.tp_name);
   15015           0 :                         return -1;
   15016             :                 }
   15017             :         }
   15018           0 :         return 0;
   15019             : }
   15020             : 
   15021           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_auditprofile(PyObject *obj, void *closure)
   15022             : {
   15023           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   15024             :         PyObject *py_auditprofile;
   15025           0 :         py_auditprofile = PyLong_FromUnsignedLongLong((uint32_t)object->auditprofile);
   15026           0 :         return py_auditprofile;
   15027             : }
   15028             : 
   15029           0 : static int py_srvsvc_NetSrvInfo403_set_auditprofile(PyObject *py_obj, PyObject *value, void *closure)
   15030             : {
   15031           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   15032           0 :         if (value == NULL) {
   15033           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auditprofile");
   15034           0 :                 return -1;
   15035             :         }
   15036             :         {
   15037           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auditprofile));
   15038           0 :                 if (PyLong_Check(value)) {
   15039             :                         unsigned long long test_var;
   15040           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15041           0 :                         if (PyErr_Occurred() != NULL) {
   15042           0 :                                 return -1;
   15043             :                         }
   15044           0 :                         if (test_var > uint_max) {
   15045           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15046             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15047           0 :                                 return -1;
   15048             :                         }
   15049           0 :                         object->auditprofile = test_var;
   15050             :                 } else {
   15051           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15052             :                           PyLong_Type.tp_name);
   15053           0 :                         return -1;
   15054             :                 }
   15055             :         }
   15056           0 :         return 0;
   15057             : }
   15058             : 
   15059           0 : static PyObject *py_srvsvc_NetSrvInfo403_get_autopath(PyObject *obj, void *closure)
   15060             : {
   15061           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(obj);
   15062             :         PyObject *py_autopath;
   15063           0 :         if (object->autopath == NULL) {
   15064           0 :                 Py_RETURN_NONE;
   15065             :         }
   15066           0 :         if (object->autopath == NULL) {
   15067           0 :                 py_autopath = Py_None;
   15068           0 :                 Py_INCREF(py_autopath);
   15069             :         } else {
   15070           0 :                 if (object->autopath == NULL) {
   15071           0 :                         py_autopath = Py_None;
   15072           0 :                         Py_INCREF(py_autopath);
   15073             :                 } else {
   15074           0 :                         py_autopath = PyUnicode_Decode(object->autopath, strlen(object->autopath), "utf-8", "ignore");
   15075             :                 }
   15076             :         }
   15077           0 :         return py_autopath;
   15078             : }
   15079             : 
   15080           0 : static int py_srvsvc_NetSrvInfo403_set_autopath(PyObject *py_obj, PyObject *value, void *closure)
   15081             : {
   15082           0 :         struct srvsvc_NetSrvInfo403 *object = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(py_obj);
   15083           0 :         if (value == NULL) {
   15084           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->autopath");
   15085           0 :                 return -1;
   15086             :         }
   15087           0 :         if (value == Py_None) {
   15088           0 :                 object->autopath = NULL;
   15089             :         } else {
   15090           0 :                 object->autopath = NULL;
   15091             :                 {
   15092             :                         const char *test_str;
   15093             :                         const char *talloc_str;
   15094           0 :                         PyObject *unicode = NULL;
   15095           0 :                         if (PyUnicode_Check(value)) {
   15096           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   15097           0 :                                 if (unicode == NULL) {
   15098           0 :                                         PyErr_NoMemory();
   15099           0 :                                         return -1;
   15100             :                                 }
   15101           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   15102           0 :                         } else if (PyBytes_Check(value)) {
   15103           0 :                                 test_str = PyBytes_AS_STRING(value);
   15104             :                         } else {
   15105           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   15106           0 :                                 return -1;
   15107             :                         }
   15108           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   15109           0 :                         if (unicode != NULL) {
   15110           0 :                                 Py_DECREF(unicode);
   15111             :                         }
   15112           0 :                         if (talloc_str == NULL) {
   15113           0 :                                 PyErr_NoMemory();
   15114           0 :                                 return -1;
   15115             :                         }
   15116           0 :                         object->autopath = talloc_str;
   15117             :                 }
   15118             :         }
   15119           0 :         return 0;
   15120             : }
   15121             : 
   15122             : static PyGetSetDef py_srvsvc_NetSrvInfo403_getsetters[] = {
   15123             :         {
   15124             :                 .name = discard_const_p(char, "ulist_mtime"),
   15125             :                 .get = py_srvsvc_NetSrvInfo403_get_ulist_mtime,
   15126             :                 .set = py_srvsvc_NetSrvInfo403_set_ulist_mtime,
   15127             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15128             :         },
   15129             :         {
   15130             :                 .name = discard_const_p(char, "glist_mtime"),
   15131             :                 .get = py_srvsvc_NetSrvInfo403_get_glist_mtime,
   15132             :                 .set = py_srvsvc_NetSrvInfo403_set_glist_mtime,
   15133             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15134             :         },
   15135             :         {
   15136             :                 .name = discard_const_p(char, "alist_mtime"),
   15137             :                 .get = py_srvsvc_NetSrvInfo403_get_alist_mtime,
   15138             :                 .set = py_srvsvc_NetSrvInfo403_set_alist_mtime,
   15139             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15140             :         },
   15141             :         {
   15142             :                 .name = discard_const_p(char, "alerts"),
   15143             :                 .get = py_srvsvc_NetSrvInfo403_get_alerts,
   15144             :                 .set = py_srvsvc_NetSrvInfo403_set_alerts,
   15145             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   15146             :         },
   15147             :         {
   15148             :                 .name = discard_const_p(char, "security"),
   15149             :                 .get = py_srvsvc_NetSrvInfo403_get_security,
   15150             :                 .set = py_srvsvc_NetSrvInfo403_set_security,
   15151             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15152             :         },
   15153             :         {
   15154             :                 .name = discard_const_p(char, "numadmin"),
   15155             :                 .get = py_srvsvc_NetSrvInfo403_get_numadmin,
   15156             :                 .set = py_srvsvc_NetSrvInfo403_set_numadmin,
   15157             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15158             :         },
   15159             :         {
   15160             :                 .name = discard_const_p(char, "lanmask"),
   15161             :                 .get = py_srvsvc_NetSrvInfo403_get_lanmask,
   15162             :                 .set = py_srvsvc_NetSrvInfo403_set_lanmask,
   15163             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15164             :         },
   15165             :         {
   15166             :                 .name = discard_const_p(char, "guestaccount"),
   15167             :                 .get = py_srvsvc_NetSrvInfo403_get_guestaccount,
   15168             :                 .set = py_srvsvc_NetSrvInfo403_set_guestaccount,
   15169             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   15170             :         },
   15171             :         {
   15172             :                 .name = discard_const_p(char, "chdevs"),
   15173             :                 .get = py_srvsvc_NetSrvInfo403_get_chdevs,
   15174             :                 .set = py_srvsvc_NetSrvInfo403_set_chdevs,
   15175             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15176             :         },
   15177             :         {
   15178             :                 .name = discard_const_p(char, "chdevqs"),
   15179             :                 .get = py_srvsvc_NetSrvInfo403_get_chdevqs,
   15180             :                 .set = py_srvsvc_NetSrvInfo403_set_chdevqs,
   15181             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15182             :         },
   15183             :         {
   15184             :                 .name = discard_const_p(char, "chdevjobs"),
   15185             :                 .get = py_srvsvc_NetSrvInfo403_get_chdevjobs,
   15186             :                 .set = py_srvsvc_NetSrvInfo403_set_chdevjobs,
   15187             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15188             :         },
   15189             :         {
   15190             :                 .name = discard_const_p(char, "connections"),
   15191             :                 .get = py_srvsvc_NetSrvInfo403_get_connections,
   15192             :                 .set = py_srvsvc_NetSrvInfo403_set_connections,
   15193             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15194             :         },
   15195             :         {
   15196             :                 .name = discard_const_p(char, "shares"),
   15197             :                 .get = py_srvsvc_NetSrvInfo403_get_shares,
   15198             :                 .set = py_srvsvc_NetSrvInfo403_set_shares,
   15199             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15200             :         },
   15201             :         {
   15202             :                 .name = discard_const_p(char, "openfiles"),
   15203             :                 .get = py_srvsvc_NetSrvInfo403_get_openfiles,
   15204             :                 .set = py_srvsvc_NetSrvInfo403_set_openfiles,
   15205             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15206             :         },
   15207             :         {
   15208             :                 .name = discard_const_p(char, "sessopen"),
   15209             :                 .get = py_srvsvc_NetSrvInfo403_get_sessopen,
   15210             :                 .set = py_srvsvc_NetSrvInfo403_set_sessopen,
   15211             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15212             :         },
   15213             :         {
   15214             :                 .name = discard_const_p(char, "sesssvc"),
   15215             :                 .get = py_srvsvc_NetSrvInfo403_get_sesssvc,
   15216             :                 .set = py_srvsvc_NetSrvInfo403_set_sesssvc,
   15217             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15218             :         },
   15219             :         {
   15220             :                 .name = discard_const_p(char, "sessreqs"),
   15221             :                 .get = py_srvsvc_NetSrvInfo403_get_sessreqs,
   15222             :                 .set = py_srvsvc_NetSrvInfo403_set_sessreqs,
   15223             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15224             :         },
   15225             :         {
   15226             :                 .name = discard_const_p(char, "opensearch"),
   15227             :                 .get = py_srvsvc_NetSrvInfo403_get_opensearch,
   15228             :                 .set = py_srvsvc_NetSrvInfo403_set_opensearch,
   15229             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15230             :         },
   15231             :         {
   15232             :                 .name = discard_const_p(char, "activelocks"),
   15233             :                 .get = py_srvsvc_NetSrvInfo403_get_activelocks,
   15234             :                 .set = py_srvsvc_NetSrvInfo403_set_activelocks,
   15235             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15236             :         },
   15237             :         {
   15238             :                 .name = discard_const_p(char, "numreqbufs"),
   15239             :                 .get = py_srvsvc_NetSrvInfo403_get_numreqbufs,
   15240             :                 .set = py_srvsvc_NetSrvInfo403_set_numreqbufs,
   15241             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15242             :         },
   15243             :         {
   15244             :                 .name = discard_const_p(char, "sizereqbufs"),
   15245             :                 .get = py_srvsvc_NetSrvInfo403_get_sizereqbufs,
   15246             :                 .set = py_srvsvc_NetSrvInfo403_set_sizereqbufs,
   15247             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15248             :         },
   15249             :         {
   15250             :                 .name = discard_const_p(char, "numbigbufs"),
   15251             :                 .get = py_srvsvc_NetSrvInfo403_get_numbigbufs,
   15252             :                 .set = py_srvsvc_NetSrvInfo403_set_numbigbufs,
   15253             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15254             :         },
   15255             :         {
   15256             :                 .name = discard_const_p(char, "numfiletasks"),
   15257             :                 .get = py_srvsvc_NetSrvInfo403_get_numfiletasks,
   15258             :                 .set = py_srvsvc_NetSrvInfo403_set_numfiletasks,
   15259             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15260             :         },
   15261             :         {
   15262             :                 .name = discard_const_p(char, "alertsched"),
   15263             :                 .get = py_srvsvc_NetSrvInfo403_get_alertsched,
   15264             :                 .set = py_srvsvc_NetSrvInfo403_set_alertsched,
   15265             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15266             :         },
   15267             :         {
   15268             :                 .name = discard_const_p(char, "erroralert"),
   15269             :                 .get = py_srvsvc_NetSrvInfo403_get_erroralert,
   15270             :                 .set = py_srvsvc_NetSrvInfo403_set_erroralert,
   15271             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15272             :         },
   15273             :         {
   15274             :                 .name = discard_const_p(char, "logonalert"),
   15275             :                 .get = py_srvsvc_NetSrvInfo403_get_logonalert,
   15276             :                 .set = py_srvsvc_NetSrvInfo403_set_logonalert,
   15277             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15278             :         },
   15279             :         {
   15280             :                 .name = discard_const_p(char, "accessalert"),
   15281             :                 .get = py_srvsvc_NetSrvInfo403_get_accessalert,
   15282             :                 .set = py_srvsvc_NetSrvInfo403_set_accessalert,
   15283             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15284             :         },
   15285             :         {
   15286             :                 .name = discard_const_p(char, "diskalert"),
   15287             :                 .get = py_srvsvc_NetSrvInfo403_get_diskalert,
   15288             :                 .set = py_srvsvc_NetSrvInfo403_set_diskalert,
   15289             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15290             :         },
   15291             :         {
   15292             :                 .name = discard_const_p(char, "netioalert"),
   15293             :                 .get = py_srvsvc_NetSrvInfo403_get_netioalert,
   15294             :                 .set = py_srvsvc_NetSrvInfo403_set_netioalert,
   15295             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15296             :         },
   15297             :         {
   15298             :                 .name = discard_const_p(char, "maxaudits"),
   15299             :                 .get = py_srvsvc_NetSrvInfo403_get_maxaudits,
   15300             :                 .set = py_srvsvc_NetSrvInfo403_set_maxaudits,
   15301             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15302             :         },
   15303             :         {
   15304             :                 .name = discard_const_p(char, "srvheuristics"),
   15305             :                 .get = py_srvsvc_NetSrvInfo403_get_srvheuristics,
   15306             :                 .set = py_srvsvc_NetSrvInfo403_set_srvheuristics,
   15307             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   15308             :         },
   15309             :         {
   15310             :                 .name = discard_const_p(char, "auditedevents"),
   15311             :                 .get = py_srvsvc_NetSrvInfo403_get_auditedevents,
   15312             :                 .set = py_srvsvc_NetSrvInfo403_set_auditedevents,
   15313             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15314             :         },
   15315             :         {
   15316             :                 .name = discard_const_p(char, "auditprofile"),
   15317             :                 .get = py_srvsvc_NetSrvInfo403_get_auditprofile,
   15318             :                 .set = py_srvsvc_NetSrvInfo403_set_auditprofile,
   15319             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15320             :         },
   15321             :         {
   15322             :                 .name = discard_const_p(char, "autopath"),
   15323             :                 .get = py_srvsvc_NetSrvInfo403_get_autopath,
   15324             :                 .set = py_srvsvc_NetSrvInfo403_set_autopath,
   15325             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   15326             :         },
   15327             :         { .name = NULL }
   15328             : };
   15329             : 
   15330           0 : static PyObject *py_srvsvc_NetSrvInfo403_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   15331             : {
   15332           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo403, type);
   15333             : }
   15334             : 
   15335             : 
   15336             : static PyTypeObject srvsvc_NetSrvInfo403_Type = {
   15337             :         PyVarObject_HEAD_INIT(NULL, 0)
   15338             :         .tp_name = "srvsvc.NetSrvInfo403",
   15339             :         .tp_getset = py_srvsvc_NetSrvInfo403_getsetters,
   15340             :         .tp_methods = NULL,
   15341             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   15342             :         .tp_new = py_srvsvc_NetSrvInfo403_new,
   15343             : };
   15344             : 
   15345             : 
   15346           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_sessopen(PyObject *obj, void *closure)
   15347             : {
   15348           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
   15349             :         PyObject *py_sessopen;
   15350           0 :         py_sessopen = PyLong_FromUnsignedLongLong((uint32_t)object->sessopen);
   15351           0 :         return py_sessopen;
   15352             : }
   15353             : 
   15354           0 : static int py_srvsvc_NetSrvInfo502_set_sessopen(PyObject *py_obj, PyObject *value, void *closure)
   15355             : {
   15356           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
   15357           0 :         if (value == NULL) {
   15358           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessopen");
   15359           0 :                 return -1;
   15360             :         }
   15361             :         {
   15362           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessopen));
   15363           0 :                 if (PyLong_Check(value)) {
   15364             :                         unsigned long long test_var;
   15365           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15366           0 :                         if (PyErr_Occurred() != NULL) {
   15367           0 :                                 return -1;
   15368             :                         }
   15369           0 :                         if (test_var > uint_max) {
   15370           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15371             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15372           0 :                                 return -1;
   15373             :                         }
   15374           0 :                         object->sessopen = test_var;
   15375             :                 } else {
   15376           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15377             :                           PyLong_Type.tp_name);
   15378           0 :                         return -1;
   15379             :                 }
   15380             :         }
   15381           0 :         return 0;
   15382             : }
   15383             : 
   15384           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_sesssvc(PyObject *obj, void *closure)
   15385             : {
   15386           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
   15387             :         PyObject *py_sesssvc;
   15388           0 :         py_sesssvc = PyLong_FromUnsignedLongLong((uint32_t)object->sesssvc);
   15389           0 :         return py_sesssvc;
   15390             : }
   15391             : 
   15392           0 : static int py_srvsvc_NetSrvInfo502_set_sesssvc(PyObject *py_obj, PyObject *value, void *closure)
   15393             : {
   15394           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
   15395           0 :         if (value == NULL) {
   15396           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sesssvc");
   15397           0 :                 return -1;
   15398             :         }
   15399             :         {
   15400           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sesssvc));
   15401           0 :                 if (PyLong_Check(value)) {
   15402             :                         unsigned long long test_var;
   15403           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15404           0 :                         if (PyErr_Occurred() != NULL) {
   15405           0 :                                 return -1;
   15406             :                         }
   15407           0 :                         if (test_var > uint_max) {
   15408           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15409             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15410           0 :                                 return -1;
   15411             :                         }
   15412           0 :                         object->sesssvc = test_var;
   15413             :                 } else {
   15414           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15415             :                           PyLong_Type.tp_name);
   15416           0 :                         return -1;
   15417             :                 }
   15418             :         }
   15419           0 :         return 0;
   15420             : }
   15421             : 
   15422           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_opensearch(PyObject *obj, void *closure)
   15423             : {
   15424           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
   15425             :         PyObject *py_opensearch;
   15426           0 :         py_opensearch = PyLong_FromUnsignedLongLong((uint32_t)object->opensearch);
   15427           0 :         return py_opensearch;
   15428             : }
   15429             : 
   15430           0 : static int py_srvsvc_NetSrvInfo502_set_opensearch(PyObject *py_obj, PyObject *value, void *closure)
   15431             : {
   15432           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
   15433           0 :         if (value == NULL) {
   15434           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->opensearch");
   15435           0 :                 return -1;
   15436             :         }
   15437             :         {
   15438           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->opensearch));
   15439           0 :                 if (PyLong_Check(value)) {
   15440             :                         unsigned long long test_var;
   15441           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15442           0 :                         if (PyErr_Occurred() != NULL) {
   15443           0 :                                 return -1;
   15444             :                         }
   15445           0 :                         if (test_var > uint_max) {
   15446           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15447             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15448           0 :                                 return -1;
   15449             :                         }
   15450           0 :                         object->opensearch = test_var;
   15451             :                 } else {
   15452           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15453             :                           PyLong_Type.tp_name);
   15454           0 :                         return -1;
   15455             :                 }
   15456             :         }
   15457           0 :         return 0;
   15458             : }
   15459             : 
   15460           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_sizereqbufs(PyObject *obj, void *closure)
   15461             : {
   15462           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
   15463             :         PyObject *py_sizereqbufs;
   15464           0 :         py_sizereqbufs = PyLong_FromUnsignedLongLong((uint32_t)object->sizereqbufs);
   15465           0 :         return py_sizereqbufs;
   15466             : }
   15467             : 
   15468           0 : static int py_srvsvc_NetSrvInfo502_set_sizereqbufs(PyObject *py_obj, PyObject *value, void *closure)
   15469             : {
   15470           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
   15471           0 :         if (value == NULL) {
   15472           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sizereqbufs");
   15473           0 :                 return -1;
   15474             :         }
   15475             :         {
   15476           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sizereqbufs));
   15477           0 :                 if (PyLong_Check(value)) {
   15478             :                         unsigned long long test_var;
   15479           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15480           0 :                         if (PyErr_Occurred() != NULL) {
   15481           0 :                                 return -1;
   15482             :                         }
   15483           0 :                         if (test_var > uint_max) {
   15484           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15485             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15486           0 :                                 return -1;
   15487             :                         }
   15488           0 :                         object->sizereqbufs = test_var;
   15489             :                 } else {
   15490           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15491             :                           PyLong_Type.tp_name);
   15492           0 :                         return -1;
   15493             :                 }
   15494             :         }
   15495           0 :         return 0;
   15496             : }
   15497             : 
   15498           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_initworkitems(PyObject *obj, void *closure)
   15499             : {
   15500           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
   15501             :         PyObject *py_initworkitems;
   15502           0 :         py_initworkitems = PyLong_FromUnsignedLongLong((uint32_t)object->initworkitems);
   15503           0 :         return py_initworkitems;
   15504             : }
   15505             : 
   15506           0 : static int py_srvsvc_NetSrvInfo502_set_initworkitems(PyObject *py_obj, PyObject *value, void *closure)
   15507             : {
   15508           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
   15509           0 :         if (value == NULL) {
   15510           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->initworkitems");
   15511           0 :                 return -1;
   15512             :         }
   15513             :         {
   15514           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initworkitems));
   15515           0 :                 if (PyLong_Check(value)) {
   15516             :                         unsigned long long test_var;
   15517           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15518           0 :                         if (PyErr_Occurred() != NULL) {
   15519           0 :                                 return -1;
   15520             :                         }
   15521           0 :                         if (test_var > uint_max) {
   15522           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15523             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15524           0 :                                 return -1;
   15525             :                         }
   15526           0 :                         object->initworkitems = test_var;
   15527             :                 } else {
   15528           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15529             :                           PyLong_Type.tp_name);
   15530           0 :                         return -1;
   15531             :                 }
   15532             :         }
   15533           0 :         return 0;
   15534             : }
   15535             : 
   15536           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_maxworkitems(PyObject *obj, void *closure)
   15537             : {
   15538           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
   15539             :         PyObject *py_maxworkitems;
   15540           0 :         py_maxworkitems = PyLong_FromUnsignedLongLong((uint32_t)object->maxworkitems);
   15541           0 :         return py_maxworkitems;
   15542             : }
   15543             : 
   15544           0 : static int py_srvsvc_NetSrvInfo502_set_maxworkitems(PyObject *py_obj, PyObject *value, void *closure)
   15545             : {
   15546           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
   15547           0 :         if (value == NULL) {
   15548           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxworkitems");
   15549           0 :                 return -1;
   15550             :         }
   15551             :         {
   15552           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxworkitems));
   15553           0 :                 if (PyLong_Check(value)) {
   15554             :                         unsigned long long test_var;
   15555           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15556           0 :                         if (PyErr_Occurred() != NULL) {
   15557           0 :                                 return -1;
   15558             :                         }
   15559           0 :                         if (test_var > uint_max) {
   15560           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15561             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15562           0 :                                 return -1;
   15563             :                         }
   15564           0 :                         object->maxworkitems = test_var;
   15565             :                 } else {
   15566           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15567             :                           PyLong_Type.tp_name);
   15568           0 :                         return -1;
   15569             :                 }
   15570             :         }
   15571           0 :         return 0;
   15572             : }
   15573             : 
   15574           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_rawworkitems(PyObject *obj, void *closure)
   15575             : {
   15576           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
   15577             :         PyObject *py_rawworkitems;
   15578           0 :         py_rawworkitems = PyLong_FromUnsignedLongLong((uint32_t)object->rawworkitems);
   15579           0 :         return py_rawworkitems;
   15580             : }
   15581             : 
   15582           0 : static int py_srvsvc_NetSrvInfo502_set_rawworkitems(PyObject *py_obj, PyObject *value, void *closure)
   15583             : {
   15584           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
   15585           0 :         if (value == NULL) {
   15586           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rawworkitems");
   15587           0 :                 return -1;
   15588             :         }
   15589             :         {
   15590           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rawworkitems));
   15591           0 :                 if (PyLong_Check(value)) {
   15592             :                         unsigned long long test_var;
   15593           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15594           0 :                         if (PyErr_Occurred() != NULL) {
   15595           0 :                                 return -1;
   15596             :                         }
   15597           0 :                         if (test_var > uint_max) {
   15598           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15599             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15600           0 :                                 return -1;
   15601             :                         }
   15602           0 :                         object->rawworkitems = test_var;
   15603             :                 } else {
   15604           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15605             :                           PyLong_Type.tp_name);
   15606           0 :                         return -1;
   15607             :                 }
   15608             :         }
   15609           0 :         return 0;
   15610             : }
   15611             : 
   15612           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_irpstacksize(PyObject *obj, void *closure)
   15613             : {
   15614           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
   15615             :         PyObject *py_irpstacksize;
   15616           0 :         py_irpstacksize = PyLong_FromUnsignedLongLong((uint32_t)object->irpstacksize);
   15617           0 :         return py_irpstacksize;
   15618             : }
   15619             : 
   15620           0 : static int py_srvsvc_NetSrvInfo502_set_irpstacksize(PyObject *py_obj, PyObject *value, void *closure)
   15621             : {
   15622           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
   15623           0 :         if (value == NULL) {
   15624           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->irpstacksize");
   15625           0 :                 return -1;
   15626             :         }
   15627             :         {
   15628           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->irpstacksize));
   15629           0 :                 if (PyLong_Check(value)) {
   15630             :                         unsigned long long test_var;
   15631           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15632           0 :                         if (PyErr_Occurred() != NULL) {
   15633           0 :                                 return -1;
   15634             :                         }
   15635           0 :                         if (test_var > uint_max) {
   15636           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15637             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15638           0 :                                 return -1;
   15639             :                         }
   15640           0 :                         object->irpstacksize = test_var;
   15641             :                 } else {
   15642           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15643             :                           PyLong_Type.tp_name);
   15644           0 :                         return -1;
   15645             :                 }
   15646             :         }
   15647           0 :         return 0;
   15648             : }
   15649             : 
   15650           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_maxrawbuflen(PyObject *obj, void *closure)
   15651             : {
   15652           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
   15653             :         PyObject *py_maxrawbuflen;
   15654           0 :         py_maxrawbuflen = PyLong_FromUnsignedLongLong((uint32_t)object->maxrawbuflen);
   15655           0 :         return py_maxrawbuflen;
   15656             : }
   15657             : 
   15658           0 : static int py_srvsvc_NetSrvInfo502_set_maxrawbuflen(PyObject *py_obj, PyObject *value, void *closure)
   15659             : {
   15660           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
   15661           0 :         if (value == NULL) {
   15662           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxrawbuflen");
   15663           0 :                 return -1;
   15664             :         }
   15665             :         {
   15666           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxrawbuflen));
   15667           0 :                 if (PyLong_Check(value)) {
   15668             :                         unsigned long long test_var;
   15669           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15670           0 :                         if (PyErr_Occurred() != NULL) {
   15671           0 :                                 return -1;
   15672             :                         }
   15673           0 :                         if (test_var > uint_max) {
   15674           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15675             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15676           0 :                                 return -1;
   15677             :                         }
   15678           0 :                         object->maxrawbuflen = test_var;
   15679             :                 } else {
   15680           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15681             :                           PyLong_Type.tp_name);
   15682           0 :                         return -1;
   15683             :                 }
   15684             :         }
   15685           0 :         return 0;
   15686             : }
   15687             : 
   15688           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_sessusers(PyObject *obj, void *closure)
   15689             : {
   15690           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
   15691             :         PyObject *py_sessusers;
   15692           0 :         py_sessusers = PyLong_FromUnsignedLongLong((uint32_t)object->sessusers);
   15693           0 :         return py_sessusers;
   15694             : }
   15695             : 
   15696           0 : static int py_srvsvc_NetSrvInfo502_set_sessusers(PyObject *py_obj, PyObject *value, void *closure)
   15697             : {
   15698           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
   15699           0 :         if (value == NULL) {
   15700           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessusers");
   15701           0 :                 return -1;
   15702             :         }
   15703             :         {
   15704           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessusers));
   15705           0 :                 if (PyLong_Check(value)) {
   15706             :                         unsigned long long test_var;
   15707           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15708           0 :                         if (PyErr_Occurred() != NULL) {
   15709           0 :                                 return -1;
   15710             :                         }
   15711           0 :                         if (test_var > uint_max) {
   15712           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15713             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15714           0 :                                 return -1;
   15715             :                         }
   15716           0 :                         object->sessusers = test_var;
   15717             :                 } else {
   15718           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15719             :                           PyLong_Type.tp_name);
   15720           0 :                         return -1;
   15721             :                 }
   15722             :         }
   15723           0 :         return 0;
   15724             : }
   15725             : 
   15726           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_sessconns(PyObject *obj, void *closure)
   15727             : {
   15728           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
   15729             :         PyObject *py_sessconns;
   15730           0 :         py_sessconns = PyLong_FromUnsignedLongLong((uint32_t)object->sessconns);
   15731           0 :         return py_sessconns;
   15732             : }
   15733             : 
   15734           0 : static int py_srvsvc_NetSrvInfo502_set_sessconns(PyObject *py_obj, PyObject *value, void *closure)
   15735             : {
   15736           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
   15737           0 :         if (value == NULL) {
   15738           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessconns");
   15739           0 :                 return -1;
   15740             :         }
   15741             :         {
   15742           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessconns));
   15743           0 :                 if (PyLong_Check(value)) {
   15744             :                         unsigned long long test_var;
   15745           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15746           0 :                         if (PyErr_Occurred() != NULL) {
   15747           0 :                                 return -1;
   15748             :                         }
   15749           0 :                         if (test_var > uint_max) {
   15750           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15751             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15752           0 :                                 return -1;
   15753             :                         }
   15754           0 :                         object->sessconns = test_var;
   15755             :                 } else {
   15756           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15757             :                           PyLong_Type.tp_name);
   15758           0 :                         return -1;
   15759             :                 }
   15760             :         }
   15761           0 :         return 0;
   15762             : }
   15763             : 
   15764           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_maxpagedmemoryusage(PyObject *obj, void *closure)
   15765             : {
   15766           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
   15767             :         PyObject *py_maxpagedmemoryusage;
   15768           0 :         py_maxpagedmemoryusage = PyLong_FromUnsignedLongLong((uint32_t)object->maxpagedmemoryusage);
   15769           0 :         return py_maxpagedmemoryusage;
   15770             : }
   15771             : 
   15772           0 : static int py_srvsvc_NetSrvInfo502_set_maxpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
   15773             : {
   15774           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
   15775           0 :         if (value == NULL) {
   15776           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxpagedmemoryusage");
   15777           0 :                 return -1;
   15778             :         }
   15779             :         {
   15780           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxpagedmemoryusage));
   15781           0 :                 if (PyLong_Check(value)) {
   15782             :                         unsigned long long test_var;
   15783           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15784           0 :                         if (PyErr_Occurred() != NULL) {
   15785           0 :                                 return -1;
   15786             :                         }
   15787           0 :                         if (test_var > uint_max) {
   15788           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15789             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15790           0 :                                 return -1;
   15791             :                         }
   15792           0 :                         object->maxpagedmemoryusage = test_var;
   15793             :                 } else {
   15794           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15795             :                           PyLong_Type.tp_name);
   15796           0 :                         return -1;
   15797             :                 }
   15798             :         }
   15799           0 :         return 0;
   15800             : }
   15801             : 
   15802           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_maxnonpagedmemoryusage(PyObject *obj, void *closure)
   15803             : {
   15804           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
   15805             :         PyObject *py_maxnonpagedmemoryusage;
   15806           0 :         py_maxnonpagedmemoryusage = PyLong_FromUnsignedLongLong((uint32_t)object->maxnonpagedmemoryusage);
   15807           0 :         return py_maxnonpagedmemoryusage;
   15808             : }
   15809             : 
   15810           0 : static int py_srvsvc_NetSrvInfo502_set_maxnonpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
   15811             : {
   15812           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
   15813           0 :         if (value == NULL) {
   15814           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxnonpagedmemoryusage");
   15815           0 :                 return -1;
   15816             :         }
   15817             :         {
   15818           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxnonpagedmemoryusage));
   15819           0 :                 if (PyLong_Check(value)) {
   15820             :                         unsigned long long test_var;
   15821           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15822           0 :                         if (PyErr_Occurred() != NULL) {
   15823           0 :                                 return -1;
   15824             :                         }
   15825           0 :                         if (test_var > uint_max) {
   15826           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15827             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15828           0 :                                 return -1;
   15829             :                         }
   15830           0 :                         object->maxnonpagedmemoryusage = test_var;
   15831             :                 } else {
   15832           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15833             :                           PyLong_Type.tp_name);
   15834           0 :                         return -1;
   15835             :                 }
   15836             :         }
   15837           0 :         return 0;
   15838             : }
   15839             : 
   15840           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_enablesoftcompat(PyObject *obj, void *closure)
   15841             : {
   15842           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
   15843             :         PyObject *py_enablesoftcompat;
   15844           0 :         py_enablesoftcompat = PyLong_FromUnsignedLongLong((uint32_t)object->enablesoftcompat);
   15845           0 :         return py_enablesoftcompat;
   15846             : }
   15847             : 
   15848           0 : static int py_srvsvc_NetSrvInfo502_set_enablesoftcompat(PyObject *py_obj, PyObject *value, void *closure)
   15849             : {
   15850           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
   15851           0 :         if (value == NULL) {
   15852           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enablesoftcompat");
   15853           0 :                 return -1;
   15854             :         }
   15855             :         {
   15856           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesoftcompat));
   15857           0 :                 if (PyLong_Check(value)) {
   15858             :                         unsigned long long test_var;
   15859           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15860           0 :                         if (PyErr_Occurred() != NULL) {
   15861           0 :                                 return -1;
   15862             :                         }
   15863           0 :                         if (test_var > uint_max) {
   15864           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15865             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15866           0 :                                 return -1;
   15867             :                         }
   15868           0 :                         object->enablesoftcompat = test_var;
   15869             :                 } else {
   15870           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15871             :                           PyLong_Type.tp_name);
   15872           0 :                         return -1;
   15873             :                 }
   15874             :         }
   15875           0 :         return 0;
   15876             : }
   15877             : 
   15878           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_enableforcedlogoff(PyObject *obj, void *closure)
   15879             : {
   15880           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
   15881             :         PyObject *py_enableforcedlogoff;
   15882           0 :         py_enableforcedlogoff = PyLong_FromUnsignedLongLong((uint32_t)object->enableforcedlogoff);
   15883           0 :         return py_enableforcedlogoff;
   15884             : }
   15885             : 
   15886           0 : static int py_srvsvc_NetSrvInfo502_set_enableforcedlogoff(PyObject *py_obj, PyObject *value, void *closure)
   15887             : {
   15888           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
   15889           0 :         if (value == NULL) {
   15890           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enableforcedlogoff");
   15891           0 :                 return -1;
   15892             :         }
   15893             :         {
   15894           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableforcedlogoff));
   15895           0 :                 if (PyLong_Check(value)) {
   15896             :                         unsigned long long test_var;
   15897           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15898           0 :                         if (PyErr_Occurred() != NULL) {
   15899           0 :                                 return -1;
   15900             :                         }
   15901           0 :                         if (test_var > uint_max) {
   15902           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15903             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15904           0 :                                 return -1;
   15905             :                         }
   15906           0 :                         object->enableforcedlogoff = test_var;
   15907             :                 } else {
   15908           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15909             :                           PyLong_Type.tp_name);
   15910           0 :                         return -1;
   15911             :                 }
   15912             :         }
   15913           0 :         return 0;
   15914             : }
   15915             : 
   15916           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_timesource(PyObject *obj, void *closure)
   15917             : {
   15918           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
   15919             :         PyObject *py_timesource;
   15920           0 :         py_timesource = PyLong_FromUnsignedLongLong((uint32_t)object->timesource);
   15921           0 :         return py_timesource;
   15922             : }
   15923             : 
   15924           0 : static int py_srvsvc_NetSrvInfo502_set_timesource(PyObject *py_obj, PyObject *value, void *closure)
   15925             : {
   15926           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
   15927           0 :         if (value == NULL) {
   15928           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->timesource");
   15929           0 :                 return -1;
   15930             :         }
   15931             :         {
   15932           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timesource));
   15933           0 :                 if (PyLong_Check(value)) {
   15934             :                         unsigned long long test_var;
   15935           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15936           0 :                         if (PyErr_Occurred() != NULL) {
   15937           0 :                                 return -1;
   15938             :                         }
   15939           0 :                         if (test_var > uint_max) {
   15940           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15941             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15942           0 :                                 return -1;
   15943             :                         }
   15944           0 :                         object->timesource = test_var;
   15945             :                 } else {
   15946           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15947             :                           PyLong_Type.tp_name);
   15948           0 :                         return -1;
   15949             :                 }
   15950             :         }
   15951           0 :         return 0;
   15952             : }
   15953             : 
   15954           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_acceptdownlevelapis(PyObject *obj, void *closure)
   15955             : {
   15956           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
   15957             :         PyObject *py_acceptdownlevelapis;
   15958           0 :         py_acceptdownlevelapis = PyLong_FromUnsignedLongLong((uint32_t)object->acceptdownlevelapis);
   15959           0 :         return py_acceptdownlevelapis;
   15960             : }
   15961             : 
   15962           0 : static int py_srvsvc_NetSrvInfo502_set_acceptdownlevelapis(PyObject *py_obj, PyObject *value, void *closure)
   15963             : {
   15964           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
   15965           0 :         if (value == NULL) {
   15966           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->acceptdownlevelapis");
   15967           0 :                 return -1;
   15968             :         }
   15969             :         {
   15970           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->acceptdownlevelapis));
   15971           0 :                 if (PyLong_Check(value)) {
   15972             :                         unsigned long long test_var;
   15973           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15974           0 :                         if (PyErr_Occurred() != NULL) {
   15975           0 :                                 return -1;
   15976             :                         }
   15977           0 :                         if (test_var > uint_max) {
   15978           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15979             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15980           0 :                                 return -1;
   15981             :                         }
   15982           0 :                         object->acceptdownlevelapis = test_var;
   15983             :                 } else {
   15984           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15985             :                           PyLong_Type.tp_name);
   15986           0 :                         return -1;
   15987             :                 }
   15988             :         }
   15989           0 :         return 0;
   15990             : }
   15991             : 
   15992           0 : static PyObject *py_srvsvc_NetSrvInfo502_get_lmannounce(PyObject *obj, void *closure)
   15993             : {
   15994           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(obj);
   15995             :         PyObject *py_lmannounce;
   15996           0 :         py_lmannounce = PyLong_FromUnsignedLongLong((uint32_t)object->lmannounce);
   15997           0 :         return py_lmannounce;
   15998             : }
   15999             : 
   16000           0 : static int py_srvsvc_NetSrvInfo502_set_lmannounce(PyObject *py_obj, PyObject *value, void *closure)
   16001             : {
   16002           0 :         struct srvsvc_NetSrvInfo502 *object = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(py_obj);
   16003           0 :         if (value == NULL) {
   16004           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lmannounce");
   16005           0 :                 return -1;
   16006             :         }
   16007             :         {
   16008           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lmannounce));
   16009           0 :                 if (PyLong_Check(value)) {
   16010             :                         unsigned long long test_var;
   16011           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16012           0 :                         if (PyErr_Occurred() != NULL) {
   16013           0 :                                 return -1;
   16014             :                         }
   16015           0 :                         if (test_var > uint_max) {
   16016           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16017             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16018           0 :                                 return -1;
   16019             :                         }
   16020           0 :                         object->lmannounce = test_var;
   16021             :                 } else {
   16022           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16023             :                           PyLong_Type.tp_name);
   16024           0 :                         return -1;
   16025             :                 }
   16026             :         }
   16027           0 :         return 0;
   16028             : }
   16029             : 
   16030             : static PyGetSetDef py_srvsvc_NetSrvInfo502_getsetters[] = {
   16031             :         {
   16032             :                 .name = discard_const_p(char, "sessopen"),
   16033             :                 .get = py_srvsvc_NetSrvInfo502_get_sessopen,
   16034             :                 .set = py_srvsvc_NetSrvInfo502_set_sessopen,
   16035             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16036             :         },
   16037             :         {
   16038             :                 .name = discard_const_p(char, "sesssvc"),
   16039             :                 .get = py_srvsvc_NetSrvInfo502_get_sesssvc,
   16040             :                 .set = py_srvsvc_NetSrvInfo502_set_sesssvc,
   16041             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16042             :         },
   16043             :         {
   16044             :                 .name = discard_const_p(char, "opensearch"),
   16045             :                 .get = py_srvsvc_NetSrvInfo502_get_opensearch,
   16046             :                 .set = py_srvsvc_NetSrvInfo502_set_opensearch,
   16047             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16048             :         },
   16049             :         {
   16050             :                 .name = discard_const_p(char, "sizereqbufs"),
   16051             :                 .get = py_srvsvc_NetSrvInfo502_get_sizereqbufs,
   16052             :                 .set = py_srvsvc_NetSrvInfo502_set_sizereqbufs,
   16053             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16054             :         },
   16055             :         {
   16056             :                 .name = discard_const_p(char, "initworkitems"),
   16057             :                 .get = py_srvsvc_NetSrvInfo502_get_initworkitems,
   16058             :                 .set = py_srvsvc_NetSrvInfo502_set_initworkitems,
   16059             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16060             :         },
   16061             :         {
   16062             :                 .name = discard_const_p(char, "maxworkitems"),
   16063             :                 .get = py_srvsvc_NetSrvInfo502_get_maxworkitems,
   16064             :                 .set = py_srvsvc_NetSrvInfo502_set_maxworkitems,
   16065             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16066             :         },
   16067             :         {
   16068             :                 .name = discard_const_p(char, "rawworkitems"),
   16069             :                 .get = py_srvsvc_NetSrvInfo502_get_rawworkitems,
   16070             :                 .set = py_srvsvc_NetSrvInfo502_set_rawworkitems,
   16071             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16072             :         },
   16073             :         {
   16074             :                 .name = discard_const_p(char, "irpstacksize"),
   16075             :                 .get = py_srvsvc_NetSrvInfo502_get_irpstacksize,
   16076             :                 .set = py_srvsvc_NetSrvInfo502_set_irpstacksize,
   16077             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16078             :         },
   16079             :         {
   16080             :                 .name = discard_const_p(char, "maxrawbuflen"),
   16081             :                 .get = py_srvsvc_NetSrvInfo502_get_maxrawbuflen,
   16082             :                 .set = py_srvsvc_NetSrvInfo502_set_maxrawbuflen,
   16083             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16084             :         },
   16085             :         {
   16086             :                 .name = discard_const_p(char, "sessusers"),
   16087             :                 .get = py_srvsvc_NetSrvInfo502_get_sessusers,
   16088             :                 .set = py_srvsvc_NetSrvInfo502_set_sessusers,
   16089             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16090             :         },
   16091             :         {
   16092             :                 .name = discard_const_p(char, "sessconns"),
   16093             :                 .get = py_srvsvc_NetSrvInfo502_get_sessconns,
   16094             :                 .set = py_srvsvc_NetSrvInfo502_set_sessconns,
   16095             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16096             :         },
   16097             :         {
   16098             :                 .name = discard_const_p(char, "maxpagedmemoryusage"),
   16099             :                 .get = py_srvsvc_NetSrvInfo502_get_maxpagedmemoryusage,
   16100             :                 .set = py_srvsvc_NetSrvInfo502_set_maxpagedmemoryusage,
   16101             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16102             :         },
   16103             :         {
   16104             :                 .name = discard_const_p(char, "maxnonpagedmemoryusage"),
   16105             :                 .get = py_srvsvc_NetSrvInfo502_get_maxnonpagedmemoryusage,
   16106             :                 .set = py_srvsvc_NetSrvInfo502_set_maxnonpagedmemoryusage,
   16107             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16108             :         },
   16109             :         {
   16110             :                 .name = discard_const_p(char, "enablesoftcompat"),
   16111             :                 .get = py_srvsvc_NetSrvInfo502_get_enablesoftcompat,
   16112             :                 .set = py_srvsvc_NetSrvInfo502_set_enablesoftcompat,
   16113             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16114             :         },
   16115             :         {
   16116             :                 .name = discard_const_p(char, "enableforcedlogoff"),
   16117             :                 .get = py_srvsvc_NetSrvInfo502_get_enableforcedlogoff,
   16118             :                 .set = py_srvsvc_NetSrvInfo502_set_enableforcedlogoff,
   16119             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16120             :         },
   16121             :         {
   16122             :                 .name = discard_const_p(char, "timesource"),
   16123             :                 .get = py_srvsvc_NetSrvInfo502_get_timesource,
   16124             :                 .set = py_srvsvc_NetSrvInfo502_set_timesource,
   16125             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16126             :         },
   16127             :         {
   16128             :                 .name = discard_const_p(char, "acceptdownlevelapis"),
   16129             :                 .get = py_srvsvc_NetSrvInfo502_get_acceptdownlevelapis,
   16130             :                 .set = py_srvsvc_NetSrvInfo502_set_acceptdownlevelapis,
   16131             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16132             :         },
   16133             :         {
   16134             :                 .name = discard_const_p(char, "lmannounce"),
   16135             :                 .get = py_srvsvc_NetSrvInfo502_get_lmannounce,
   16136             :                 .set = py_srvsvc_NetSrvInfo502_set_lmannounce,
   16137             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16138             :         },
   16139             :         { .name = NULL }
   16140             : };
   16141             : 
   16142           0 : static PyObject *py_srvsvc_NetSrvInfo502_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16143             : {
   16144           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo502, type);
   16145             : }
   16146             : 
   16147             : 
   16148             : static PyTypeObject srvsvc_NetSrvInfo502_Type = {
   16149             :         PyVarObject_HEAD_INIT(NULL, 0)
   16150             :         .tp_name = "srvsvc.NetSrvInfo502",
   16151             :         .tp_getset = py_srvsvc_NetSrvInfo502_getsetters,
   16152             :         .tp_methods = NULL,
   16153             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16154             :         .tp_new = py_srvsvc_NetSrvInfo502_new,
   16155             : };
   16156             : 
   16157             : 
   16158           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_sessopen(PyObject *obj, void *closure)
   16159             : {
   16160           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   16161             :         PyObject *py_sessopen;
   16162           0 :         py_sessopen = PyLong_FromUnsignedLongLong((uint32_t)object->sessopen);
   16163           0 :         return py_sessopen;
   16164             : }
   16165             : 
   16166           0 : static int py_srvsvc_NetSrvInfo503_set_sessopen(PyObject *py_obj, PyObject *value, void *closure)
   16167             : {
   16168           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   16169           0 :         if (value == NULL) {
   16170           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessopen");
   16171           0 :                 return -1;
   16172             :         }
   16173             :         {
   16174           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessopen));
   16175           0 :                 if (PyLong_Check(value)) {
   16176             :                         unsigned long long test_var;
   16177           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16178           0 :                         if (PyErr_Occurred() != NULL) {
   16179           0 :                                 return -1;
   16180             :                         }
   16181           0 :                         if (test_var > uint_max) {
   16182           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16183             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16184           0 :                                 return -1;
   16185             :                         }
   16186           0 :                         object->sessopen = test_var;
   16187             :                 } else {
   16188           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16189             :                           PyLong_Type.tp_name);
   16190           0 :                         return -1;
   16191             :                 }
   16192             :         }
   16193           0 :         return 0;
   16194             : }
   16195             : 
   16196           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_sesssvc(PyObject *obj, void *closure)
   16197             : {
   16198           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   16199             :         PyObject *py_sesssvc;
   16200           0 :         py_sesssvc = PyLong_FromUnsignedLongLong((uint32_t)object->sesssvc);
   16201           0 :         return py_sesssvc;
   16202             : }
   16203             : 
   16204           0 : static int py_srvsvc_NetSrvInfo503_set_sesssvc(PyObject *py_obj, PyObject *value, void *closure)
   16205             : {
   16206           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   16207           0 :         if (value == NULL) {
   16208           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sesssvc");
   16209           0 :                 return -1;
   16210             :         }
   16211             :         {
   16212           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sesssvc));
   16213           0 :                 if (PyLong_Check(value)) {
   16214             :                         unsigned long long test_var;
   16215           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16216           0 :                         if (PyErr_Occurred() != NULL) {
   16217           0 :                                 return -1;
   16218             :                         }
   16219           0 :                         if (test_var > uint_max) {
   16220           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16221             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16222           0 :                                 return -1;
   16223             :                         }
   16224           0 :                         object->sesssvc = test_var;
   16225             :                 } else {
   16226           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16227             :                           PyLong_Type.tp_name);
   16228           0 :                         return -1;
   16229             :                 }
   16230             :         }
   16231           0 :         return 0;
   16232             : }
   16233             : 
   16234           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_opensearch(PyObject *obj, void *closure)
   16235             : {
   16236           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   16237             :         PyObject *py_opensearch;
   16238           0 :         py_opensearch = PyLong_FromUnsignedLongLong((uint32_t)object->opensearch);
   16239           0 :         return py_opensearch;
   16240             : }
   16241             : 
   16242           0 : static int py_srvsvc_NetSrvInfo503_set_opensearch(PyObject *py_obj, PyObject *value, void *closure)
   16243             : {
   16244           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   16245           0 :         if (value == NULL) {
   16246           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->opensearch");
   16247           0 :                 return -1;
   16248             :         }
   16249             :         {
   16250           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->opensearch));
   16251           0 :                 if (PyLong_Check(value)) {
   16252             :                         unsigned long long test_var;
   16253           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16254           0 :                         if (PyErr_Occurred() != NULL) {
   16255           0 :                                 return -1;
   16256             :                         }
   16257           0 :                         if (test_var > uint_max) {
   16258           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16259             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16260           0 :                                 return -1;
   16261             :                         }
   16262           0 :                         object->opensearch = test_var;
   16263             :                 } else {
   16264           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16265             :                           PyLong_Type.tp_name);
   16266           0 :                         return -1;
   16267             :                 }
   16268             :         }
   16269           0 :         return 0;
   16270             : }
   16271             : 
   16272           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_sizereqbufs(PyObject *obj, void *closure)
   16273             : {
   16274           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   16275             :         PyObject *py_sizereqbufs;
   16276           0 :         py_sizereqbufs = PyLong_FromUnsignedLongLong((uint32_t)object->sizereqbufs);
   16277           0 :         return py_sizereqbufs;
   16278             : }
   16279             : 
   16280           0 : static int py_srvsvc_NetSrvInfo503_set_sizereqbufs(PyObject *py_obj, PyObject *value, void *closure)
   16281             : {
   16282           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   16283           0 :         if (value == NULL) {
   16284           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sizereqbufs");
   16285           0 :                 return -1;
   16286             :         }
   16287             :         {
   16288           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sizereqbufs));
   16289           0 :                 if (PyLong_Check(value)) {
   16290             :                         unsigned long long test_var;
   16291           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16292           0 :                         if (PyErr_Occurred() != NULL) {
   16293           0 :                                 return -1;
   16294             :                         }
   16295           0 :                         if (test_var > uint_max) {
   16296           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16297             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16298           0 :                                 return -1;
   16299             :                         }
   16300           0 :                         object->sizereqbufs = test_var;
   16301             :                 } else {
   16302           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16303             :                           PyLong_Type.tp_name);
   16304           0 :                         return -1;
   16305             :                 }
   16306             :         }
   16307           0 :         return 0;
   16308             : }
   16309             : 
   16310           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_initworkitems(PyObject *obj, void *closure)
   16311             : {
   16312           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   16313             :         PyObject *py_initworkitems;
   16314           0 :         py_initworkitems = PyLong_FromUnsignedLongLong((uint32_t)object->initworkitems);
   16315           0 :         return py_initworkitems;
   16316             : }
   16317             : 
   16318           0 : static int py_srvsvc_NetSrvInfo503_set_initworkitems(PyObject *py_obj, PyObject *value, void *closure)
   16319             : {
   16320           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   16321           0 :         if (value == NULL) {
   16322           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->initworkitems");
   16323           0 :                 return -1;
   16324             :         }
   16325             :         {
   16326           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initworkitems));
   16327           0 :                 if (PyLong_Check(value)) {
   16328             :                         unsigned long long test_var;
   16329           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16330           0 :                         if (PyErr_Occurred() != NULL) {
   16331           0 :                                 return -1;
   16332             :                         }
   16333           0 :                         if (test_var > uint_max) {
   16334           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16335             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16336           0 :                                 return -1;
   16337             :                         }
   16338           0 :                         object->initworkitems = test_var;
   16339             :                 } else {
   16340           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16341             :                           PyLong_Type.tp_name);
   16342           0 :                         return -1;
   16343             :                 }
   16344             :         }
   16345           0 :         return 0;
   16346             : }
   16347             : 
   16348           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_maxworkitems(PyObject *obj, void *closure)
   16349             : {
   16350           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   16351             :         PyObject *py_maxworkitems;
   16352           0 :         py_maxworkitems = PyLong_FromUnsignedLongLong((uint32_t)object->maxworkitems);
   16353           0 :         return py_maxworkitems;
   16354             : }
   16355             : 
   16356           0 : static int py_srvsvc_NetSrvInfo503_set_maxworkitems(PyObject *py_obj, PyObject *value, void *closure)
   16357             : {
   16358           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   16359           0 :         if (value == NULL) {
   16360           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxworkitems");
   16361           0 :                 return -1;
   16362             :         }
   16363             :         {
   16364           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxworkitems));
   16365           0 :                 if (PyLong_Check(value)) {
   16366             :                         unsigned long long test_var;
   16367           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16368           0 :                         if (PyErr_Occurred() != NULL) {
   16369           0 :                                 return -1;
   16370             :                         }
   16371           0 :                         if (test_var > uint_max) {
   16372           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16373             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16374           0 :                                 return -1;
   16375             :                         }
   16376           0 :                         object->maxworkitems = test_var;
   16377             :                 } else {
   16378           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16379             :                           PyLong_Type.tp_name);
   16380           0 :                         return -1;
   16381             :                 }
   16382             :         }
   16383           0 :         return 0;
   16384             : }
   16385             : 
   16386           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_rawworkitems(PyObject *obj, void *closure)
   16387             : {
   16388           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   16389             :         PyObject *py_rawworkitems;
   16390           0 :         py_rawworkitems = PyLong_FromUnsignedLongLong((uint32_t)object->rawworkitems);
   16391           0 :         return py_rawworkitems;
   16392             : }
   16393             : 
   16394           0 : static int py_srvsvc_NetSrvInfo503_set_rawworkitems(PyObject *py_obj, PyObject *value, void *closure)
   16395             : {
   16396           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   16397           0 :         if (value == NULL) {
   16398           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rawworkitems");
   16399           0 :                 return -1;
   16400             :         }
   16401             :         {
   16402           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rawworkitems));
   16403           0 :                 if (PyLong_Check(value)) {
   16404             :                         unsigned long long test_var;
   16405           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16406           0 :                         if (PyErr_Occurred() != NULL) {
   16407           0 :                                 return -1;
   16408             :                         }
   16409           0 :                         if (test_var > uint_max) {
   16410           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16411             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16412           0 :                                 return -1;
   16413             :                         }
   16414           0 :                         object->rawworkitems = test_var;
   16415             :                 } else {
   16416           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16417             :                           PyLong_Type.tp_name);
   16418           0 :                         return -1;
   16419             :                 }
   16420             :         }
   16421           0 :         return 0;
   16422             : }
   16423             : 
   16424           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_irpstacksize(PyObject *obj, void *closure)
   16425             : {
   16426           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   16427             :         PyObject *py_irpstacksize;
   16428           0 :         py_irpstacksize = PyLong_FromUnsignedLongLong((uint32_t)object->irpstacksize);
   16429           0 :         return py_irpstacksize;
   16430             : }
   16431             : 
   16432           0 : static int py_srvsvc_NetSrvInfo503_set_irpstacksize(PyObject *py_obj, PyObject *value, void *closure)
   16433             : {
   16434           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   16435           0 :         if (value == NULL) {
   16436           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->irpstacksize");
   16437           0 :                 return -1;
   16438             :         }
   16439             :         {
   16440           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->irpstacksize));
   16441           0 :                 if (PyLong_Check(value)) {
   16442             :                         unsigned long long test_var;
   16443           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16444           0 :                         if (PyErr_Occurred() != NULL) {
   16445           0 :                                 return -1;
   16446             :                         }
   16447           0 :                         if (test_var > uint_max) {
   16448           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16449             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16450           0 :                                 return -1;
   16451             :                         }
   16452           0 :                         object->irpstacksize = test_var;
   16453             :                 } else {
   16454           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16455             :                           PyLong_Type.tp_name);
   16456           0 :                         return -1;
   16457             :                 }
   16458             :         }
   16459           0 :         return 0;
   16460             : }
   16461             : 
   16462           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_maxrawbuflen(PyObject *obj, void *closure)
   16463             : {
   16464           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   16465             :         PyObject *py_maxrawbuflen;
   16466           0 :         py_maxrawbuflen = PyLong_FromUnsignedLongLong((uint32_t)object->maxrawbuflen);
   16467           0 :         return py_maxrawbuflen;
   16468             : }
   16469             : 
   16470           0 : static int py_srvsvc_NetSrvInfo503_set_maxrawbuflen(PyObject *py_obj, PyObject *value, void *closure)
   16471             : {
   16472           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   16473           0 :         if (value == NULL) {
   16474           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxrawbuflen");
   16475           0 :                 return -1;
   16476             :         }
   16477             :         {
   16478           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxrawbuflen));
   16479           0 :                 if (PyLong_Check(value)) {
   16480             :                         unsigned long long test_var;
   16481           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16482           0 :                         if (PyErr_Occurred() != NULL) {
   16483           0 :                                 return -1;
   16484             :                         }
   16485           0 :                         if (test_var > uint_max) {
   16486           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16487             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16488           0 :                                 return -1;
   16489             :                         }
   16490           0 :                         object->maxrawbuflen = test_var;
   16491             :                 } else {
   16492           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16493             :                           PyLong_Type.tp_name);
   16494           0 :                         return -1;
   16495             :                 }
   16496             :         }
   16497           0 :         return 0;
   16498             : }
   16499             : 
   16500           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_sessusers(PyObject *obj, void *closure)
   16501             : {
   16502           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   16503             :         PyObject *py_sessusers;
   16504           0 :         py_sessusers = PyLong_FromUnsignedLongLong((uint32_t)object->sessusers);
   16505           0 :         return py_sessusers;
   16506             : }
   16507             : 
   16508           0 : static int py_srvsvc_NetSrvInfo503_set_sessusers(PyObject *py_obj, PyObject *value, void *closure)
   16509             : {
   16510           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   16511           0 :         if (value == NULL) {
   16512           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessusers");
   16513           0 :                 return -1;
   16514             :         }
   16515             :         {
   16516           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessusers));
   16517           0 :                 if (PyLong_Check(value)) {
   16518             :                         unsigned long long test_var;
   16519           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16520           0 :                         if (PyErr_Occurred() != NULL) {
   16521           0 :                                 return -1;
   16522             :                         }
   16523           0 :                         if (test_var > uint_max) {
   16524           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16525             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16526           0 :                                 return -1;
   16527             :                         }
   16528           0 :                         object->sessusers = test_var;
   16529             :                 } else {
   16530           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16531             :                           PyLong_Type.tp_name);
   16532           0 :                         return -1;
   16533             :                 }
   16534             :         }
   16535           0 :         return 0;
   16536             : }
   16537             : 
   16538           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_sessconns(PyObject *obj, void *closure)
   16539             : {
   16540           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   16541             :         PyObject *py_sessconns;
   16542           0 :         py_sessconns = PyLong_FromUnsignedLongLong((uint32_t)object->sessconns);
   16543           0 :         return py_sessconns;
   16544             : }
   16545             : 
   16546           0 : static int py_srvsvc_NetSrvInfo503_set_sessconns(PyObject *py_obj, PyObject *value, void *closure)
   16547             : {
   16548           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   16549           0 :         if (value == NULL) {
   16550           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessconns");
   16551           0 :                 return -1;
   16552             :         }
   16553             :         {
   16554           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessconns));
   16555           0 :                 if (PyLong_Check(value)) {
   16556             :                         unsigned long long test_var;
   16557           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16558           0 :                         if (PyErr_Occurred() != NULL) {
   16559           0 :                                 return -1;
   16560             :                         }
   16561           0 :                         if (test_var > uint_max) {
   16562           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16563             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16564           0 :                                 return -1;
   16565             :                         }
   16566           0 :                         object->sessconns = test_var;
   16567             :                 } else {
   16568           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16569             :                           PyLong_Type.tp_name);
   16570           0 :                         return -1;
   16571             :                 }
   16572             :         }
   16573           0 :         return 0;
   16574             : }
   16575             : 
   16576           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_maxpagedmemoryusage(PyObject *obj, void *closure)
   16577             : {
   16578           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   16579             :         PyObject *py_maxpagedmemoryusage;
   16580           0 :         py_maxpagedmemoryusage = PyLong_FromUnsignedLongLong((uint32_t)object->maxpagedmemoryusage);
   16581           0 :         return py_maxpagedmemoryusage;
   16582             : }
   16583             : 
   16584           0 : static int py_srvsvc_NetSrvInfo503_set_maxpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
   16585             : {
   16586           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   16587           0 :         if (value == NULL) {
   16588           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxpagedmemoryusage");
   16589           0 :                 return -1;
   16590             :         }
   16591             :         {
   16592           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxpagedmemoryusage));
   16593           0 :                 if (PyLong_Check(value)) {
   16594             :                         unsigned long long test_var;
   16595           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16596           0 :                         if (PyErr_Occurred() != NULL) {
   16597           0 :                                 return -1;
   16598             :                         }
   16599           0 :                         if (test_var > uint_max) {
   16600           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16601             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16602           0 :                                 return -1;
   16603             :                         }
   16604           0 :                         object->maxpagedmemoryusage = test_var;
   16605             :                 } else {
   16606           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16607             :                           PyLong_Type.tp_name);
   16608           0 :                         return -1;
   16609             :                 }
   16610             :         }
   16611           0 :         return 0;
   16612             : }
   16613             : 
   16614           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_maxnonpagedmemoryusage(PyObject *obj, void *closure)
   16615             : {
   16616           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   16617             :         PyObject *py_maxnonpagedmemoryusage;
   16618           0 :         py_maxnonpagedmemoryusage = PyLong_FromUnsignedLongLong((uint32_t)object->maxnonpagedmemoryusage);
   16619           0 :         return py_maxnonpagedmemoryusage;
   16620             : }
   16621             : 
   16622           0 : static int py_srvsvc_NetSrvInfo503_set_maxnonpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
   16623             : {
   16624           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   16625           0 :         if (value == NULL) {
   16626           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxnonpagedmemoryusage");
   16627           0 :                 return -1;
   16628             :         }
   16629             :         {
   16630           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxnonpagedmemoryusage));
   16631           0 :                 if (PyLong_Check(value)) {
   16632             :                         unsigned long long test_var;
   16633           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16634           0 :                         if (PyErr_Occurred() != NULL) {
   16635           0 :                                 return -1;
   16636             :                         }
   16637           0 :                         if (test_var > uint_max) {
   16638           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16639             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16640           0 :                                 return -1;
   16641             :                         }
   16642           0 :                         object->maxnonpagedmemoryusage = test_var;
   16643             :                 } else {
   16644           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16645             :                           PyLong_Type.tp_name);
   16646           0 :                         return -1;
   16647             :                 }
   16648             :         }
   16649           0 :         return 0;
   16650             : }
   16651             : 
   16652           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_enablesoftcompat(PyObject *obj, void *closure)
   16653             : {
   16654           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   16655             :         PyObject *py_enablesoftcompat;
   16656           0 :         py_enablesoftcompat = PyLong_FromUnsignedLongLong((uint32_t)object->enablesoftcompat);
   16657           0 :         return py_enablesoftcompat;
   16658             : }
   16659             : 
   16660           0 : static int py_srvsvc_NetSrvInfo503_set_enablesoftcompat(PyObject *py_obj, PyObject *value, void *closure)
   16661             : {
   16662           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   16663           0 :         if (value == NULL) {
   16664           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enablesoftcompat");
   16665           0 :                 return -1;
   16666             :         }
   16667             :         {
   16668           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesoftcompat));
   16669           0 :                 if (PyLong_Check(value)) {
   16670             :                         unsigned long long test_var;
   16671           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16672           0 :                         if (PyErr_Occurred() != NULL) {
   16673           0 :                                 return -1;
   16674             :                         }
   16675           0 :                         if (test_var > uint_max) {
   16676           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16677             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16678           0 :                                 return -1;
   16679             :                         }
   16680           0 :                         object->enablesoftcompat = test_var;
   16681             :                 } else {
   16682           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16683             :                           PyLong_Type.tp_name);
   16684           0 :                         return -1;
   16685             :                 }
   16686             :         }
   16687           0 :         return 0;
   16688             : }
   16689             : 
   16690           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_enableforcedlogoff(PyObject *obj, void *closure)
   16691             : {
   16692           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   16693             :         PyObject *py_enableforcedlogoff;
   16694           0 :         py_enableforcedlogoff = PyLong_FromUnsignedLongLong((uint32_t)object->enableforcedlogoff);
   16695           0 :         return py_enableforcedlogoff;
   16696             : }
   16697             : 
   16698           0 : static int py_srvsvc_NetSrvInfo503_set_enableforcedlogoff(PyObject *py_obj, PyObject *value, void *closure)
   16699             : {
   16700           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   16701           0 :         if (value == NULL) {
   16702           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enableforcedlogoff");
   16703           0 :                 return -1;
   16704             :         }
   16705             :         {
   16706           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableforcedlogoff));
   16707           0 :                 if (PyLong_Check(value)) {
   16708             :                         unsigned long long test_var;
   16709           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16710           0 :                         if (PyErr_Occurred() != NULL) {
   16711           0 :                                 return -1;
   16712             :                         }
   16713           0 :                         if (test_var > uint_max) {
   16714           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16715             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16716           0 :                                 return -1;
   16717             :                         }
   16718           0 :                         object->enableforcedlogoff = test_var;
   16719             :                 } else {
   16720           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16721             :                           PyLong_Type.tp_name);
   16722           0 :                         return -1;
   16723             :                 }
   16724             :         }
   16725           0 :         return 0;
   16726             : }
   16727             : 
   16728           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_timesource(PyObject *obj, void *closure)
   16729             : {
   16730           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   16731             :         PyObject *py_timesource;
   16732           0 :         py_timesource = PyLong_FromUnsignedLongLong((uint32_t)object->timesource);
   16733           0 :         return py_timesource;
   16734             : }
   16735             : 
   16736           0 : static int py_srvsvc_NetSrvInfo503_set_timesource(PyObject *py_obj, PyObject *value, void *closure)
   16737             : {
   16738           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   16739           0 :         if (value == NULL) {
   16740           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->timesource");
   16741           0 :                 return -1;
   16742             :         }
   16743             :         {
   16744           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timesource));
   16745           0 :                 if (PyLong_Check(value)) {
   16746             :                         unsigned long long test_var;
   16747           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16748           0 :                         if (PyErr_Occurred() != NULL) {
   16749           0 :                                 return -1;
   16750             :                         }
   16751           0 :                         if (test_var > uint_max) {
   16752           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16753             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16754           0 :                                 return -1;
   16755             :                         }
   16756           0 :                         object->timesource = test_var;
   16757             :                 } else {
   16758           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16759             :                           PyLong_Type.tp_name);
   16760           0 :                         return -1;
   16761             :                 }
   16762             :         }
   16763           0 :         return 0;
   16764             : }
   16765             : 
   16766           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_acceptdownlevelapis(PyObject *obj, void *closure)
   16767             : {
   16768           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   16769             :         PyObject *py_acceptdownlevelapis;
   16770           0 :         py_acceptdownlevelapis = PyLong_FromUnsignedLongLong((uint32_t)object->acceptdownlevelapis);
   16771           0 :         return py_acceptdownlevelapis;
   16772             : }
   16773             : 
   16774           0 : static int py_srvsvc_NetSrvInfo503_set_acceptdownlevelapis(PyObject *py_obj, PyObject *value, void *closure)
   16775             : {
   16776           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   16777           0 :         if (value == NULL) {
   16778           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->acceptdownlevelapis");
   16779           0 :                 return -1;
   16780             :         }
   16781             :         {
   16782           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->acceptdownlevelapis));
   16783           0 :                 if (PyLong_Check(value)) {
   16784             :                         unsigned long long test_var;
   16785           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16786           0 :                         if (PyErr_Occurred() != NULL) {
   16787           0 :                                 return -1;
   16788             :                         }
   16789           0 :                         if (test_var > uint_max) {
   16790           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16791             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16792           0 :                                 return -1;
   16793             :                         }
   16794           0 :                         object->acceptdownlevelapis = test_var;
   16795             :                 } else {
   16796           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16797             :                           PyLong_Type.tp_name);
   16798           0 :                         return -1;
   16799             :                 }
   16800             :         }
   16801           0 :         return 0;
   16802             : }
   16803             : 
   16804           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_lmannounce(PyObject *obj, void *closure)
   16805             : {
   16806           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   16807             :         PyObject *py_lmannounce;
   16808           0 :         py_lmannounce = PyLong_FromUnsignedLongLong((uint32_t)object->lmannounce);
   16809           0 :         return py_lmannounce;
   16810             : }
   16811             : 
   16812           0 : static int py_srvsvc_NetSrvInfo503_set_lmannounce(PyObject *py_obj, PyObject *value, void *closure)
   16813             : {
   16814           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   16815           0 :         if (value == NULL) {
   16816           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lmannounce");
   16817           0 :                 return -1;
   16818             :         }
   16819             :         {
   16820           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lmannounce));
   16821           0 :                 if (PyLong_Check(value)) {
   16822             :                         unsigned long long test_var;
   16823           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16824           0 :                         if (PyErr_Occurred() != NULL) {
   16825           0 :                                 return -1;
   16826             :                         }
   16827           0 :                         if (test_var > uint_max) {
   16828           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16829             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16830           0 :                                 return -1;
   16831             :                         }
   16832           0 :                         object->lmannounce = test_var;
   16833             :                 } else {
   16834           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16835             :                           PyLong_Type.tp_name);
   16836           0 :                         return -1;
   16837             :                 }
   16838             :         }
   16839           0 :         return 0;
   16840             : }
   16841             : 
   16842           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_domain(PyObject *obj, void *closure)
   16843             : {
   16844           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   16845             :         PyObject *py_domain;
   16846           0 :         if (object->domain == NULL) {
   16847           0 :                 Py_RETURN_NONE;
   16848             :         }
   16849           0 :         if (object->domain == NULL) {
   16850           0 :                 py_domain = Py_None;
   16851           0 :                 Py_INCREF(py_domain);
   16852             :         } else {
   16853           0 :                 if (object->domain == NULL) {
   16854           0 :                         py_domain = Py_None;
   16855           0 :                         Py_INCREF(py_domain);
   16856             :                 } else {
   16857           0 :                         py_domain = PyUnicode_Decode(object->domain, strlen(object->domain), "utf-8", "ignore");
   16858             :                 }
   16859             :         }
   16860           0 :         return py_domain;
   16861             : }
   16862             : 
   16863           0 : static int py_srvsvc_NetSrvInfo503_set_domain(PyObject *py_obj, PyObject *value, void *closure)
   16864             : {
   16865           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   16866           0 :         if (value == NULL) {
   16867           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain");
   16868           0 :                 return -1;
   16869             :         }
   16870           0 :         if (value == Py_None) {
   16871           0 :                 object->domain = NULL;
   16872             :         } else {
   16873           0 :                 object->domain = NULL;
   16874             :                 {
   16875             :                         const char *test_str;
   16876             :                         const char *talloc_str;
   16877           0 :                         PyObject *unicode = NULL;
   16878           0 :                         if (PyUnicode_Check(value)) {
   16879           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   16880           0 :                                 if (unicode == NULL) {
   16881           0 :                                         PyErr_NoMemory();
   16882           0 :                                         return -1;
   16883             :                                 }
   16884           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   16885           0 :                         } else if (PyBytes_Check(value)) {
   16886           0 :                                 test_str = PyBytes_AS_STRING(value);
   16887             :                         } else {
   16888           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   16889           0 :                                 return -1;
   16890             :                         }
   16891           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   16892           0 :                         if (unicode != NULL) {
   16893           0 :                                 Py_DECREF(unicode);
   16894             :                         }
   16895           0 :                         if (talloc_str == NULL) {
   16896           0 :                                 PyErr_NoMemory();
   16897           0 :                                 return -1;
   16898             :                         }
   16899           0 :                         object->domain = talloc_str;
   16900             :                 }
   16901             :         }
   16902           0 :         return 0;
   16903             : }
   16904             : 
   16905           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_maxcopyreadlen(PyObject *obj, void *closure)
   16906             : {
   16907           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   16908             :         PyObject *py_maxcopyreadlen;
   16909           0 :         py_maxcopyreadlen = PyLong_FromUnsignedLongLong((uint32_t)object->maxcopyreadlen);
   16910           0 :         return py_maxcopyreadlen;
   16911             : }
   16912             : 
   16913           0 : static int py_srvsvc_NetSrvInfo503_set_maxcopyreadlen(PyObject *py_obj, PyObject *value, void *closure)
   16914             : {
   16915           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   16916           0 :         if (value == NULL) {
   16917           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxcopyreadlen");
   16918           0 :                 return -1;
   16919             :         }
   16920             :         {
   16921           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxcopyreadlen));
   16922           0 :                 if (PyLong_Check(value)) {
   16923             :                         unsigned long long test_var;
   16924           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16925           0 :                         if (PyErr_Occurred() != NULL) {
   16926           0 :                                 return -1;
   16927             :                         }
   16928           0 :                         if (test_var > uint_max) {
   16929           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16930             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16931           0 :                                 return -1;
   16932             :                         }
   16933           0 :                         object->maxcopyreadlen = test_var;
   16934             :                 } else {
   16935           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16936             :                           PyLong_Type.tp_name);
   16937           0 :                         return -1;
   16938             :                 }
   16939             :         }
   16940           0 :         return 0;
   16941             : }
   16942             : 
   16943           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_maxcopywritelen(PyObject *obj, void *closure)
   16944             : {
   16945           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   16946             :         PyObject *py_maxcopywritelen;
   16947           0 :         py_maxcopywritelen = PyLong_FromUnsignedLongLong((uint32_t)object->maxcopywritelen);
   16948           0 :         return py_maxcopywritelen;
   16949             : }
   16950             : 
   16951           0 : static int py_srvsvc_NetSrvInfo503_set_maxcopywritelen(PyObject *py_obj, PyObject *value, void *closure)
   16952             : {
   16953           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   16954           0 :         if (value == NULL) {
   16955           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxcopywritelen");
   16956           0 :                 return -1;
   16957             :         }
   16958             :         {
   16959           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxcopywritelen));
   16960           0 :                 if (PyLong_Check(value)) {
   16961             :                         unsigned long long test_var;
   16962           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16963           0 :                         if (PyErr_Occurred() != NULL) {
   16964           0 :                                 return -1;
   16965             :                         }
   16966           0 :                         if (test_var > uint_max) {
   16967           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16968             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16969           0 :                                 return -1;
   16970             :                         }
   16971           0 :                         object->maxcopywritelen = test_var;
   16972             :                 } else {
   16973           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16974             :                           PyLong_Type.tp_name);
   16975           0 :                         return -1;
   16976             :                 }
   16977             :         }
   16978           0 :         return 0;
   16979             : }
   16980             : 
   16981           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_minkeepsearch(PyObject *obj, void *closure)
   16982             : {
   16983           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   16984             :         PyObject *py_minkeepsearch;
   16985           0 :         py_minkeepsearch = PyLong_FromUnsignedLongLong((uint32_t)object->minkeepsearch);
   16986           0 :         return py_minkeepsearch;
   16987             : }
   16988             : 
   16989           0 : static int py_srvsvc_NetSrvInfo503_set_minkeepsearch(PyObject *py_obj, PyObject *value, void *closure)
   16990             : {
   16991           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   16992           0 :         if (value == NULL) {
   16993           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minkeepsearch");
   16994           0 :                 return -1;
   16995             :         }
   16996             :         {
   16997           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minkeepsearch));
   16998           0 :                 if (PyLong_Check(value)) {
   16999             :                         unsigned long long test_var;
   17000           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17001           0 :                         if (PyErr_Occurred() != NULL) {
   17002           0 :                                 return -1;
   17003             :                         }
   17004           0 :                         if (test_var > uint_max) {
   17005           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17006             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17007           0 :                                 return -1;
   17008             :                         }
   17009           0 :                         object->minkeepsearch = test_var;
   17010             :                 } else {
   17011           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17012             :                           PyLong_Type.tp_name);
   17013           0 :                         return -1;
   17014             :                 }
   17015             :         }
   17016           0 :         return 0;
   17017             : }
   17018             : 
   17019           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_maxkeepsearch(PyObject *obj, void *closure)
   17020             : {
   17021           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   17022             :         PyObject *py_maxkeepsearch;
   17023           0 :         py_maxkeepsearch = PyLong_FromUnsignedLongLong((uint32_t)object->maxkeepsearch);
   17024           0 :         return py_maxkeepsearch;
   17025             : }
   17026             : 
   17027           0 : static int py_srvsvc_NetSrvInfo503_set_maxkeepsearch(PyObject *py_obj, PyObject *value, void *closure)
   17028             : {
   17029           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   17030           0 :         if (value == NULL) {
   17031           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxkeepsearch");
   17032           0 :                 return -1;
   17033             :         }
   17034             :         {
   17035           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxkeepsearch));
   17036           0 :                 if (PyLong_Check(value)) {
   17037             :                         unsigned long long test_var;
   17038           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17039           0 :                         if (PyErr_Occurred() != NULL) {
   17040           0 :                                 return -1;
   17041             :                         }
   17042           0 :                         if (test_var > uint_max) {
   17043           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17044             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17045           0 :                                 return -1;
   17046             :                         }
   17047           0 :                         object->maxkeepsearch = test_var;
   17048             :                 } else {
   17049           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17050             :                           PyLong_Type.tp_name);
   17051           0 :                         return -1;
   17052             :                 }
   17053             :         }
   17054           0 :         return 0;
   17055             : }
   17056             : 
   17057           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_minkeepcomplsearch(PyObject *obj, void *closure)
   17058             : {
   17059           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   17060             :         PyObject *py_minkeepcomplsearch;
   17061           0 :         py_minkeepcomplsearch = PyLong_FromUnsignedLongLong((uint32_t)object->minkeepcomplsearch);
   17062           0 :         return py_minkeepcomplsearch;
   17063             : }
   17064             : 
   17065           0 : static int py_srvsvc_NetSrvInfo503_set_minkeepcomplsearch(PyObject *py_obj, PyObject *value, void *closure)
   17066             : {
   17067           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   17068           0 :         if (value == NULL) {
   17069           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minkeepcomplsearch");
   17070           0 :                 return -1;
   17071             :         }
   17072             :         {
   17073           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minkeepcomplsearch));
   17074           0 :                 if (PyLong_Check(value)) {
   17075             :                         unsigned long long test_var;
   17076           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17077           0 :                         if (PyErr_Occurred() != NULL) {
   17078           0 :                                 return -1;
   17079             :                         }
   17080           0 :                         if (test_var > uint_max) {
   17081           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17082             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17083           0 :                                 return -1;
   17084             :                         }
   17085           0 :                         object->minkeepcomplsearch = test_var;
   17086             :                 } else {
   17087           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17088             :                           PyLong_Type.tp_name);
   17089           0 :                         return -1;
   17090             :                 }
   17091             :         }
   17092           0 :         return 0;
   17093             : }
   17094             : 
   17095           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_maxkeepcomplsearch(PyObject *obj, void *closure)
   17096             : {
   17097           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   17098             :         PyObject *py_maxkeepcomplsearch;
   17099           0 :         py_maxkeepcomplsearch = PyLong_FromUnsignedLongLong((uint32_t)object->maxkeepcomplsearch);
   17100           0 :         return py_maxkeepcomplsearch;
   17101             : }
   17102             : 
   17103           0 : static int py_srvsvc_NetSrvInfo503_set_maxkeepcomplsearch(PyObject *py_obj, PyObject *value, void *closure)
   17104             : {
   17105           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   17106           0 :         if (value == NULL) {
   17107           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxkeepcomplsearch");
   17108           0 :                 return -1;
   17109             :         }
   17110             :         {
   17111           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxkeepcomplsearch));
   17112           0 :                 if (PyLong_Check(value)) {
   17113             :                         unsigned long long test_var;
   17114           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17115           0 :                         if (PyErr_Occurred() != NULL) {
   17116           0 :                                 return -1;
   17117             :                         }
   17118           0 :                         if (test_var > uint_max) {
   17119           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17120             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17121           0 :                                 return -1;
   17122             :                         }
   17123           0 :                         object->maxkeepcomplsearch = test_var;
   17124             :                 } else {
   17125           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17126             :                           PyLong_Type.tp_name);
   17127           0 :                         return -1;
   17128             :                 }
   17129             :         }
   17130           0 :         return 0;
   17131             : }
   17132             : 
   17133           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_threadcountadd(PyObject *obj, void *closure)
   17134             : {
   17135           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   17136             :         PyObject *py_threadcountadd;
   17137           0 :         py_threadcountadd = PyLong_FromUnsignedLongLong((uint32_t)object->threadcountadd);
   17138           0 :         return py_threadcountadd;
   17139             : }
   17140             : 
   17141           0 : static int py_srvsvc_NetSrvInfo503_set_threadcountadd(PyObject *py_obj, PyObject *value, void *closure)
   17142             : {
   17143           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   17144           0 :         if (value == NULL) {
   17145           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->threadcountadd");
   17146           0 :                 return -1;
   17147             :         }
   17148             :         {
   17149           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->threadcountadd));
   17150           0 :                 if (PyLong_Check(value)) {
   17151             :                         unsigned long long test_var;
   17152           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17153           0 :                         if (PyErr_Occurred() != NULL) {
   17154           0 :                                 return -1;
   17155             :                         }
   17156           0 :                         if (test_var > uint_max) {
   17157           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17158             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17159           0 :                                 return -1;
   17160             :                         }
   17161           0 :                         object->threadcountadd = test_var;
   17162             :                 } else {
   17163           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17164             :                           PyLong_Type.tp_name);
   17165           0 :                         return -1;
   17166             :                 }
   17167             :         }
   17168           0 :         return 0;
   17169             : }
   17170             : 
   17171           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_numlockthreads(PyObject *obj, void *closure)
   17172             : {
   17173           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   17174             :         PyObject *py_numlockthreads;
   17175           0 :         py_numlockthreads = PyLong_FromUnsignedLongLong((uint32_t)object->numlockthreads);
   17176           0 :         return py_numlockthreads;
   17177             : }
   17178             : 
   17179           0 : static int py_srvsvc_NetSrvInfo503_set_numlockthreads(PyObject *py_obj, PyObject *value, void *closure)
   17180             : {
   17181           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   17182           0 :         if (value == NULL) {
   17183           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->numlockthreads");
   17184           0 :                 return -1;
   17185             :         }
   17186             :         {
   17187           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numlockthreads));
   17188           0 :                 if (PyLong_Check(value)) {
   17189             :                         unsigned long long test_var;
   17190           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17191           0 :                         if (PyErr_Occurred() != NULL) {
   17192           0 :                                 return -1;
   17193             :                         }
   17194           0 :                         if (test_var > uint_max) {
   17195           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17196             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17197           0 :                                 return -1;
   17198             :                         }
   17199           0 :                         object->numlockthreads = test_var;
   17200             :                 } else {
   17201           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17202             :                           PyLong_Type.tp_name);
   17203           0 :                         return -1;
   17204             :                 }
   17205             :         }
   17206           0 :         return 0;
   17207             : }
   17208             : 
   17209           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_scavtimeout(PyObject *obj, void *closure)
   17210             : {
   17211           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   17212             :         PyObject *py_scavtimeout;
   17213           0 :         py_scavtimeout = PyLong_FromUnsignedLongLong((uint32_t)object->scavtimeout);
   17214           0 :         return py_scavtimeout;
   17215             : }
   17216             : 
   17217           0 : static int py_srvsvc_NetSrvInfo503_set_scavtimeout(PyObject *py_obj, PyObject *value, void *closure)
   17218             : {
   17219           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   17220           0 :         if (value == NULL) {
   17221           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->scavtimeout");
   17222           0 :                 return -1;
   17223             :         }
   17224             :         {
   17225           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->scavtimeout));
   17226           0 :                 if (PyLong_Check(value)) {
   17227             :                         unsigned long long test_var;
   17228           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17229           0 :                         if (PyErr_Occurred() != NULL) {
   17230           0 :                                 return -1;
   17231             :                         }
   17232           0 :                         if (test_var > uint_max) {
   17233           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17234             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17235           0 :                                 return -1;
   17236             :                         }
   17237           0 :                         object->scavtimeout = test_var;
   17238             :                 } else {
   17239           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17240             :                           PyLong_Type.tp_name);
   17241           0 :                         return -1;
   17242             :                 }
   17243             :         }
   17244           0 :         return 0;
   17245             : }
   17246             : 
   17247           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_minrcvqueue(PyObject *obj, void *closure)
   17248             : {
   17249           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   17250             :         PyObject *py_minrcvqueue;
   17251           0 :         py_minrcvqueue = PyLong_FromUnsignedLongLong((uint32_t)object->minrcvqueue);
   17252           0 :         return py_minrcvqueue;
   17253             : }
   17254             : 
   17255           0 : static int py_srvsvc_NetSrvInfo503_set_minrcvqueue(PyObject *py_obj, PyObject *value, void *closure)
   17256             : {
   17257           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   17258           0 :         if (value == NULL) {
   17259           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minrcvqueue");
   17260           0 :                 return -1;
   17261             :         }
   17262             :         {
   17263           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minrcvqueue));
   17264           0 :                 if (PyLong_Check(value)) {
   17265             :                         unsigned long long test_var;
   17266           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17267           0 :                         if (PyErr_Occurred() != NULL) {
   17268           0 :                                 return -1;
   17269             :                         }
   17270           0 :                         if (test_var > uint_max) {
   17271           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17272             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17273           0 :                                 return -1;
   17274             :                         }
   17275           0 :                         object->minrcvqueue = test_var;
   17276             :                 } else {
   17277           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17278             :                           PyLong_Type.tp_name);
   17279           0 :                         return -1;
   17280             :                 }
   17281             :         }
   17282           0 :         return 0;
   17283             : }
   17284             : 
   17285           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_minfreeworkitems(PyObject *obj, void *closure)
   17286             : {
   17287           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   17288             :         PyObject *py_minfreeworkitems;
   17289           0 :         py_minfreeworkitems = PyLong_FromUnsignedLongLong((uint32_t)object->minfreeworkitems);
   17290           0 :         return py_minfreeworkitems;
   17291             : }
   17292             : 
   17293           0 : static int py_srvsvc_NetSrvInfo503_set_minfreeworkitems(PyObject *py_obj, PyObject *value, void *closure)
   17294             : {
   17295           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   17296           0 :         if (value == NULL) {
   17297           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minfreeworkitems");
   17298           0 :                 return -1;
   17299             :         }
   17300             :         {
   17301           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minfreeworkitems));
   17302           0 :                 if (PyLong_Check(value)) {
   17303             :                         unsigned long long test_var;
   17304           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17305           0 :                         if (PyErr_Occurred() != NULL) {
   17306           0 :                                 return -1;
   17307             :                         }
   17308           0 :                         if (test_var > uint_max) {
   17309           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17310             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17311           0 :                                 return -1;
   17312             :                         }
   17313           0 :                         object->minfreeworkitems = test_var;
   17314             :                 } else {
   17315           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17316             :                           PyLong_Type.tp_name);
   17317           0 :                         return -1;
   17318             :                 }
   17319             :         }
   17320           0 :         return 0;
   17321             : }
   17322             : 
   17323           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_xactmemsize(PyObject *obj, void *closure)
   17324             : {
   17325           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   17326             :         PyObject *py_xactmemsize;
   17327           0 :         py_xactmemsize = PyLong_FromUnsignedLongLong((uint32_t)object->xactmemsize);
   17328           0 :         return py_xactmemsize;
   17329             : }
   17330             : 
   17331           0 : static int py_srvsvc_NetSrvInfo503_set_xactmemsize(PyObject *py_obj, PyObject *value, void *closure)
   17332             : {
   17333           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   17334           0 :         if (value == NULL) {
   17335           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->xactmemsize");
   17336           0 :                 return -1;
   17337             :         }
   17338             :         {
   17339           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->xactmemsize));
   17340           0 :                 if (PyLong_Check(value)) {
   17341             :                         unsigned long long test_var;
   17342           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17343           0 :                         if (PyErr_Occurred() != NULL) {
   17344           0 :                                 return -1;
   17345             :                         }
   17346           0 :                         if (test_var > uint_max) {
   17347           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17348             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17349           0 :                                 return -1;
   17350             :                         }
   17351           0 :                         object->xactmemsize = test_var;
   17352             :                 } else {
   17353           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17354             :                           PyLong_Type.tp_name);
   17355           0 :                         return -1;
   17356             :                 }
   17357             :         }
   17358           0 :         return 0;
   17359             : }
   17360             : 
   17361           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_threadpriority(PyObject *obj, void *closure)
   17362             : {
   17363           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   17364             :         PyObject *py_threadpriority;
   17365           0 :         py_threadpriority = PyLong_FromUnsignedLongLong((uint32_t)object->threadpriority);
   17366           0 :         return py_threadpriority;
   17367             : }
   17368             : 
   17369           0 : static int py_srvsvc_NetSrvInfo503_set_threadpriority(PyObject *py_obj, PyObject *value, void *closure)
   17370             : {
   17371           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   17372           0 :         if (value == NULL) {
   17373           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->threadpriority");
   17374           0 :                 return -1;
   17375             :         }
   17376             :         {
   17377           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->threadpriority));
   17378           0 :                 if (PyLong_Check(value)) {
   17379             :                         unsigned long long test_var;
   17380           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17381           0 :                         if (PyErr_Occurred() != NULL) {
   17382           0 :                                 return -1;
   17383             :                         }
   17384           0 :                         if (test_var > uint_max) {
   17385           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17386             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17387           0 :                                 return -1;
   17388             :                         }
   17389           0 :                         object->threadpriority = test_var;
   17390             :                 } else {
   17391           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17392             :                           PyLong_Type.tp_name);
   17393           0 :                         return -1;
   17394             :                 }
   17395             :         }
   17396           0 :         return 0;
   17397             : }
   17398             : 
   17399           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_maxmpxct(PyObject *obj, void *closure)
   17400             : {
   17401           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   17402             :         PyObject *py_maxmpxct;
   17403           0 :         py_maxmpxct = PyLong_FromUnsignedLongLong((uint32_t)object->maxmpxct);
   17404           0 :         return py_maxmpxct;
   17405             : }
   17406             : 
   17407           0 : static int py_srvsvc_NetSrvInfo503_set_maxmpxct(PyObject *py_obj, PyObject *value, void *closure)
   17408             : {
   17409           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   17410           0 :         if (value == NULL) {
   17411           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxmpxct");
   17412           0 :                 return -1;
   17413             :         }
   17414             :         {
   17415           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxmpxct));
   17416           0 :                 if (PyLong_Check(value)) {
   17417             :                         unsigned long long test_var;
   17418           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17419           0 :                         if (PyErr_Occurred() != NULL) {
   17420           0 :                                 return -1;
   17421             :                         }
   17422           0 :                         if (test_var > uint_max) {
   17423           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17424             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17425           0 :                                 return -1;
   17426             :                         }
   17427           0 :                         object->maxmpxct = test_var;
   17428             :                 } else {
   17429           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17430             :                           PyLong_Type.tp_name);
   17431           0 :                         return -1;
   17432             :                 }
   17433             :         }
   17434           0 :         return 0;
   17435             : }
   17436             : 
   17437           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_oplockbreakwait(PyObject *obj, void *closure)
   17438             : {
   17439           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   17440             :         PyObject *py_oplockbreakwait;
   17441           0 :         py_oplockbreakwait = PyLong_FromUnsignedLongLong((uint32_t)object->oplockbreakwait);
   17442           0 :         return py_oplockbreakwait;
   17443             : }
   17444             : 
   17445           0 : static int py_srvsvc_NetSrvInfo503_set_oplockbreakwait(PyObject *py_obj, PyObject *value, void *closure)
   17446             : {
   17447           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   17448           0 :         if (value == NULL) {
   17449           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->oplockbreakwait");
   17450           0 :                 return -1;
   17451             :         }
   17452             :         {
   17453           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->oplockbreakwait));
   17454           0 :                 if (PyLong_Check(value)) {
   17455             :                         unsigned long long test_var;
   17456           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17457           0 :                         if (PyErr_Occurred() != NULL) {
   17458           0 :                                 return -1;
   17459             :                         }
   17460           0 :                         if (test_var > uint_max) {
   17461           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17462             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17463           0 :                                 return -1;
   17464             :                         }
   17465           0 :                         object->oplockbreakwait = test_var;
   17466             :                 } else {
   17467           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17468             :                           PyLong_Type.tp_name);
   17469           0 :                         return -1;
   17470             :                 }
   17471             :         }
   17472           0 :         return 0;
   17473             : }
   17474             : 
   17475           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_oplockbreakresponsewait(PyObject *obj, void *closure)
   17476             : {
   17477           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   17478             :         PyObject *py_oplockbreakresponsewait;
   17479           0 :         py_oplockbreakresponsewait = PyLong_FromUnsignedLongLong((uint32_t)object->oplockbreakresponsewait);
   17480           0 :         return py_oplockbreakresponsewait;
   17481             : }
   17482             : 
   17483           0 : static int py_srvsvc_NetSrvInfo503_set_oplockbreakresponsewait(PyObject *py_obj, PyObject *value, void *closure)
   17484             : {
   17485           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   17486           0 :         if (value == NULL) {
   17487           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->oplockbreakresponsewait");
   17488           0 :                 return -1;
   17489             :         }
   17490             :         {
   17491           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->oplockbreakresponsewait));
   17492           0 :                 if (PyLong_Check(value)) {
   17493             :                         unsigned long long test_var;
   17494           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17495           0 :                         if (PyErr_Occurred() != NULL) {
   17496           0 :                                 return -1;
   17497             :                         }
   17498           0 :                         if (test_var > uint_max) {
   17499           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17500             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17501           0 :                                 return -1;
   17502             :                         }
   17503           0 :                         object->oplockbreakresponsewait = test_var;
   17504             :                 } else {
   17505           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17506             :                           PyLong_Type.tp_name);
   17507           0 :                         return -1;
   17508             :                 }
   17509             :         }
   17510           0 :         return 0;
   17511             : }
   17512             : 
   17513           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_enableoplocks(PyObject *obj, void *closure)
   17514             : {
   17515           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   17516             :         PyObject *py_enableoplocks;
   17517           0 :         py_enableoplocks = PyLong_FromUnsignedLongLong((uint32_t)object->enableoplocks);
   17518           0 :         return py_enableoplocks;
   17519             : }
   17520             : 
   17521           0 : static int py_srvsvc_NetSrvInfo503_set_enableoplocks(PyObject *py_obj, PyObject *value, void *closure)
   17522             : {
   17523           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   17524           0 :         if (value == NULL) {
   17525           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enableoplocks");
   17526           0 :                 return -1;
   17527             :         }
   17528             :         {
   17529           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableoplocks));
   17530           0 :                 if (PyLong_Check(value)) {
   17531             :                         unsigned long long test_var;
   17532           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17533           0 :                         if (PyErr_Occurred() != NULL) {
   17534           0 :                                 return -1;
   17535             :                         }
   17536           0 :                         if (test_var > uint_max) {
   17537           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17538             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17539           0 :                                 return -1;
   17540             :                         }
   17541           0 :                         object->enableoplocks = test_var;
   17542             :                 } else {
   17543           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17544             :                           PyLong_Type.tp_name);
   17545           0 :                         return -1;
   17546             :                 }
   17547             :         }
   17548           0 :         return 0;
   17549             : }
   17550             : 
   17551           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_enableoplockforceclose(PyObject *obj, void *closure)
   17552             : {
   17553           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   17554             :         PyObject *py_enableoplockforceclose;
   17555           0 :         py_enableoplockforceclose = PyLong_FromUnsignedLongLong((uint32_t)object->enableoplockforceclose);
   17556           0 :         return py_enableoplockforceclose;
   17557             : }
   17558             : 
   17559           0 : static int py_srvsvc_NetSrvInfo503_set_enableoplockforceclose(PyObject *py_obj, PyObject *value, void *closure)
   17560             : {
   17561           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   17562           0 :         if (value == NULL) {
   17563           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enableoplockforceclose");
   17564           0 :                 return -1;
   17565             :         }
   17566             :         {
   17567           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableoplockforceclose));
   17568           0 :                 if (PyLong_Check(value)) {
   17569             :                         unsigned long long test_var;
   17570           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17571           0 :                         if (PyErr_Occurred() != NULL) {
   17572           0 :                                 return -1;
   17573             :                         }
   17574           0 :                         if (test_var > uint_max) {
   17575           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17576             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17577           0 :                                 return -1;
   17578             :                         }
   17579           0 :                         object->enableoplockforceclose = test_var;
   17580             :                 } else {
   17581           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17582             :                           PyLong_Type.tp_name);
   17583           0 :                         return -1;
   17584             :                 }
   17585             :         }
   17586           0 :         return 0;
   17587             : }
   17588             : 
   17589           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_enablefcbopens(PyObject *obj, void *closure)
   17590             : {
   17591           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   17592             :         PyObject *py_enablefcbopens;
   17593           0 :         py_enablefcbopens = PyLong_FromUnsignedLongLong((uint32_t)object->enablefcbopens);
   17594           0 :         return py_enablefcbopens;
   17595             : }
   17596             : 
   17597           0 : static int py_srvsvc_NetSrvInfo503_set_enablefcbopens(PyObject *py_obj, PyObject *value, void *closure)
   17598             : {
   17599           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   17600           0 :         if (value == NULL) {
   17601           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enablefcbopens");
   17602           0 :                 return -1;
   17603             :         }
   17604             :         {
   17605           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablefcbopens));
   17606           0 :                 if (PyLong_Check(value)) {
   17607             :                         unsigned long long test_var;
   17608           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17609           0 :                         if (PyErr_Occurred() != NULL) {
   17610           0 :                                 return -1;
   17611             :                         }
   17612           0 :                         if (test_var > uint_max) {
   17613           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17614             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17615           0 :                                 return -1;
   17616             :                         }
   17617           0 :                         object->enablefcbopens = test_var;
   17618             :                 } else {
   17619           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17620             :                           PyLong_Type.tp_name);
   17621           0 :                         return -1;
   17622             :                 }
   17623             :         }
   17624           0 :         return 0;
   17625             : }
   17626             : 
   17627           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_enableraw(PyObject *obj, void *closure)
   17628             : {
   17629           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   17630             :         PyObject *py_enableraw;
   17631           0 :         py_enableraw = PyLong_FromUnsignedLongLong((uint32_t)object->enableraw);
   17632           0 :         return py_enableraw;
   17633             : }
   17634             : 
   17635           0 : static int py_srvsvc_NetSrvInfo503_set_enableraw(PyObject *py_obj, PyObject *value, void *closure)
   17636             : {
   17637           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   17638           0 :         if (value == NULL) {
   17639           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enableraw");
   17640           0 :                 return -1;
   17641             :         }
   17642             :         {
   17643           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableraw));
   17644           0 :                 if (PyLong_Check(value)) {
   17645             :                         unsigned long long test_var;
   17646           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17647           0 :                         if (PyErr_Occurred() != NULL) {
   17648           0 :                                 return -1;
   17649             :                         }
   17650           0 :                         if (test_var > uint_max) {
   17651           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17652             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17653           0 :                                 return -1;
   17654             :                         }
   17655           0 :                         object->enableraw = test_var;
   17656             :                 } else {
   17657           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17658             :                           PyLong_Type.tp_name);
   17659           0 :                         return -1;
   17660             :                 }
   17661             :         }
   17662           0 :         return 0;
   17663             : }
   17664             : 
   17665           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_enablesharednetdrives(PyObject *obj, void *closure)
   17666             : {
   17667           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   17668             :         PyObject *py_enablesharednetdrives;
   17669           0 :         py_enablesharednetdrives = PyLong_FromUnsignedLongLong((uint32_t)object->enablesharednetdrives);
   17670           0 :         return py_enablesharednetdrives;
   17671             : }
   17672             : 
   17673           0 : static int py_srvsvc_NetSrvInfo503_set_enablesharednetdrives(PyObject *py_obj, PyObject *value, void *closure)
   17674             : {
   17675           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   17676           0 :         if (value == NULL) {
   17677           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enablesharednetdrives");
   17678           0 :                 return -1;
   17679             :         }
   17680             :         {
   17681           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesharednetdrives));
   17682           0 :                 if (PyLong_Check(value)) {
   17683             :                         unsigned long long test_var;
   17684           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17685           0 :                         if (PyErr_Occurred() != NULL) {
   17686           0 :                                 return -1;
   17687             :                         }
   17688           0 :                         if (test_var > uint_max) {
   17689           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17690             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17691           0 :                                 return -1;
   17692             :                         }
   17693           0 :                         object->enablesharednetdrives = test_var;
   17694             :                 } else {
   17695           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17696             :                           PyLong_Type.tp_name);
   17697           0 :                         return -1;
   17698             :                 }
   17699             :         }
   17700           0 :         return 0;
   17701             : }
   17702             : 
   17703           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_minfreeconnections(PyObject *obj, void *closure)
   17704             : {
   17705           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   17706             :         PyObject *py_minfreeconnections;
   17707           0 :         py_minfreeconnections = PyLong_FromUnsignedLongLong((uint32_t)object->minfreeconnections);
   17708           0 :         return py_minfreeconnections;
   17709             : }
   17710             : 
   17711           0 : static int py_srvsvc_NetSrvInfo503_set_minfreeconnections(PyObject *py_obj, PyObject *value, void *closure)
   17712             : {
   17713           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   17714           0 :         if (value == NULL) {
   17715           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minfreeconnections");
   17716           0 :                 return -1;
   17717             :         }
   17718             :         {
   17719           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minfreeconnections));
   17720           0 :                 if (PyLong_Check(value)) {
   17721             :                         unsigned long long test_var;
   17722           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17723           0 :                         if (PyErr_Occurred() != NULL) {
   17724           0 :                                 return -1;
   17725             :                         }
   17726           0 :                         if (test_var > uint_max) {
   17727           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17728             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17729           0 :                                 return -1;
   17730             :                         }
   17731           0 :                         object->minfreeconnections = test_var;
   17732             :                 } else {
   17733           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17734             :                           PyLong_Type.tp_name);
   17735           0 :                         return -1;
   17736             :                 }
   17737             :         }
   17738           0 :         return 0;
   17739             : }
   17740             : 
   17741           0 : static PyObject *py_srvsvc_NetSrvInfo503_get_maxfreeconnections(PyObject *obj, void *closure)
   17742             : {
   17743           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(obj);
   17744             :         PyObject *py_maxfreeconnections;
   17745           0 :         py_maxfreeconnections = PyLong_FromUnsignedLongLong((uint32_t)object->maxfreeconnections);
   17746           0 :         return py_maxfreeconnections;
   17747             : }
   17748             : 
   17749           0 : static int py_srvsvc_NetSrvInfo503_set_maxfreeconnections(PyObject *py_obj, PyObject *value, void *closure)
   17750             : {
   17751           0 :         struct srvsvc_NetSrvInfo503 *object = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(py_obj);
   17752           0 :         if (value == NULL) {
   17753           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxfreeconnections");
   17754           0 :                 return -1;
   17755             :         }
   17756             :         {
   17757           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxfreeconnections));
   17758           0 :                 if (PyLong_Check(value)) {
   17759             :                         unsigned long long test_var;
   17760           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17761           0 :                         if (PyErr_Occurred() != NULL) {
   17762           0 :                                 return -1;
   17763             :                         }
   17764           0 :                         if (test_var > uint_max) {
   17765           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17766             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17767           0 :                                 return -1;
   17768             :                         }
   17769           0 :                         object->maxfreeconnections = test_var;
   17770             :                 } else {
   17771           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17772             :                           PyLong_Type.tp_name);
   17773           0 :                         return -1;
   17774             :                 }
   17775             :         }
   17776           0 :         return 0;
   17777             : }
   17778             : 
   17779             : static PyGetSetDef py_srvsvc_NetSrvInfo503_getsetters[] = {
   17780             :         {
   17781             :                 .name = discard_const_p(char, "sessopen"),
   17782             :                 .get = py_srvsvc_NetSrvInfo503_get_sessopen,
   17783             :                 .set = py_srvsvc_NetSrvInfo503_set_sessopen,
   17784             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17785             :         },
   17786             :         {
   17787             :                 .name = discard_const_p(char, "sesssvc"),
   17788             :                 .get = py_srvsvc_NetSrvInfo503_get_sesssvc,
   17789             :                 .set = py_srvsvc_NetSrvInfo503_set_sesssvc,
   17790             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17791             :         },
   17792             :         {
   17793             :                 .name = discard_const_p(char, "opensearch"),
   17794             :                 .get = py_srvsvc_NetSrvInfo503_get_opensearch,
   17795             :                 .set = py_srvsvc_NetSrvInfo503_set_opensearch,
   17796             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17797             :         },
   17798             :         {
   17799             :                 .name = discard_const_p(char, "sizereqbufs"),
   17800             :                 .get = py_srvsvc_NetSrvInfo503_get_sizereqbufs,
   17801             :                 .set = py_srvsvc_NetSrvInfo503_set_sizereqbufs,
   17802             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17803             :         },
   17804             :         {
   17805             :                 .name = discard_const_p(char, "initworkitems"),
   17806             :                 .get = py_srvsvc_NetSrvInfo503_get_initworkitems,
   17807             :                 .set = py_srvsvc_NetSrvInfo503_set_initworkitems,
   17808             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17809             :         },
   17810             :         {
   17811             :                 .name = discard_const_p(char, "maxworkitems"),
   17812             :                 .get = py_srvsvc_NetSrvInfo503_get_maxworkitems,
   17813             :                 .set = py_srvsvc_NetSrvInfo503_set_maxworkitems,
   17814             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17815             :         },
   17816             :         {
   17817             :                 .name = discard_const_p(char, "rawworkitems"),
   17818             :                 .get = py_srvsvc_NetSrvInfo503_get_rawworkitems,
   17819             :                 .set = py_srvsvc_NetSrvInfo503_set_rawworkitems,
   17820             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17821             :         },
   17822             :         {
   17823             :                 .name = discard_const_p(char, "irpstacksize"),
   17824             :                 .get = py_srvsvc_NetSrvInfo503_get_irpstacksize,
   17825             :                 .set = py_srvsvc_NetSrvInfo503_set_irpstacksize,
   17826             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17827             :         },
   17828             :         {
   17829             :                 .name = discard_const_p(char, "maxrawbuflen"),
   17830             :                 .get = py_srvsvc_NetSrvInfo503_get_maxrawbuflen,
   17831             :                 .set = py_srvsvc_NetSrvInfo503_set_maxrawbuflen,
   17832             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17833             :         },
   17834             :         {
   17835             :                 .name = discard_const_p(char, "sessusers"),
   17836             :                 .get = py_srvsvc_NetSrvInfo503_get_sessusers,
   17837             :                 .set = py_srvsvc_NetSrvInfo503_set_sessusers,
   17838             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17839             :         },
   17840             :         {
   17841             :                 .name = discard_const_p(char, "sessconns"),
   17842             :                 .get = py_srvsvc_NetSrvInfo503_get_sessconns,
   17843             :                 .set = py_srvsvc_NetSrvInfo503_set_sessconns,
   17844             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17845             :         },
   17846             :         {
   17847             :                 .name = discard_const_p(char, "maxpagedmemoryusage"),
   17848             :                 .get = py_srvsvc_NetSrvInfo503_get_maxpagedmemoryusage,
   17849             :                 .set = py_srvsvc_NetSrvInfo503_set_maxpagedmemoryusage,
   17850             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17851             :         },
   17852             :         {
   17853             :                 .name = discard_const_p(char, "maxnonpagedmemoryusage"),
   17854             :                 .get = py_srvsvc_NetSrvInfo503_get_maxnonpagedmemoryusage,
   17855             :                 .set = py_srvsvc_NetSrvInfo503_set_maxnonpagedmemoryusage,
   17856             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17857             :         },
   17858             :         {
   17859             :                 .name = discard_const_p(char, "enablesoftcompat"),
   17860             :                 .get = py_srvsvc_NetSrvInfo503_get_enablesoftcompat,
   17861             :                 .set = py_srvsvc_NetSrvInfo503_set_enablesoftcompat,
   17862             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17863             :         },
   17864             :         {
   17865             :                 .name = discard_const_p(char, "enableforcedlogoff"),
   17866             :                 .get = py_srvsvc_NetSrvInfo503_get_enableforcedlogoff,
   17867             :                 .set = py_srvsvc_NetSrvInfo503_set_enableforcedlogoff,
   17868             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17869             :         },
   17870             :         {
   17871             :                 .name = discard_const_p(char, "timesource"),
   17872             :                 .get = py_srvsvc_NetSrvInfo503_get_timesource,
   17873             :                 .set = py_srvsvc_NetSrvInfo503_set_timesource,
   17874             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17875             :         },
   17876             :         {
   17877             :                 .name = discard_const_p(char, "acceptdownlevelapis"),
   17878             :                 .get = py_srvsvc_NetSrvInfo503_get_acceptdownlevelapis,
   17879             :                 .set = py_srvsvc_NetSrvInfo503_set_acceptdownlevelapis,
   17880             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17881             :         },
   17882             :         {
   17883             :                 .name = discard_const_p(char, "lmannounce"),
   17884             :                 .get = py_srvsvc_NetSrvInfo503_get_lmannounce,
   17885             :                 .set = py_srvsvc_NetSrvInfo503_set_lmannounce,
   17886             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17887             :         },
   17888             :         {
   17889             :                 .name = discard_const_p(char, "domain"),
   17890             :                 .get = py_srvsvc_NetSrvInfo503_get_domain,
   17891             :                 .set = py_srvsvc_NetSrvInfo503_set_domain,
   17892             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   17893             :         },
   17894             :         {
   17895             :                 .name = discard_const_p(char, "maxcopyreadlen"),
   17896             :                 .get = py_srvsvc_NetSrvInfo503_get_maxcopyreadlen,
   17897             :                 .set = py_srvsvc_NetSrvInfo503_set_maxcopyreadlen,
   17898             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17899             :         },
   17900             :         {
   17901             :                 .name = discard_const_p(char, "maxcopywritelen"),
   17902             :                 .get = py_srvsvc_NetSrvInfo503_get_maxcopywritelen,
   17903             :                 .set = py_srvsvc_NetSrvInfo503_set_maxcopywritelen,
   17904             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17905             :         },
   17906             :         {
   17907             :                 .name = discard_const_p(char, "minkeepsearch"),
   17908             :                 .get = py_srvsvc_NetSrvInfo503_get_minkeepsearch,
   17909             :                 .set = py_srvsvc_NetSrvInfo503_set_minkeepsearch,
   17910             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17911             :         },
   17912             :         {
   17913             :                 .name = discard_const_p(char, "maxkeepsearch"),
   17914             :                 .get = py_srvsvc_NetSrvInfo503_get_maxkeepsearch,
   17915             :                 .set = py_srvsvc_NetSrvInfo503_set_maxkeepsearch,
   17916             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17917             :         },
   17918             :         {
   17919             :                 .name = discard_const_p(char, "minkeepcomplsearch"),
   17920             :                 .get = py_srvsvc_NetSrvInfo503_get_minkeepcomplsearch,
   17921             :                 .set = py_srvsvc_NetSrvInfo503_set_minkeepcomplsearch,
   17922             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17923             :         },
   17924             :         {
   17925             :                 .name = discard_const_p(char, "maxkeepcomplsearch"),
   17926             :                 .get = py_srvsvc_NetSrvInfo503_get_maxkeepcomplsearch,
   17927             :                 .set = py_srvsvc_NetSrvInfo503_set_maxkeepcomplsearch,
   17928             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17929             :         },
   17930             :         {
   17931             :                 .name = discard_const_p(char, "threadcountadd"),
   17932             :                 .get = py_srvsvc_NetSrvInfo503_get_threadcountadd,
   17933             :                 .set = py_srvsvc_NetSrvInfo503_set_threadcountadd,
   17934             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17935             :         },
   17936             :         {
   17937             :                 .name = discard_const_p(char, "numlockthreads"),
   17938             :                 .get = py_srvsvc_NetSrvInfo503_get_numlockthreads,
   17939             :                 .set = py_srvsvc_NetSrvInfo503_set_numlockthreads,
   17940             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17941             :         },
   17942             :         {
   17943             :                 .name = discard_const_p(char, "scavtimeout"),
   17944             :                 .get = py_srvsvc_NetSrvInfo503_get_scavtimeout,
   17945             :                 .set = py_srvsvc_NetSrvInfo503_set_scavtimeout,
   17946             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17947             :         },
   17948             :         {
   17949             :                 .name = discard_const_p(char, "minrcvqueue"),
   17950             :                 .get = py_srvsvc_NetSrvInfo503_get_minrcvqueue,
   17951             :                 .set = py_srvsvc_NetSrvInfo503_set_minrcvqueue,
   17952             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17953             :         },
   17954             :         {
   17955             :                 .name = discard_const_p(char, "minfreeworkitems"),
   17956             :                 .get = py_srvsvc_NetSrvInfo503_get_minfreeworkitems,
   17957             :                 .set = py_srvsvc_NetSrvInfo503_set_minfreeworkitems,
   17958             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17959             :         },
   17960             :         {
   17961             :                 .name = discard_const_p(char, "xactmemsize"),
   17962             :                 .get = py_srvsvc_NetSrvInfo503_get_xactmemsize,
   17963             :                 .set = py_srvsvc_NetSrvInfo503_set_xactmemsize,
   17964             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17965             :         },
   17966             :         {
   17967             :                 .name = discard_const_p(char, "threadpriority"),
   17968             :                 .get = py_srvsvc_NetSrvInfo503_get_threadpriority,
   17969             :                 .set = py_srvsvc_NetSrvInfo503_set_threadpriority,
   17970             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17971             :         },
   17972             :         {
   17973             :                 .name = discard_const_p(char, "maxmpxct"),
   17974             :                 .get = py_srvsvc_NetSrvInfo503_get_maxmpxct,
   17975             :                 .set = py_srvsvc_NetSrvInfo503_set_maxmpxct,
   17976             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17977             :         },
   17978             :         {
   17979             :                 .name = discard_const_p(char, "oplockbreakwait"),
   17980             :                 .get = py_srvsvc_NetSrvInfo503_get_oplockbreakwait,
   17981             :                 .set = py_srvsvc_NetSrvInfo503_set_oplockbreakwait,
   17982             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17983             :         },
   17984             :         {
   17985             :                 .name = discard_const_p(char, "oplockbreakresponsewait"),
   17986             :                 .get = py_srvsvc_NetSrvInfo503_get_oplockbreakresponsewait,
   17987             :                 .set = py_srvsvc_NetSrvInfo503_set_oplockbreakresponsewait,
   17988             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17989             :         },
   17990             :         {
   17991             :                 .name = discard_const_p(char, "enableoplocks"),
   17992             :                 .get = py_srvsvc_NetSrvInfo503_get_enableoplocks,
   17993             :                 .set = py_srvsvc_NetSrvInfo503_set_enableoplocks,
   17994             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17995             :         },
   17996             :         {
   17997             :                 .name = discard_const_p(char, "enableoplockforceclose"),
   17998             :                 .get = py_srvsvc_NetSrvInfo503_get_enableoplockforceclose,
   17999             :                 .set = py_srvsvc_NetSrvInfo503_set_enableoplockforceclose,
   18000             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   18001             :         },
   18002             :         {
   18003             :                 .name = discard_const_p(char, "enablefcbopens"),
   18004             :                 .get = py_srvsvc_NetSrvInfo503_get_enablefcbopens,
   18005             :                 .set = py_srvsvc_NetSrvInfo503_set_enablefcbopens,
   18006             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   18007             :         },
   18008             :         {
   18009             :                 .name = discard_const_p(char, "enableraw"),
   18010             :                 .get = py_srvsvc_NetSrvInfo503_get_enableraw,
   18011             :                 .set = py_srvsvc_NetSrvInfo503_set_enableraw,
   18012             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   18013             :         },
   18014             :         {
   18015             :                 .name = discard_const_p(char, "enablesharednetdrives"),
   18016             :                 .get = py_srvsvc_NetSrvInfo503_get_enablesharednetdrives,
   18017             :                 .set = py_srvsvc_NetSrvInfo503_set_enablesharednetdrives,
   18018             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   18019             :         },
   18020             :         {
   18021             :                 .name = discard_const_p(char, "minfreeconnections"),
   18022             :                 .get = py_srvsvc_NetSrvInfo503_get_minfreeconnections,
   18023             :                 .set = py_srvsvc_NetSrvInfo503_set_minfreeconnections,
   18024             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   18025             :         },
   18026             :         {
   18027             :                 .name = discard_const_p(char, "maxfreeconnections"),
   18028             :                 .get = py_srvsvc_NetSrvInfo503_get_maxfreeconnections,
   18029             :                 .set = py_srvsvc_NetSrvInfo503_set_maxfreeconnections,
   18030             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   18031             :         },
   18032             :         { .name = NULL }
   18033             : };
   18034             : 
   18035           0 : static PyObject *py_srvsvc_NetSrvInfo503_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   18036             : {
   18037           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo503, type);
   18038             : }
   18039             : 
   18040             : 
   18041             : static PyTypeObject srvsvc_NetSrvInfo503_Type = {
   18042             :         PyVarObject_HEAD_INIT(NULL, 0)
   18043             :         .tp_name = "srvsvc.NetSrvInfo503",
   18044             :         .tp_getset = py_srvsvc_NetSrvInfo503_getsetters,
   18045             :         .tp_methods = NULL,
   18046             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   18047             :         .tp_new = py_srvsvc_NetSrvInfo503_new,
   18048             : };
   18049             : 
   18050             : 
   18051           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_sessopen(PyObject *obj, void *closure)
   18052             : {
   18053           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   18054             :         PyObject *py_sessopen;
   18055           0 :         py_sessopen = PyLong_FromUnsignedLongLong((uint32_t)object->sessopen);
   18056           0 :         return py_sessopen;
   18057             : }
   18058             : 
   18059           0 : static int py_srvsvc_NetSrvInfo599_set_sessopen(PyObject *py_obj, PyObject *value, void *closure)
   18060             : {
   18061           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   18062           0 :         if (value == NULL) {
   18063           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessopen");
   18064           0 :                 return -1;
   18065             :         }
   18066             :         {
   18067           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessopen));
   18068           0 :                 if (PyLong_Check(value)) {
   18069             :                         unsigned long long test_var;
   18070           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18071           0 :                         if (PyErr_Occurred() != NULL) {
   18072           0 :                                 return -1;
   18073             :                         }
   18074           0 :                         if (test_var > uint_max) {
   18075           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18076             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18077           0 :                                 return -1;
   18078             :                         }
   18079           0 :                         object->sessopen = test_var;
   18080             :                 } else {
   18081           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18082             :                           PyLong_Type.tp_name);
   18083           0 :                         return -1;
   18084             :                 }
   18085             :         }
   18086           0 :         return 0;
   18087             : }
   18088             : 
   18089           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_sesssvc(PyObject *obj, void *closure)
   18090             : {
   18091           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   18092             :         PyObject *py_sesssvc;
   18093           0 :         py_sesssvc = PyLong_FromUnsignedLongLong((uint32_t)object->sesssvc);
   18094           0 :         return py_sesssvc;
   18095             : }
   18096             : 
   18097           0 : static int py_srvsvc_NetSrvInfo599_set_sesssvc(PyObject *py_obj, PyObject *value, void *closure)
   18098             : {
   18099           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   18100           0 :         if (value == NULL) {
   18101           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sesssvc");
   18102           0 :                 return -1;
   18103             :         }
   18104             :         {
   18105           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sesssvc));
   18106           0 :                 if (PyLong_Check(value)) {
   18107             :                         unsigned long long test_var;
   18108           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18109           0 :                         if (PyErr_Occurred() != NULL) {
   18110           0 :                                 return -1;
   18111             :                         }
   18112           0 :                         if (test_var > uint_max) {
   18113           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18114             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18115           0 :                                 return -1;
   18116             :                         }
   18117           0 :                         object->sesssvc = test_var;
   18118             :                 } else {
   18119           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18120             :                           PyLong_Type.tp_name);
   18121           0 :                         return -1;
   18122             :                 }
   18123             :         }
   18124           0 :         return 0;
   18125             : }
   18126             : 
   18127           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_opensearch(PyObject *obj, void *closure)
   18128             : {
   18129           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   18130             :         PyObject *py_opensearch;
   18131           0 :         py_opensearch = PyLong_FromUnsignedLongLong((uint32_t)object->opensearch);
   18132           0 :         return py_opensearch;
   18133             : }
   18134             : 
   18135           0 : static int py_srvsvc_NetSrvInfo599_set_opensearch(PyObject *py_obj, PyObject *value, void *closure)
   18136             : {
   18137           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   18138           0 :         if (value == NULL) {
   18139           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->opensearch");
   18140           0 :                 return -1;
   18141             :         }
   18142             :         {
   18143           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->opensearch));
   18144           0 :                 if (PyLong_Check(value)) {
   18145             :                         unsigned long long test_var;
   18146           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18147           0 :                         if (PyErr_Occurred() != NULL) {
   18148           0 :                                 return -1;
   18149             :                         }
   18150           0 :                         if (test_var > uint_max) {
   18151           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18152             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18153           0 :                                 return -1;
   18154             :                         }
   18155           0 :                         object->opensearch = test_var;
   18156             :                 } else {
   18157           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18158             :                           PyLong_Type.tp_name);
   18159           0 :                         return -1;
   18160             :                 }
   18161             :         }
   18162           0 :         return 0;
   18163             : }
   18164             : 
   18165           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_sizereqbufs(PyObject *obj, void *closure)
   18166             : {
   18167           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   18168             :         PyObject *py_sizereqbufs;
   18169           0 :         py_sizereqbufs = PyLong_FromUnsignedLongLong((uint32_t)object->sizereqbufs);
   18170           0 :         return py_sizereqbufs;
   18171             : }
   18172             : 
   18173           0 : static int py_srvsvc_NetSrvInfo599_set_sizereqbufs(PyObject *py_obj, PyObject *value, void *closure)
   18174             : {
   18175           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   18176           0 :         if (value == NULL) {
   18177           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sizereqbufs");
   18178           0 :                 return -1;
   18179             :         }
   18180             :         {
   18181           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sizereqbufs));
   18182           0 :                 if (PyLong_Check(value)) {
   18183             :                         unsigned long long test_var;
   18184           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18185           0 :                         if (PyErr_Occurred() != NULL) {
   18186           0 :                                 return -1;
   18187             :                         }
   18188           0 :                         if (test_var > uint_max) {
   18189           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18190             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18191           0 :                                 return -1;
   18192             :                         }
   18193           0 :                         object->sizereqbufs = test_var;
   18194             :                 } else {
   18195           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18196             :                           PyLong_Type.tp_name);
   18197           0 :                         return -1;
   18198             :                 }
   18199             :         }
   18200           0 :         return 0;
   18201             : }
   18202             : 
   18203           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_initworkitems(PyObject *obj, void *closure)
   18204             : {
   18205           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   18206             :         PyObject *py_initworkitems;
   18207           0 :         py_initworkitems = PyLong_FromUnsignedLongLong((uint32_t)object->initworkitems);
   18208           0 :         return py_initworkitems;
   18209             : }
   18210             : 
   18211           0 : static int py_srvsvc_NetSrvInfo599_set_initworkitems(PyObject *py_obj, PyObject *value, void *closure)
   18212             : {
   18213           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   18214           0 :         if (value == NULL) {
   18215           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->initworkitems");
   18216           0 :                 return -1;
   18217             :         }
   18218             :         {
   18219           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initworkitems));
   18220           0 :                 if (PyLong_Check(value)) {
   18221             :                         unsigned long long test_var;
   18222           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18223           0 :                         if (PyErr_Occurred() != NULL) {
   18224           0 :                                 return -1;
   18225             :                         }
   18226           0 :                         if (test_var > uint_max) {
   18227           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18228             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18229           0 :                                 return -1;
   18230             :                         }
   18231           0 :                         object->initworkitems = test_var;
   18232             :                 } else {
   18233           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18234             :                           PyLong_Type.tp_name);
   18235           0 :                         return -1;
   18236             :                 }
   18237             :         }
   18238           0 :         return 0;
   18239             : }
   18240             : 
   18241           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_maxworkitems(PyObject *obj, void *closure)
   18242             : {
   18243           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   18244             :         PyObject *py_maxworkitems;
   18245           0 :         py_maxworkitems = PyLong_FromUnsignedLongLong((uint32_t)object->maxworkitems);
   18246           0 :         return py_maxworkitems;
   18247             : }
   18248             : 
   18249           0 : static int py_srvsvc_NetSrvInfo599_set_maxworkitems(PyObject *py_obj, PyObject *value, void *closure)
   18250             : {
   18251           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   18252           0 :         if (value == NULL) {
   18253           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxworkitems");
   18254           0 :                 return -1;
   18255             :         }
   18256             :         {
   18257           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxworkitems));
   18258           0 :                 if (PyLong_Check(value)) {
   18259             :                         unsigned long long test_var;
   18260           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18261           0 :                         if (PyErr_Occurred() != NULL) {
   18262           0 :                                 return -1;
   18263             :                         }
   18264           0 :                         if (test_var > uint_max) {
   18265           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18266             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18267           0 :                                 return -1;
   18268             :                         }
   18269           0 :                         object->maxworkitems = test_var;
   18270             :                 } else {
   18271           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18272             :                           PyLong_Type.tp_name);
   18273           0 :                         return -1;
   18274             :                 }
   18275             :         }
   18276           0 :         return 0;
   18277             : }
   18278             : 
   18279           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_rawworkitems(PyObject *obj, void *closure)
   18280             : {
   18281           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   18282             :         PyObject *py_rawworkitems;
   18283           0 :         py_rawworkitems = PyLong_FromUnsignedLongLong((uint32_t)object->rawworkitems);
   18284           0 :         return py_rawworkitems;
   18285             : }
   18286             : 
   18287           0 : static int py_srvsvc_NetSrvInfo599_set_rawworkitems(PyObject *py_obj, PyObject *value, void *closure)
   18288             : {
   18289           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   18290           0 :         if (value == NULL) {
   18291           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rawworkitems");
   18292           0 :                 return -1;
   18293             :         }
   18294             :         {
   18295           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rawworkitems));
   18296           0 :                 if (PyLong_Check(value)) {
   18297             :                         unsigned long long test_var;
   18298           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18299           0 :                         if (PyErr_Occurred() != NULL) {
   18300           0 :                                 return -1;
   18301             :                         }
   18302           0 :                         if (test_var > uint_max) {
   18303           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18304             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18305           0 :                                 return -1;
   18306             :                         }
   18307           0 :                         object->rawworkitems = test_var;
   18308             :                 } else {
   18309           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18310             :                           PyLong_Type.tp_name);
   18311           0 :                         return -1;
   18312             :                 }
   18313             :         }
   18314           0 :         return 0;
   18315             : }
   18316             : 
   18317           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_irpstacksize(PyObject *obj, void *closure)
   18318             : {
   18319           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   18320             :         PyObject *py_irpstacksize;
   18321           0 :         py_irpstacksize = PyLong_FromUnsignedLongLong((uint32_t)object->irpstacksize);
   18322           0 :         return py_irpstacksize;
   18323             : }
   18324             : 
   18325           0 : static int py_srvsvc_NetSrvInfo599_set_irpstacksize(PyObject *py_obj, PyObject *value, void *closure)
   18326             : {
   18327           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   18328           0 :         if (value == NULL) {
   18329           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->irpstacksize");
   18330           0 :                 return -1;
   18331             :         }
   18332             :         {
   18333           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->irpstacksize));
   18334           0 :                 if (PyLong_Check(value)) {
   18335             :                         unsigned long long test_var;
   18336           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18337           0 :                         if (PyErr_Occurred() != NULL) {
   18338           0 :                                 return -1;
   18339             :                         }
   18340           0 :                         if (test_var > uint_max) {
   18341           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18342             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18343           0 :                                 return -1;
   18344             :                         }
   18345           0 :                         object->irpstacksize = test_var;
   18346             :                 } else {
   18347           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18348             :                           PyLong_Type.tp_name);
   18349           0 :                         return -1;
   18350             :                 }
   18351             :         }
   18352           0 :         return 0;
   18353             : }
   18354             : 
   18355           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_maxrawbuflen(PyObject *obj, void *closure)
   18356             : {
   18357           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   18358             :         PyObject *py_maxrawbuflen;
   18359           0 :         py_maxrawbuflen = PyLong_FromUnsignedLongLong((uint32_t)object->maxrawbuflen);
   18360           0 :         return py_maxrawbuflen;
   18361             : }
   18362             : 
   18363           0 : static int py_srvsvc_NetSrvInfo599_set_maxrawbuflen(PyObject *py_obj, PyObject *value, void *closure)
   18364             : {
   18365           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   18366           0 :         if (value == NULL) {
   18367           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxrawbuflen");
   18368           0 :                 return -1;
   18369             :         }
   18370             :         {
   18371           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxrawbuflen));
   18372           0 :                 if (PyLong_Check(value)) {
   18373             :                         unsigned long long test_var;
   18374           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18375           0 :                         if (PyErr_Occurred() != NULL) {
   18376           0 :                                 return -1;
   18377             :                         }
   18378           0 :                         if (test_var > uint_max) {
   18379           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18380             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18381           0 :                                 return -1;
   18382             :                         }
   18383           0 :                         object->maxrawbuflen = test_var;
   18384             :                 } else {
   18385           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18386             :                           PyLong_Type.tp_name);
   18387           0 :                         return -1;
   18388             :                 }
   18389             :         }
   18390           0 :         return 0;
   18391             : }
   18392             : 
   18393           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_sessusers(PyObject *obj, void *closure)
   18394             : {
   18395           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   18396             :         PyObject *py_sessusers;
   18397           0 :         py_sessusers = PyLong_FromUnsignedLongLong((uint32_t)object->sessusers);
   18398           0 :         return py_sessusers;
   18399             : }
   18400             : 
   18401           0 : static int py_srvsvc_NetSrvInfo599_set_sessusers(PyObject *py_obj, PyObject *value, void *closure)
   18402             : {
   18403           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   18404           0 :         if (value == NULL) {
   18405           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessusers");
   18406           0 :                 return -1;
   18407             :         }
   18408             :         {
   18409           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessusers));
   18410           0 :                 if (PyLong_Check(value)) {
   18411             :                         unsigned long long test_var;
   18412           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18413           0 :                         if (PyErr_Occurred() != NULL) {
   18414           0 :                                 return -1;
   18415             :                         }
   18416           0 :                         if (test_var > uint_max) {
   18417           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18418             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18419           0 :                                 return -1;
   18420             :                         }
   18421           0 :                         object->sessusers = test_var;
   18422             :                 } else {
   18423           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18424             :                           PyLong_Type.tp_name);
   18425           0 :                         return -1;
   18426             :                 }
   18427             :         }
   18428           0 :         return 0;
   18429             : }
   18430             : 
   18431           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_sessconns(PyObject *obj, void *closure)
   18432             : {
   18433           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   18434             :         PyObject *py_sessconns;
   18435           0 :         py_sessconns = PyLong_FromUnsignedLongLong((uint32_t)object->sessconns);
   18436           0 :         return py_sessconns;
   18437             : }
   18438             : 
   18439           0 : static int py_srvsvc_NetSrvInfo599_set_sessconns(PyObject *py_obj, PyObject *value, void *closure)
   18440             : {
   18441           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   18442           0 :         if (value == NULL) {
   18443           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessconns");
   18444           0 :                 return -1;
   18445             :         }
   18446             :         {
   18447           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessconns));
   18448           0 :                 if (PyLong_Check(value)) {
   18449             :                         unsigned long long test_var;
   18450           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18451           0 :                         if (PyErr_Occurred() != NULL) {
   18452           0 :                                 return -1;
   18453             :                         }
   18454           0 :                         if (test_var > uint_max) {
   18455           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18456             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18457           0 :                                 return -1;
   18458             :                         }
   18459           0 :                         object->sessconns = test_var;
   18460             :                 } else {
   18461           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18462             :                           PyLong_Type.tp_name);
   18463           0 :                         return -1;
   18464             :                 }
   18465             :         }
   18466           0 :         return 0;
   18467             : }
   18468             : 
   18469           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_maxpagedmemoryusage(PyObject *obj, void *closure)
   18470             : {
   18471           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   18472             :         PyObject *py_maxpagedmemoryusage;
   18473           0 :         py_maxpagedmemoryusage = PyLong_FromUnsignedLongLong((uint32_t)object->maxpagedmemoryusage);
   18474           0 :         return py_maxpagedmemoryusage;
   18475             : }
   18476             : 
   18477           0 : static int py_srvsvc_NetSrvInfo599_set_maxpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
   18478             : {
   18479           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   18480           0 :         if (value == NULL) {
   18481           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxpagedmemoryusage");
   18482           0 :                 return -1;
   18483             :         }
   18484             :         {
   18485           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxpagedmemoryusage));
   18486           0 :                 if (PyLong_Check(value)) {
   18487             :                         unsigned long long test_var;
   18488           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18489           0 :                         if (PyErr_Occurred() != NULL) {
   18490           0 :                                 return -1;
   18491             :                         }
   18492           0 :                         if (test_var > uint_max) {
   18493           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18494             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18495           0 :                                 return -1;
   18496             :                         }
   18497           0 :                         object->maxpagedmemoryusage = test_var;
   18498             :                 } else {
   18499           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18500             :                           PyLong_Type.tp_name);
   18501           0 :                         return -1;
   18502             :                 }
   18503             :         }
   18504           0 :         return 0;
   18505             : }
   18506             : 
   18507           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_maxnonpagedmemoryusage(PyObject *obj, void *closure)
   18508             : {
   18509           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   18510             :         PyObject *py_maxnonpagedmemoryusage;
   18511           0 :         py_maxnonpagedmemoryusage = PyLong_FromUnsignedLongLong((uint32_t)object->maxnonpagedmemoryusage);
   18512           0 :         return py_maxnonpagedmemoryusage;
   18513             : }
   18514             : 
   18515           0 : static int py_srvsvc_NetSrvInfo599_set_maxnonpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
   18516             : {
   18517           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   18518           0 :         if (value == NULL) {
   18519           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxnonpagedmemoryusage");
   18520           0 :                 return -1;
   18521             :         }
   18522             :         {
   18523           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxnonpagedmemoryusage));
   18524           0 :                 if (PyLong_Check(value)) {
   18525             :                         unsigned long long test_var;
   18526           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18527           0 :                         if (PyErr_Occurred() != NULL) {
   18528           0 :                                 return -1;
   18529             :                         }
   18530           0 :                         if (test_var > uint_max) {
   18531           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18532             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18533           0 :                                 return -1;
   18534             :                         }
   18535           0 :                         object->maxnonpagedmemoryusage = test_var;
   18536             :                 } else {
   18537           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18538             :                           PyLong_Type.tp_name);
   18539           0 :                         return -1;
   18540             :                 }
   18541             :         }
   18542           0 :         return 0;
   18543             : }
   18544             : 
   18545           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_enablesoftcompat(PyObject *obj, void *closure)
   18546             : {
   18547           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   18548             :         PyObject *py_enablesoftcompat;
   18549           0 :         py_enablesoftcompat = PyLong_FromUnsignedLongLong((uint32_t)object->enablesoftcompat);
   18550           0 :         return py_enablesoftcompat;
   18551             : }
   18552             : 
   18553           0 : static int py_srvsvc_NetSrvInfo599_set_enablesoftcompat(PyObject *py_obj, PyObject *value, void *closure)
   18554             : {
   18555           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   18556           0 :         if (value == NULL) {
   18557           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enablesoftcompat");
   18558           0 :                 return -1;
   18559             :         }
   18560             :         {
   18561           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesoftcompat));
   18562           0 :                 if (PyLong_Check(value)) {
   18563             :                         unsigned long long test_var;
   18564           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18565           0 :                         if (PyErr_Occurred() != NULL) {
   18566           0 :                                 return -1;
   18567             :                         }
   18568           0 :                         if (test_var > uint_max) {
   18569           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18570             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18571           0 :                                 return -1;
   18572             :                         }
   18573           0 :                         object->enablesoftcompat = test_var;
   18574             :                 } else {
   18575           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18576             :                           PyLong_Type.tp_name);
   18577           0 :                         return -1;
   18578             :                 }
   18579             :         }
   18580           0 :         return 0;
   18581             : }
   18582             : 
   18583           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_enableforcedlogoff(PyObject *obj, void *closure)
   18584             : {
   18585           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   18586             :         PyObject *py_enableforcedlogoff;
   18587           0 :         py_enableforcedlogoff = PyLong_FromUnsignedLongLong((uint32_t)object->enableforcedlogoff);
   18588           0 :         return py_enableforcedlogoff;
   18589             : }
   18590             : 
   18591           0 : static int py_srvsvc_NetSrvInfo599_set_enableforcedlogoff(PyObject *py_obj, PyObject *value, void *closure)
   18592             : {
   18593           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   18594           0 :         if (value == NULL) {
   18595           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enableforcedlogoff");
   18596           0 :                 return -1;
   18597             :         }
   18598             :         {
   18599           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableforcedlogoff));
   18600           0 :                 if (PyLong_Check(value)) {
   18601             :                         unsigned long long test_var;
   18602           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18603           0 :                         if (PyErr_Occurred() != NULL) {
   18604           0 :                                 return -1;
   18605             :                         }
   18606           0 :                         if (test_var > uint_max) {
   18607           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18608             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18609           0 :                                 return -1;
   18610             :                         }
   18611           0 :                         object->enableforcedlogoff = test_var;
   18612             :                 } else {
   18613           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18614             :                           PyLong_Type.tp_name);
   18615           0 :                         return -1;
   18616             :                 }
   18617             :         }
   18618           0 :         return 0;
   18619             : }
   18620             : 
   18621           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_timesource(PyObject *obj, void *closure)
   18622             : {
   18623           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   18624             :         PyObject *py_timesource;
   18625           0 :         py_timesource = PyLong_FromUnsignedLongLong((uint32_t)object->timesource);
   18626           0 :         return py_timesource;
   18627             : }
   18628             : 
   18629           0 : static int py_srvsvc_NetSrvInfo599_set_timesource(PyObject *py_obj, PyObject *value, void *closure)
   18630             : {
   18631           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   18632           0 :         if (value == NULL) {
   18633           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->timesource");
   18634           0 :                 return -1;
   18635             :         }
   18636             :         {
   18637           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timesource));
   18638           0 :                 if (PyLong_Check(value)) {
   18639             :                         unsigned long long test_var;
   18640           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18641           0 :                         if (PyErr_Occurred() != NULL) {
   18642           0 :                                 return -1;
   18643             :                         }
   18644           0 :                         if (test_var > uint_max) {
   18645           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18646             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18647           0 :                                 return -1;
   18648             :                         }
   18649           0 :                         object->timesource = test_var;
   18650             :                 } else {
   18651           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18652             :                           PyLong_Type.tp_name);
   18653           0 :                         return -1;
   18654             :                 }
   18655             :         }
   18656           0 :         return 0;
   18657             : }
   18658             : 
   18659           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_acceptdownlevelapis(PyObject *obj, void *closure)
   18660             : {
   18661           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   18662             :         PyObject *py_acceptdownlevelapis;
   18663           0 :         py_acceptdownlevelapis = PyLong_FromUnsignedLongLong((uint32_t)object->acceptdownlevelapis);
   18664           0 :         return py_acceptdownlevelapis;
   18665             : }
   18666             : 
   18667           0 : static int py_srvsvc_NetSrvInfo599_set_acceptdownlevelapis(PyObject *py_obj, PyObject *value, void *closure)
   18668             : {
   18669           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   18670           0 :         if (value == NULL) {
   18671           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->acceptdownlevelapis");
   18672           0 :                 return -1;
   18673             :         }
   18674             :         {
   18675           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->acceptdownlevelapis));
   18676           0 :                 if (PyLong_Check(value)) {
   18677             :                         unsigned long long test_var;
   18678           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18679           0 :                         if (PyErr_Occurred() != NULL) {
   18680           0 :                                 return -1;
   18681             :                         }
   18682           0 :                         if (test_var > uint_max) {
   18683           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18684             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18685           0 :                                 return -1;
   18686             :                         }
   18687           0 :                         object->acceptdownlevelapis = test_var;
   18688             :                 } else {
   18689           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18690             :                           PyLong_Type.tp_name);
   18691           0 :                         return -1;
   18692             :                 }
   18693             :         }
   18694           0 :         return 0;
   18695             : }
   18696             : 
   18697           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_lmannounce(PyObject *obj, void *closure)
   18698             : {
   18699           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   18700             :         PyObject *py_lmannounce;
   18701           0 :         py_lmannounce = PyLong_FromUnsignedLongLong((uint32_t)object->lmannounce);
   18702           0 :         return py_lmannounce;
   18703             : }
   18704             : 
   18705           0 : static int py_srvsvc_NetSrvInfo599_set_lmannounce(PyObject *py_obj, PyObject *value, void *closure)
   18706             : {
   18707           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   18708           0 :         if (value == NULL) {
   18709           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lmannounce");
   18710           0 :                 return -1;
   18711             :         }
   18712             :         {
   18713           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lmannounce));
   18714           0 :                 if (PyLong_Check(value)) {
   18715             :                         unsigned long long test_var;
   18716           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18717           0 :                         if (PyErr_Occurred() != NULL) {
   18718           0 :                                 return -1;
   18719             :                         }
   18720           0 :                         if (test_var > uint_max) {
   18721           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18722             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18723           0 :                                 return -1;
   18724             :                         }
   18725           0 :                         object->lmannounce = test_var;
   18726             :                 } else {
   18727           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18728             :                           PyLong_Type.tp_name);
   18729           0 :                         return -1;
   18730             :                 }
   18731             :         }
   18732           0 :         return 0;
   18733             : }
   18734             : 
   18735           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_domain(PyObject *obj, void *closure)
   18736             : {
   18737           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   18738             :         PyObject *py_domain;
   18739           0 :         if (object->domain == NULL) {
   18740           0 :                 Py_RETURN_NONE;
   18741             :         }
   18742           0 :         if (object->domain == NULL) {
   18743           0 :                 py_domain = Py_None;
   18744           0 :                 Py_INCREF(py_domain);
   18745             :         } else {
   18746           0 :                 if (object->domain == NULL) {
   18747           0 :                         py_domain = Py_None;
   18748           0 :                         Py_INCREF(py_domain);
   18749             :                 } else {
   18750           0 :                         py_domain = PyUnicode_Decode(object->domain, strlen(object->domain), "utf-8", "ignore");
   18751             :                 }
   18752             :         }
   18753           0 :         return py_domain;
   18754             : }
   18755             : 
   18756           0 : static int py_srvsvc_NetSrvInfo599_set_domain(PyObject *py_obj, PyObject *value, void *closure)
   18757             : {
   18758           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   18759           0 :         if (value == NULL) {
   18760           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain");
   18761           0 :                 return -1;
   18762             :         }
   18763           0 :         if (value == Py_None) {
   18764           0 :                 object->domain = NULL;
   18765             :         } else {
   18766           0 :                 object->domain = NULL;
   18767             :                 {
   18768             :                         const char *test_str;
   18769             :                         const char *talloc_str;
   18770           0 :                         PyObject *unicode = NULL;
   18771           0 :                         if (PyUnicode_Check(value)) {
   18772           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   18773           0 :                                 if (unicode == NULL) {
   18774           0 :                                         PyErr_NoMemory();
   18775           0 :                                         return -1;
   18776             :                                 }
   18777           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   18778           0 :                         } else if (PyBytes_Check(value)) {
   18779           0 :                                 test_str = PyBytes_AS_STRING(value);
   18780             :                         } else {
   18781           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   18782           0 :                                 return -1;
   18783             :                         }
   18784           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   18785           0 :                         if (unicode != NULL) {
   18786           0 :                                 Py_DECREF(unicode);
   18787             :                         }
   18788           0 :                         if (talloc_str == NULL) {
   18789           0 :                                 PyErr_NoMemory();
   18790           0 :                                 return -1;
   18791             :                         }
   18792           0 :                         object->domain = talloc_str;
   18793             :                 }
   18794             :         }
   18795           0 :         return 0;
   18796             : }
   18797             : 
   18798           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_maxcopyreadlen(PyObject *obj, void *closure)
   18799             : {
   18800           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   18801             :         PyObject *py_maxcopyreadlen;
   18802           0 :         py_maxcopyreadlen = PyLong_FromUnsignedLongLong((uint32_t)object->maxcopyreadlen);
   18803           0 :         return py_maxcopyreadlen;
   18804             : }
   18805             : 
   18806           0 : static int py_srvsvc_NetSrvInfo599_set_maxcopyreadlen(PyObject *py_obj, PyObject *value, void *closure)
   18807             : {
   18808           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   18809           0 :         if (value == NULL) {
   18810           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxcopyreadlen");
   18811           0 :                 return -1;
   18812             :         }
   18813             :         {
   18814           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxcopyreadlen));
   18815           0 :                 if (PyLong_Check(value)) {
   18816             :                         unsigned long long test_var;
   18817           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18818           0 :                         if (PyErr_Occurred() != NULL) {
   18819           0 :                                 return -1;
   18820             :                         }
   18821           0 :                         if (test_var > uint_max) {
   18822           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18823             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18824           0 :                                 return -1;
   18825             :                         }
   18826           0 :                         object->maxcopyreadlen = test_var;
   18827             :                 } else {
   18828           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18829             :                           PyLong_Type.tp_name);
   18830           0 :                         return -1;
   18831             :                 }
   18832             :         }
   18833           0 :         return 0;
   18834             : }
   18835             : 
   18836           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_maxcopywritelen(PyObject *obj, void *closure)
   18837             : {
   18838           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   18839             :         PyObject *py_maxcopywritelen;
   18840           0 :         py_maxcopywritelen = PyLong_FromUnsignedLongLong((uint32_t)object->maxcopywritelen);
   18841           0 :         return py_maxcopywritelen;
   18842             : }
   18843             : 
   18844           0 : static int py_srvsvc_NetSrvInfo599_set_maxcopywritelen(PyObject *py_obj, PyObject *value, void *closure)
   18845             : {
   18846           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   18847           0 :         if (value == NULL) {
   18848           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxcopywritelen");
   18849           0 :                 return -1;
   18850             :         }
   18851             :         {
   18852           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxcopywritelen));
   18853           0 :                 if (PyLong_Check(value)) {
   18854             :                         unsigned long long test_var;
   18855           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18856           0 :                         if (PyErr_Occurred() != NULL) {
   18857           0 :                                 return -1;
   18858             :                         }
   18859           0 :                         if (test_var > uint_max) {
   18860           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18861             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18862           0 :                                 return -1;
   18863             :                         }
   18864           0 :                         object->maxcopywritelen = test_var;
   18865             :                 } else {
   18866           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18867             :                           PyLong_Type.tp_name);
   18868           0 :                         return -1;
   18869             :                 }
   18870             :         }
   18871           0 :         return 0;
   18872             : }
   18873             : 
   18874           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_minkeepsearch(PyObject *obj, void *closure)
   18875             : {
   18876           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   18877             :         PyObject *py_minkeepsearch;
   18878           0 :         py_minkeepsearch = PyLong_FromUnsignedLongLong((uint32_t)object->minkeepsearch);
   18879           0 :         return py_minkeepsearch;
   18880             : }
   18881             : 
   18882           0 : static int py_srvsvc_NetSrvInfo599_set_minkeepsearch(PyObject *py_obj, PyObject *value, void *closure)
   18883             : {
   18884           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   18885           0 :         if (value == NULL) {
   18886           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minkeepsearch");
   18887           0 :                 return -1;
   18888             :         }
   18889             :         {
   18890           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minkeepsearch));
   18891           0 :                 if (PyLong_Check(value)) {
   18892             :                         unsigned long long test_var;
   18893           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18894           0 :                         if (PyErr_Occurred() != NULL) {
   18895           0 :                                 return -1;
   18896             :                         }
   18897           0 :                         if (test_var > uint_max) {
   18898           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18899             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18900           0 :                                 return -1;
   18901             :                         }
   18902           0 :                         object->minkeepsearch = test_var;
   18903             :                 } else {
   18904           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18905             :                           PyLong_Type.tp_name);
   18906           0 :                         return -1;
   18907             :                 }
   18908             :         }
   18909           0 :         return 0;
   18910             : }
   18911             : 
   18912           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_minkeepcomplsearch(PyObject *obj, void *closure)
   18913             : {
   18914           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   18915             :         PyObject *py_minkeepcomplsearch;
   18916           0 :         py_minkeepcomplsearch = PyLong_FromUnsignedLongLong((uint32_t)object->minkeepcomplsearch);
   18917           0 :         return py_minkeepcomplsearch;
   18918             : }
   18919             : 
   18920           0 : static int py_srvsvc_NetSrvInfo599_set_minkeepcomplsearch(PyObject *py_obj, PyObject *value, void *closure)
   18921             : {
   18922           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   18923           0 :         if (value == NULL) {
   18924           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minkeepcomplsearch");
   18925           0 :                 return -1;
   18926             :         }
   18927             :         {
   18928           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minkeepcomplsearch));
   18929           0 :                 if (PyLong_Check(value)) {
   18930             :                         unsigned long long test_var;
   18931           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18932           0 :                         if (PyErr_Occurred() != NULL) {
   18933           0 :                                 return -1;
   18934             :                         }
   18935           0 :                         if (test_var > uint_max) {
   18936           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18937             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18938           0 :                                 return -1;
   18939             :                         }
   18940           0 :                         object->minkeepcomplsearch = test_var;
   18941             :                 } else {
   18942           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18943             :                           PyLong_Type.tp_name);
   18944           0 :                         return -1;
   18945             :                 }
   18946             :         }
   18947           0 :         return 0;
   18948             : }
   18949             : 
   18950           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_maxkeepcomplsearch(PyObject *obj, void *closure)
   18951             : {
   18952           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   18953             :         PyObject *py_maxkeepcomplsearch;
   18954           0 :         py_maxkeepcomplsearch = PyLong_FromUnsignedLongLong((uint32_t)object->maxkeepcomplsearch);
   18955           0 :         return py_maxkeepcomplsearch;
   18956             : }
   18957             : 
   18958           0 : static int py_srvsvc_NetSrvInfo599_set_maxkeepcomplsearch(PyObject *py_obj, PyObject *value, void *closure)
   18959             : {
   18960           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   18961           0 :         if (value == NULL) {
   18962           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxkeepcomplsearch");
   18963           0 :                 return -1;
   18964             :         }
   18965             :         {
   18966           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxkeepcomplsearch));
   18967           0 :                 if (PyLong_Check(value)) {
   18968             :                         unsigned long long test_var;
   18969           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18970           0 :                         if (PyErr_Occurred() != NULL) {
   18971           0 :                                 return -1;
   18972             :                         }
   18973           0 :                         if (test_var > uint_max) {
   18974           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18975             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18976           0 :                                 return -1;
   18977             :                         }
   18978           0 :                         object->maxkeepcomplsearch = test_var;
   18979             :                 } else {
   18980           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18981             :                           PyLong_Type.tp_name);
   18982           0 :                         return -1;
   18983             :                 }
   18984             :         }
   18985           0 :         return 0;
   18986             : }
   18987             : 
   18988           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_threadcountadd(PyObject *obj, void *closure)
   18989             : {
   18990           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   18991             :         PyObject *py_threadcountadd;
   18992           0 :         py_threadcountadd = PyLong_FromUnsignedLongLong((uint32_t)object->threadcountadd);
   18993           0 :         return py_threadcountadd;
   18994             : }
   18995             : 
   18996           0 : static int py_srvsvc_NetSrvInfo599_set_threadcountadd(PyObject *py_obj, PyObject *value, void *closure)
   18997             : {
   18998           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   18999           0 :         if (value == NULL) {
   19000           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->threadcountadd");
   19001           0 :                 return -1;
   19002             :         }
   19003             :         {
   19004           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->threadcountadd));
   19005           0 :                 if (PyLong_Check(value)) {
   19006             :                         unsigned long long test_var;
   19007           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19008           0 :                         if (PyErr_Occurred() != NULL) {
   19009           0 :                                 return -1;
   19010             :                         }
   19011           0 :                         if (test_var > uint_max) {
   19012           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19013             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19014           0 :                                 return -1;
   19015             :                         }
   19016           0 :                         object->threadcountadd = test_var;
   19017             :                 } else {
   19018           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19019             :                           PyLong_Type.tp_name);
   19020           0 :                         return -1;
   19021             :                 }
   19022             :         }
   19023           0 :         return 0;
   19024             : }
   19025             : 
   19026           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_numlockthreads(PyObject *obj, void *closure)
   19027             : {
   19028           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   19029             :         PyObject *py_numlockthreads;
   19030           0 :         py_numlockthreads = PyLong_FromUnsignedLongLong((uint32_t)object->numlockthreads);
   19031           0 :         return py_numlockthreads;
   19032             : }
   19033             : 
   19034           0 : static int py_srvsvc_NetSrvInfo599_set_numlockthreads(PyObject *py_obj, PyObject *value, void *closure)
   19035             : {
   19036           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   19037           0 :         if (value == NULL) {
   19038           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->numlockthreads");
   19039           0 :                 return -1;
   19040             :         }
   19041             :         {
   19042           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->numlockthreads));
   19043           0 :                 if (PyLong_Check(value)) {
   19044             :                         unsigned long long test_var;
   19045           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19046           0 :                         if (PyErr_Occurred() != NULL) {
   19047           0 :                                 return -1;
   19048             :                         }
   19049           0 :                         if (test_var > uint_max) {
   19050           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19051             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19052           0 :                                 return -1;
   19053             :                         }
   19054           0 :                         object->numlockthreads = test_var;
   19055             :                 } else {
   19056           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19057             :                           PyLong_Type.tp_name);
   19058           0 :                         return -1;
   19059             :                 }
   19060             :         }
   19061           0 :         return 0;
   19062             : }
   19063             : 
   19064           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_scavtimeout(PyObject *obj, void *closure)
   19065             : {
   19066           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   19067             :         PyObject *py_scavtimeout;
   19068           0 :         py_scavtimeout = PyLong_FromUnsignedLongLong((uint32_t)object->scavtimeout);
   19069           0 :         return py_scavtimeout;
   19070             : }
   19071             : 
   19072           0 : static int py_srvsvc_NetSrvInfo599_set_scavtimeout(PyObject *py_obj, PyObject *value, void *closure)
   19073             : {
   19074           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   19075           0 :         if (value == NULL) {
   19076           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->scavtimeout");
   19077           0 :                 return -1;
   19078             :         }
   19079             :         {
   19080           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->scavtimeout));
   19081           0 :                 if (PyLong_Check(value)) {
   19082             :                         unsigned long long test_var;
   19083           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19084           0 :                         if (PyErr_Occurred() != NULL) {
   19085           0 :                                 return -1;
   19086             :                         }
   19087           0 :                         if (test_var > uint_max) {
   19088           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19089             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19090           0 :                                 return -1;
   19091             :                         }
   19092           0 :                         object->scavtimeout = test_var;
   19093             :                 } else {
   19094           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19095             :                           PyLong_Type.tp_name);
   19096           0 :                         return -1;
   19097             :                 }
   19098             :         }
   19099           0 :         return 0;
   19100             : }
   19101             : 
   19102           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_minrcvqueue(PyObject *obj, void *closure)
   19103             : {
   19104           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   19105             :         PyObject *py_minrcvqueue;
   19106           0 :         py_minrcvqueue = PyLong_FromUnsignedLongLong((uint32_t)object->minrcvqueue);
   19107           0 :         return py_minrcvqueue;
   19108             : }
   19109             : 
   19110           0 : static int py_srvsvc_NetSrvInfo599_set_minrcvqueue(PyObject *py_obj, PyObject *value, void *closure)
   19111             : {
   19112           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   19113           0 :         if (value == NULL) {
   19114           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minrcvqueue");
   19115           0 :                 return -1;
   19116             :         }
   19117             :         {
   19118           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minrcvqueue));
   19119           0 :                 if (PyLong_Check(value)) {
   19120             :                         unsigned long long test_var;
   19121           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19122           0 :                         if (PyErr_Occurred() != NULL) {
   19123           0 :                                 return -1;
   19124             :                         }
   19125           0 :                         if (test_var > uint_max) {
   19126           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19127             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19128           0 :                                 return -1;
   19129             :                         }
   19130           0 :                         object->minrcvqueue = test_var;
   19131             :                 } else {
   19132           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19133             :                           PyLong_Type.tp_name);
   19134           0 :                         return -1;
   19135             :                 }
   19136             :         }
   19137           0 :         return 0;
   19138             : }
   19139             : 
   19140           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_minfreeworkitems(PyObject *obj, void *closure)
   19141             : {
   19142           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   19143             :         PyObject *py_minfreeworkitems;
   19144           0 :         py_minfreeworkitems = PyLong_FromUnsignedLongLong((uint32_t)object->minfreeworkitems);
   19145           0 :         return py_minfreeworkitems;
   19146             : }
   19147             : 
   19148           0 : static int py_srvsvc_NetSrvInfo599_set_minfreeworkitems(PyObject *py_obj, PyObject *value, void *closure)
   19149             : {
   19150           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   19151           0 :         if (value == NULL) {
   19152           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minfreeworkitems");
   19153           0 :                 return -1;
   19154             :         }
   19155             :         {
   19156           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minfreeworkitems));
   19157           0 :                 if (PyLong_Check(value)) {
   19158             :                         unsigned long long test_var;
   19159           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19160           0 :                         if (PyErr_Occurred() != NULL) {
   19161           0 :                                 return -1;
   19162             :                         }
   19163           0 :                         if (test_var > uint_max) {
   19164           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19165             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19166           0 :                                 return -1;
   19167             :                         }
   19168           0 :                         object->minfreeworkitems = test_var;
   19169             :                 } else {
   19170           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19171             :                           PyLong_Type.tp_name);
   19172           0 :                         return -1;
   19173             :                 }
   19174             :         }
   19175           0 :         return 0;
   19176             : }
   19177             : 
   19178           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_xactmemsize(PyObject *obj, void *closure)
   19179             : {
   19180           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   19181             :         PyObject *py_xactmemsize;
   19182           0 :         py_xactmemsize = PyLong_FromUnsignedLongLong((uint32_t)object->xactmemsize);
   19183           0 :         return py_xactmemsize;
   19184             : }
   19185             : 
   19186           0 : static int py_srvsvc_NetSrvInfo599_set_xactmemsize(PyObject *py_obj, PyObject *value, void *closure)
   19187             : {
   19188           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   19189           0 :         if (value == NULL) {
   19190           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->xactmemsize");
   19191           0 :                 return -1;
   19192             :         }
   19193             :         {
   19194           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->xactmemsize));
   19195           0 :                 if (PyLong_Check(value)) {
   19196             :                         unsigned long long test_var;
   19197           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19198           0 :                         if (PyErr_Occurred() != NULL) {
   19199           0 :                                 return -1;
   19200             :                         }
   19201           0 :                         if (test_var > uint_max) {
   19202           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19203             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19204           0 :                                 return -1;
   19205             :                         }
   19206           0 :                         object->xactmemsize = test_var;
   19207             :                 } else {
   19208           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19209             :                           PyLong_Type.tp_name);
   19210           0 :                         return -1;
   19211             :                 }
   19212             :         }
   19213           0 :         return 0;
   19214             : }
   19215             : 
   19216           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_threadpriority(PyObject *obj, void *closure)
   19217             : {
   19218           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   19219             :         PyObject *py_threadpriority;
   19220           0 :         py_threadpriority = PyLong_FromUnsignedLongLong((uint32_t)object->threadpriority);
   19221           0 :         return py_threadpriority;
   19222             : }
   19223             : 
   19224           0 : static int py_srvsvc_NetSrvInfo599_set_threadpriority(PyObject *py_obj, PyObject *value, void *closure)
   19225             : {
   19226           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   19227           0 :         if (value == NULL) {
   19228           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->threadpriority");
   19229           0 :                 return -1;
   19230             :         }
   19231             :         {
   19232           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->threadpriority));
   19233           0 :                 if (PyLong_Check(value)) {
   19234             :                         unsigned long long test_var;
   19235           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19236           0 :                         if (PyErr_Occurred() != NULL) {
   19237           0 :                                 return -1;
   19238             :                         }
   19239           0 :                         if (test_var > uint_max) {
   19240           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19241             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19242           0 :                                 return -1;
   19243             :                         }
   19244           0 :                         object->threadpriority = test_var;
   19245             :                 } else {
   19246           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19247             :                           PyLong_Type.tp_name);
   19248           0 :                         return -1;
   19249             :                 }
   19250             :         }
   19251           0 :         return 0;
   19252             : }
   19253             : 
   19254           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_maxmpxct(PyObject *obj, void *closure)
   19255             : {
   19256           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   19257             :         PyObject *py_maxmpxct;
   19258           0 :         py_maxmpxct = PyLong_FromUnsignedLongLong((uint32_t)object->maxmpxct);
   19259           0 :         return py_maxmpxct;
   19260             : }
   19261             : 
   19262           0 : static int py_srvsvc_NetSrvInfo599_set_maxmpxct(PyObject *py_obj, PyObject *value, void *closure)
   19263             : {
   19264           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   19265           0 :         if (value == NULL) {
   19266           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxmpxct");
   19267           0 :                 return -1;
   19268             :         }
   19269             :         {
   19270           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxmpxct));
   19271           0 :                 if (PyLong_Check(value)) {
   19272             :                         unsigned long long test_var;
   19273           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19274           0 :                         if (PyErr_Occurred() != NULL) {
   19275           0 :                                 return -1;
   19276             :                         }
   19277           0 :                         if (test_var > uint_max) {
   19278           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19279             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19280           0 :                                 return -1;
   19281             :                         }
   19282           0 :                         object->maxmpxct = test_var;
   19283             :                 } else {
   19284           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19285             :                           PyLong_Type.tp_name);
   19286           0 :                         return -1;
   19287             :                 }
   19288             :         }
   19289           0 :         return 0;
   19290             : }
   19291             : 
   19292           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_oplockbreakwait(PyObject *obj, void *closure)
   19293             : {
   19294           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   19295             :         PyObject *py_oplockbreakwait;
   19296           0 :         py_oplockbreakwait = PyLong_FromUnsignedLongLong((uint32_t)object->oplockbreakwait);
   19297           0 :         return py_oplockbreakwait;
   19298             : }
   19299             : 
   19300           0 : static int py_srvsvc_NetSrvInfo599_set_oplockbreakwait(PyObject *py_obj, PyObject *value, void *closure)
   19301             : {
   19302           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   19303           0 :         if (value == NULL) {
   19304           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->oplockbreakwait");
   19305           0 :                 return -1;
   19306             :         }
   19307             :         {
   19308           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->oplockbreakwait));
   19309           0 :                 if (PyLong_Check(value)) {
   19310             :                         unsigned long long test_var;
   19311           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19312           0 :                         if (PyErr_Occurred() != NULL) {
   19313           0 :                                 return -1;
   19314             :                         }
   19315           0 :                         if (test_var > uint_max) {
   19316           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19317             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19318           0 :                                 return -1;
   19319             :                         }
   19320           0 :                         object->oplockbreakwait = test_var;
   19321             :                 } else {
   19322           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19323             :                           PyLong_Type.tp_name);
   19324           0 :                         return -1;
   19325             :                 }
   19326             :         }
   19327           0 :         return 0;
   19328             : }
   19329             : 
   19330           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_oplockbreakresponsewait(PyObject *obj, void *closure)
   19331             : {
   19332           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   19333             :         PyObject *py_oplockbreakresponsewait;
   19334           0 :         py_oplockbreakresponsewait = PyLong_FromUnsignedLongLong((uint32_t)object->oplockbreakresponsewait);
   19335           0 :         return py_oplockbreakresponsewait;
   19336             : }
   19337             : 
   19338           0 : static int py_srvsvc_NetSrvInfo599_set_oplockbreakresponsewait(PyObject *py_obj, PyObject *value, void *closure)
   19339             : {
   19340           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   19341           0 :         if (value == NULL) {
   19342           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->oplockbreakresponsewait");
   19343           0 :                 return -1;
   19344             :         }
   19345             :         {
   19346           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->oplockbreakresponsewait));
   19347           0 :                 if (PyLong_Check(value)) {
   19348             :                         unsigned long long test_var;
   19349           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19350           0 :                         if (PyErr_Occurred() != NULL) {
   19351           0 :                                 return -1;
   19352             :                         }
   19353           0 :                         if (test_var > uint_max) {
   19354           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19355             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19356           0 :                                 return -1;
   19357             :                         }
   19358           0 :                         object->oplockbreakresponsewait = test_var;
   19359             :                 } else {
   19360           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19361             :                           PyLong_Type.tp_name);
   19362           0 :                         return -1;
   19363             :                 }
   19364             :         }
   19365           0 :         return 0;
   19366             : }
   19367             : 
   19368           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_enableoplocks(PyObject *obj, void *closure)
   19369             : {
   19370           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   19371             :         PyObject *py_enableoplocks;
   19372           0 :         py_enableoplocks = PyLong_FromUnsignedLongLong((uint32_t)object->enableoplocks);
   19373           0 :         return py_enableoplocks;
   19374             : }
   19375             : 
   19376           0 : static int py_srvsvc_NetSrvInfo599_set_enableoplocks(PyObject *py_obj, PyObject *value, void *closure)
   19377             : {
   19378           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   19379           0 :         if (value == NULL) {
   19380           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enableoplocks");
   19381           0 :                 return -1;
   19382             :         }
   19383             :         {
   19384           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableoplocks));
   19385           0 :                 if (PyLong_Check(value)) {
   19386             :                         unsigned long long test_var;
   19387           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19388           0 :                         if (PyErr_Occurred() != NULL) {
   19389           0 :                                 return -1;
   19390             :                         }
   19391           0 :                         if (test_var > uint_max) {
   19392           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19393             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19394           0 :                                 return -1;
   19395             :                         }
   19396           0 :                         object->enableoplocks = test_var;
   19397             :                 } else {
   19398           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19399             :                           PyLong_Type.tp_name);
   19400           0 :                         return -1;
   19401             :                 }
   19402             :         }
   19403           0 :         return 0;
   19404             : }
   19405             : 
   19406           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_enableoplockforceclose(PyObject *obj, void *closure)
   19407             : {
   19408           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   19409             :         PyObject *py_enableoplockforceclose;
   19410           0 :         py_enableoplockforceclose = PyLong_FromUnsignedLongLong((uint32_t)object->enableoplockforceclose);
   19411           0 :         return py_enableoplockforceclose;
   19412             : }
   19413             : 
   19414           0 : static int py_srvsvc_NetSrvInfo599_set_enableoplockforceclose(PyObject *py_obj, PyObject *value, void *closure)
   19415             : {
   19416           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   19417           0 :         if (value == NULL) {
   19418           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enableoplockforceclose");
   19419           0 :                 return -1;
   19420             :         }
   19421             :         {
   19422           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableoplockforceclose));
   19423           0 :                 if (PyLong_Check(value)) {
   19424             :                         unsigned long long test_var;
   19425           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19426           0 :                         if (PyErr_Occurred() != NULL) {
   19427           0 :                                 return -1;
   19428             :                         }
   19429           0 :                         if (test_var > uint_max) {
   19430           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19431             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19432           0 :                                 return -1;
   19433             :                         }
   19434           0 :                         object->enableoplockforceclose = test_var;
   19435             :                 } else {
   19436           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19437             :                           PyLong_Type.tp_name);
   19438           0 :                         return -1;
   19439             :                 }
   19440             :         }
   19441           0 :         return 0;
   19442             : }
   19443             : 
   19444           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_enablefcbopens(PyObject *obj, void *closure)
   19445             : {
   19446           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   19447             :         PyObject *py_enablefcbopens;
   19448           0 :         py_enablefcbopens = PyLong_FromUnsignedLongLong((uint32_t)object->enablefcbopens);
   19449           0 :         return py_enablefcbopens;
   19450             : }
   19451             : 
   19452           0 : static int py_srvsvc_NetSrvInfo599_set_enablefcbopens(PyObject *py_obj, PyObject *value, void *closure)
   19453             : {
   19454           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   19455           0 :         if (value == NULL) {
   19456           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enablefcbopens");
   19457           0 :                 return -1;
   19458             :         }
   19459             :         {
   19460           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablefcbopens));
   19461           0 :                 if (PyLong_Check(value)) {
   19462             :                         unsigned long long test_var;
   19463           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19464           0 :                         if (PyErr_Occurred() != NULL) {
   19465           0 :                                 return -1;
   19466             :                         }
   19467           0 :                         if (test_var > uint_max) {
   19468           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19469             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19470           0 :                                 return -1;
   19471             :                         }
   19472           0 :                         object->enablefcbopens = test_var;
   19473             :                 } else {
   19474           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19475             :                           PyLong_Type.tp_name);
   19476           0 :                         return -1;
   19477             :                 }
   19478             :         }
   19479           0 :         return 0;
   19480             : }
   19481             : 
   19482           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_enableraw(PyObject *obj, void *closure)
   19483             : {
   19484           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   19485             :         PyObject *py_enableraw;
   19486           0 :         py_enableraw = PyLong_FromUnsignedLongLong((uint32_t)object->enableraw);
   19487           0 :         return py_enableraw;
   19488             : }
   19489             : 
   19490           0 : static int py_srvsvc_NetSrvInfo599_set_enableraw(PyObject *py_obj, PyObject *value, void *closure)
   19491             : {
   19492           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   19493           0 :         if (value == NULL) {
   19494           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enableraw");
   19495           0 :                 return -1;
   19496             :         }
   19497             :         {
   19498           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableraw));
   19499           0 :                 if (PyLong_Check(value)) {
   19500             :                         unsigned long long test_var;
   19501           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19502           0 :                         if (PyErr_Occurred() != NULL) {
   19503           0 :                                 return -1;
   19504             :                         }
   19505           0 :                         if (test_var > uint_max) {
   19506           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19507             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19508           0 :                                 return -1;
   19509             :                         }
   19510           0 :                         object->enableraw = test_var;
   19511             :                 } else {
   19512           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19513             :                           PyLong_Type.tp_name);
   19514           0 :                         return -1;
   19515             :                 }
   19516             :         }
   19517           0 :         return 0;
   19518             : }
   19519             : 
   19520           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_enablesharednetdrives(PyObject *obj, void *closure)
   19521             : {
   19522           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   19523             :         PyObject *py_enablesharednetdrives;
   19524           0 :         py_enablesharednetdrives = PyLong_FromUnsignedLongLong((uint32_t)object->enablesharednetdrives);
   19525           0 :         return py_enablesharednetdrives;
   19526             : }
   19527             : 
   19528           0 : static int py_srvsvc_NetSrvInfo599_set_enablesharednetdrives(PyObject *py_obj, PyObject *value, void *closure)
   19529             : {
   19530           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   19531           0 :         if (value == NULL) {
   19532           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enablesharednetdrives");
   19533           0 :                 return -1;
   19534             :         }
   19535             :         {
   19536           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesharednetdrives));
   19537           0 :                 if (PyLong_Check(value)) {
   19538             :                         unsigned long long test_var;
   19539           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19540           0 :                         if (PyErr_Occurred() != NULL) {
   19541           0 :                                 return -1;
   19542             :                         }
   19543           0 :                         if (test_var > uint_max) {
   19544           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19545             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19546           0 :                                 return -1;
   19547             :                         }
   19548           0 :                         object->enablesharednetdrives = test_var;
   19549             :                 } else {
   19550           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19551             :                           PyLong_Type.tp_name);
   19552           0 :                         return -1;
   19553             :                 }
   19554             :         }
   19555           0 :         return 0;
   19556             : }
   19557             : 
   19558           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_minfreeconnections(PyObject *obj, void *closure)
   19559             : {
   19560           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   19561             :         PyObject *py_minfreeconnections;
   19562           0 :         py_minfreeconnections = PyLong_FromUnsignedLongLong((uint32_t)object->minfreeconnections);
   19563           0 :         return py_minfreeconnections;
   19564             : }
   19565             : 
   19566           0 : static int py_srvsvc_NetSrvInfo599_set_minfreeconnections(PyObject *py_obj, PyObject *value, void *closure)
   19567             : {
   19568           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   19569           0 :         if (value == NULL) {
   19570           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minfreeconnections");
   19571           0 :                 return -1;
   19572             :         }
   19573             :         {
   19574           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minfreeconnections));
   19575           0 :                 if (PyLong_Check(value)) {
   19576             :                         unsigned long long test_var;
   19577           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19578           0 :                         if (PyErr_Occurred() != NULL) {
   19579           0 :                                 return -1;
   19580             :                         }
   19581           0 :                         if (test_var > uint_max) {
   19582           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19583             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19584           0 :                                 return -1;
   19585             :                         }
   19586           0 :                         object->minfreeconnections = test_var;
   19587             :                 } else {
   19588           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19589             :                           PyLong_Type.tp_name);
   19590           0 :                         return -1;
   19591             :                 }
   19592             :         }
   19593           0 :         return 0;
   19594             : }
   19595             : 
   19596           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_maxfreeconnections(PyObject *obj, void *closure)
   19597             : {
   19598           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   19599             :         PyObject *py_maxfreeconnections;
   19600           0 :         py_maxfreeconnections = PyLong_FromUnsignedLongLong((uint32_t)object->maxfreeconnections);
   19601           0 :         return py_maxfreeconnections;
   19602             : }
   19603             : 
   19604           0 : static int py_srvsvc_NetSrvInfo599_set_maxfreeconnections(PyObject *py_obj, PyObject *value, void *closure)
   19605             : {
   19606           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   19607           0 :         if (value == NULL) {
   19608           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxfreeconnections");
   19609           0 :                 return -1;
   19610             :         }
   19611             :         {
   19612           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxfreeconnections));
   19613           0 :                 if (PyLong_Check(value)) {
   19614             :                         unsigned long long test_var;
   19615           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19616           0 :                         if (PyErr_Occurred() != NULL) {
   19617           0 :                                 return -1;
   19618             :                         }
   19619           0 :                         if (test_var > uint_max) {
   19620           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19621             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19622           0 :                                 return -1;
   19623             :                         }
   19624           0 :                         object->maxfreeconnections = test_var;
   19625             :                 } else {
   19626           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19627             :                           PyLong_Type.tp_name);
   19628           0 :                         return -1;
   19629             :                 }
   19630             :         }
   19631           0 :         return 0;
   19632             : }
   19633             : 
   19634           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_initsesstable(PyObject *obj, void *closure)
   19635             : {
   19636           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   19637             :         PyObject *py_initsesstable;
   19638           0 :         py_initsesstable = PyLong_FromUnsignedLongLong((uint32_t)object->initsesstable);
   19639           0 :         return py_initsesstable;
   19640             : }
   19641             : 
   19642           0 : static int py_srvsvc_NetSrvInfo599_set_initsesstable(PyObject *py_obj, PyObject *value, void *closure)
   19643             : {
   19644           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   19645           0 :         if (value == NULL) {
   19646           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->initsesstable");
   19647           0 :                 return -1;
   19648             :         }
   19649             :         {
   19650           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initsesstable));
   19651           0 :                 if (PyLong_Check(value)) {
   19652             :                         unsigned long long test_var;
   19653           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19654           0 :                         if (PyErr_Occurred() != NULL) {
   19655           0 :                                 return -1;
   19656             :                         }
   19657           0 :                         if (test_var > uint_max) {
   19658           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19659             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19660           0 :                                 return -1;
   19661             :                         }
   19662           0 :                         object->initsesstable = test_var;
   19663             :                 } else {
   19664           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19665             :                           PyLong_Type.tp_name);
   19666           0 :                         return -1;
   19667             :                 }
   19668             :         }
   19669           0 :         return 0;
   19670             : }
   19671             : 
   19672           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_initconntable(PyObject *obj, void *closure)
   19673             : {
   19674           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   19675             :         PyObject *py_initconntable;
   19676           0 :         py_initconntable = PyLong_FromUnsignedLongLong((uint32_t)object->initconntable);
   19677           0 :         return py_initconntable;
   19678             : }
   19679             : 
   19680           0 : static int py_srvsvc_NetSrvInfo599_set_initconntable(PyObject *py_obj, PyObject *value, void *closure)
   19681             : {
   19682           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   19683           0 :         if (value == NULL) {
   19684           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->initconntable");
   19685           0 :                 return -1;
   19686             :         }
   19687             :         {
   19688           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initconntable));
   19689           0 :                 if (PyLong_Check(value)) {
   19690             :                         unsigned long long test_var;
   19691           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19692           0 :                         if (PyErr_Occurred() != NULL) {
   19693           0 :                                 return -1;
   19694             :                         }
   19695           0 :                         if (test_var > uint_max) {
   19696           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19697             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19698           0 :                                 return -1;
   19699             :                         }
   19700           0 :                         object->initconntable = test_var;
   19701             :                 } else {
   19702           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19703             :                           PyLong_Type.tp_name);
   19704           0 :                         return -1;
   19705             :                 }
   19706             :         }
   19707           0 :         return 0;
   19708             : }
   19709             : 
   19710           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_initfiletable(PyObject *obj, void *closure)
   19711             : {
   19712           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   19713             :         PyObject *py_initfiletable;
   19714           0 :         py_initfiletable = PyLong_FromUnsignedLongLong((uint32_t)object->initfiletable);
   19715           0 :         return py_initfiletable;
   19716             : }
   19717             : 
   19718           0 : static int py_srvsvc_NetSrvInfo599_set_initfiletable(PyObject *py_obj, PyObject *value, void *closure)
   19719             : {
   19720           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   19721           0 :         if (value == NULL) {
   19722           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->initfiletable");
   19723           0 :                 return -1;
   19724             :         }
   19725             :         {
   19726           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initfiletable));
   19727           0 :                 if (PyLong_Check(value)) {
   19728             :                         unsigned long long test_var;
   19729           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19730           0 :                         if (PyErr_Occurred() != NULL) {
   19731           0 :                                 return -1;
   19732             :                         }
   19733           0 :                         if (test_var > uint_max) {
   19734           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19735             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19736           0 :                                 return -1;
   19737             :                         }
   19738           0 :                         object->initfiletable = test_var;
   19739             :                 } else {
   19740           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19741             :                           PyLong_Type.tp_name);
   19742           0 :                         return -1;
   19743             :                 }
   19744             :         }
   19745           0 :         return 0;
   19746             : }
   19747             : 
   19748           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_initsearchtable(PyObject *obj, void *closure)
   19749             : {
   19750           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   19751             :         PyObject *py_initsearchtable;
   19752           0 :         py_initsearchtable = PyLong_FromUnsignedLongLong((uint32_t)object->initsearchtable);
   19753           0 :         return py_initsearchtable;
   19754             : }
   19755             : 
   19756           0 : static int py_srvsvc_NetSrvInfo599_set_initsearchtable(PyObject *py_obj, PyObject *value, void *closure)
   19757             : {
   19758           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   19759           0 :         if (value == NULL) {
   19760           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->initsearchtable");
   19761           0 :                 return -1;
   19762             :         }
   19763             :         {
   19764           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initsearchtable));
   19765           0 :                 if (PyLong_Check(value)) {
   19766             :                         unsigned long long test_var;
   19767           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19768           0 :                         if (PyErr_Occurred() != NULL) {
   19769           0 :                                 return -1;
   19770             :                         }
   19771           0 :                         if (test_var > uint_max) {
   19772           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19773             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19774           0 :                                 return -1;
   19775             :                         }
   19776           0 :                         object->initsearchtable = test_var;
   19777             :                 } else {
   19778           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19779             :                           PyLong_Type.tp_name);
   19780           0 :                         return -1;
   19781             :                 }
   19782             :         }
   19783           0 :         return 0;
   19784             : }
   19785             : 
   19786           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_alertsched(PyObject *obj, void *closure)
   19787             : {
   19788           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   19789             :         PyObject *py_alertsched;
   19790           0 :         py_alertsched = PyLong_FromUnsignedLongLong((uint32_t)object->alertsched);
   19791           0 :         return py_alertsched;
   19792             : }
   19793             : 
   19794           0 : static int py_srvsvc_NetSrvInfo599_set_alertsched(PyObject *py_obj, PyObject *value, void *closure)
   19795             : {
   19796           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   19797           0 :         if (value == NULL) {
   19798           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->alertsched");
   19799           0 :                 return -1;
   19800             :         }
   19801             :         {
   19802           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->alertsched));
   19803           0 :                 if (PyLong_Check(value)) {
   19804             :                         unsigned long long test_var;
   19805           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19806           0 :                         if (PyErr_Occurred() != NULL) {
   19807           0 :                                 return -1;
   19808             :                         }
   19809           0 :                         if (test_var > uint_max) {
   19810           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19811             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19812           0 :                                 return -1;
   19813             :                         }
   19814           0 :                         object->alertsched = test_var;
   19815             :                 } else {
   19816           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19817             :                           PyLong_Type.tp_name);
   19818           0 :                         return -1;
   19819             :                 }
   19820             :         }
   19821           0 :         return 0;
   19822             : }
   19823             : 
   19824           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_errortreshold(PyObject *obj, void *closure)
   19825             : {
   19826           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   19827             :         PyObject *py_errortreshold;
   19828           0 :         py_errortreshold = PyLong_FromUnsignedLongLong((uint32_t)object->errortreshold);
   19829           0 :         return py_errortreshold;
   19830             : }
   19831             : 
   19832           0 : static int py_srvsvc_NetSrvInfo599_set_errortreshold(PyObject *py_obj, PyObject *value, void *closure)
   19833             : {
   19834           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   19835           0 :         if (value == NULL) {
   19836           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->errortreshold");
   19837           0 :                 return -1;
   19838             :         }
   19839             :         {
   19840           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->errortreshold));
   19841           0 :                 if (PyLong_Check(value)) {
   19842             :                         unsigned long long test_var;
   19843           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19844           0 :                         if (PyErr_Occurred() != NULL) {
   19845           0 :                                 return -1;
   19846             :                         }
   19847           0 :                         if (test_var > uint_max) {
   19848           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19849             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19850           0 :                                 return -1;
   19851             :                         }
   19852           0 :                         object->errortreshold = test_var;
   19853             :                 } else {
   19854           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19855             :                           PyLong_Type.tp_name);
   19856           0 :                         return -1;
   19857             :                 }
   19858             :         }
   19859           0 :         return 0;
   19860             : }
   19861             : 
   19862           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_networkerrortreshold(PyObject *obj, void *closure)
   19863             : {
   19864           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   19865             :         PyObject *py_networkerrortreshold;
   19866           0 :         py_networkerrortreshold = PyLong_FromUnsignedLongLong((uint32_t)object->networkerrortreshold);
   19867           0 :         return py_networkerrortreshold;
   19868             : }
   19869             : 
   19870           0 : static int py_srvsvc_NetSrvInfo599_set_networkerrortreshold(PyObject *py_obj, PyObject *value, void *closure)
   19871             : {
   19872           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   19873           0 :         if (value == NULL) {
   19874           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->networkerrortreshold");
   19875           0 :                 return -1;
   19876             :         }
   19877             :         {
   19878           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->networkerrortreshold));
   19879           0 :                 if (PyLong_Check(value)) {
   19880             :                         unsigned long long test_var;
   19881           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19882           0 :                         if (PyErr_Occurred() != NULL) {
   19883           0 :                                 return -1;
   19884             :                         }
   19885           0 :                         if (test_var > uint_max) {
   19886           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19887             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19888           0 :                                 return -1;
   19889             :                         }
   19890           0 :                         object->networkerrortreshold = test_var;
   19891             :                 } else {
   19892           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19893             :                           PyLong_Type.tp_name);
   19894           0 :                         return -1;
   19895             :                 }
   19896             :         }
   19897           0 :         return 0;
   19898             : }
   19899             : 
   19900           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_diskspacetreshold(PyObject *obj, void *closure)
   19901             : {
   19902           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   19903             :         PyObject *py_diskspacetreshold;
   19904           0 :         py_diskspacetreshold = PyLong_FromUnsignedLongLong((uint32_t)object->diskspacetreshold);
   19905           0 :         return py_diskspacetreshold;
   19906             : }
   19907             : 
   19908           0 : static int py_srvsvc_NetSrvInfo599_set_diskspacetreshold(PyObject *py_obj, PyObject *value, void *closure)
   19909             : {
   19910           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   19911           0 :         if (value == NULL) {
   19912           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->diskspacetreshold");
   19913           0 :                 return -1;
   19914             :         }
   19915             :         {
   19916           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->diskspacetreshold));
   19917           0 :                 if (PyLong_Check(value)) {
   19918             :                         unsigned long long test_var;
   19919           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19920           0 :                         if (PyErr_Occurred() != NULL) {
   19921           0 :                                 return -1;
   19922             :                         }
   19923           0 :                         if (test_var > uint_max) {
   19924           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19925             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19926           0 :                                 return -1;
   19927             :                         }
   19928           0 :                         object->diskspacetreshold = test_var;
   19929             :                 } else {
   19930           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19931             :                           PyLong_Type.tp_name);
   19932           0 :                         return -1;
   19933             :                 }
   19934             :         }
   19935           0 :         return 0;
   19936             : }
   19937             : 
   19938           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_reserved(PyObject *obj, void *closure)
   19939             : {
   19940           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   19941             :         PyObject *py_reserved;
   19942           0 :         py_reserved = PyLong_FromUnsignedLongLong((uint32_t)object->reserved);
   19943           0 :         return py_reserved;
   19944             : }
   19945             : 
   19946           0 : static int py_srvsvc_NetSrvInfo599_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
   19947             : {
   19948           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   19949           0 :         if (value == NULL) {
   19950           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved");
   19951           0 :                 return -1;
   19952             :         }
   19953             :         {
   19954           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
   19955           0 :                 if (PyLong_Check(value)) {
   19956             :                         unsigned long long test_var;
   19957           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19958           0 :                         if (PyErr_Occurred() != NULL) {
   19959           0 :                                 return -1;
   19960             :                         }
   19961           0 :                         if (test_var > uint_max) {
   19962           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19963             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19964           0 :                                 return -1;
   19965             :                         }
   19966           0 :                         object->reserved = test_var;
   19967             :                 } else {
   19968           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19969             :                           PyLong_Type.tp_name);
   19970           0 :                         return -1;
   19971             :                 }
   19972             :         }
   19973           0 :         return 0;
   19974             : }
   19975             : 
   19976           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_maxlinkdelay(PyObject *obj, void *closure)
   19977             : {
   19978           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   19979             :         PyObject *py_maxlinkdelay;
   19980           0 :         py_maxlinkdelay = PyLong_FromUnsignedLongLong((uint32_t)object->maxlinkdelay);
   19981           0 :         return py_maxlinkdelay;
   19982             : }
   19983             : 
   19984           0 : static int py_srvsvc_NetSrvInfo599_set_maxlinkdelay(PyObject *py_obj, PyObject *value, void *closure)
   19985             : {
   19986           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   19987           0 :         if (value == NULL) {
   19988           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxlinkdelay");
   19989           0 :                 return -1;
   19990             :         }
   19991             :         {
   19992           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxlinkdelay));
   19993           0 :                 if (PyLong_Check(value)) {
   19994             :                         unsigned long long test_var;
   19995           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19996           0 :                         if (PyErr_Occurred() != NULL) {
   19997           0 :                                 return -1;
   19998             :                         }
   19999           0 :                         if (test_var > uint_max) {
   20000           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20001             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20002           0 :                                 return -1;
   20003             :                         }
   20004           0 :                         object->maxlinkdelay = test_var;
   20005             :                 } else {
   20006           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20007             :                           PyLong_Type.tp_name);
   20008           0 :                         return -1;
   20009             :                 }
   20010             :         }
   20011           0 :         return 0;
   20012             : }
   20013             : 
   20014           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_minlinkthroughput(PyObject *obj, void *closure)
   20015             : {
   20016           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   20017             :         PyObject *py_minlinkthroughput;
   20018           0 :         py_minlinkthroughput = PyLong_FromUnsignedLongLong((uint32_t)object->minlinkthroughput);
   20019           0 :         return py_minlinkthroughput;
   20020             : }
   20021             : 
   20022           0 : static int py_srvsvc_NetSrvInfo599_set_minlinkthroughput(PyObject *py_obj, PyObject *value, void *closure)
   20023             : {
   20024           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   20025           0 :         if (value == NULL) {
   20026           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minlinkthroughput");
   20027           0 :                 return -1;
   20028             :         }
   20029             :         {
   20030           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minlinkthroughput));
   20031           0 :                 if (PyLong_Check(value)) {
   20032             :                         unsigned long long test_var;
   20033           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20034           0 :                         if (PyErr_Occurred() != NULL) {
   20035           0 :                                 return -1;
   20036             :                         }
   20037           0 :                         if (test_var > uint_max) {
   20038           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20039             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20040           0 :                                 return -1;
   20041             :                         }
   20042           0 :                         object->minlinkthroughput = test_var;
   20043             :                 } else {
   20044           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20045             :                           PyLong_Type.tp_name);
   20046           0 :                         return -1;
   20047             :                 }
   20048             :         }
   20049           0 :         return 0;
   20050             : }
   20051             : 
   20052           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_linkinfovalidtime(PyObject *obj, void *closure)
   20053             : {
   20054           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   20055             :         PyObject *py_linkinfovalidtime;
   20056           0 :         py_linkinfovalidtime = PyLong_FromUnsignedLongLong((uint32_t)object->linkinfovalidtime);
   20057           0 :         return py_linkinfovalidtime;
   20058             : }
   20059             : 
   20060           0 : static int py_srvsvc_NetSrvInfo599_set_linkinfovalidtime(PyObject *py_obj, PyObject *value, void *closure)
   20061             : {
   20062           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   20063           0 :         if (value == NULL) {
   20064           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->linkinfovalidtime");
   20065           0 :                 return -1;
   20066             :         }
   20067             :         {
   20068           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->linkinfovalidtime));
   20069           0 :                 if (PyLong_Check(value)) {
   20070             :                         unsigned long long test_var;
   20071           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20072           0 :                         if (PyErr_Occurred() != NULL) {
   20073           0 :                                 return -1;
   20074             :                         }
   20075           0 :                         if (test_var > uint_max) {
   20076           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20077             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20078           0 :                                 return -1;
   20079             :                         }
   20080           0 :                         object->linkinfovalidtime = test_var;
   20081             :                 } else {
   20082           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20083             :                           PyLong_Type.tp_name);
   20084           0 :                         return -1;
   20085             :                 }
   20086             :         }
   20087           0 :         return 0;
   20088             : }
   20089             : 
   20090           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_scavqosinfoupdatetime(PyObject *obj, void *closure)
   20091             : {
   20092           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   20093             :         PyObject *py_scavqosinfoupdatetime;
   20094           0 :         py_scavqosinfoupdatetime = PyLong_FromUnsignedLongLong((uint32_t)object->scavqosinfoupdatetime);
   20095           0 :         return py_scavqosinfoupdatetime;
   20096             : }
   20097             : 
   20098           0 : static int py_srvsvc_NetSrvInfo599_set_scavqosinfoupdatetime(PyObject *py_obj, PyObject *value, void *closure)
   20099             : {
   20100           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   20101           0 :         if (value == NULL) {
   20102           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->scavqosinfoupdatetime");
   20103           0 :                 return -1;
   20104             :         }
   20105             :         {
   20106           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->scavqosinfoupdatetime));
   20107           0 :                 if (PyLong_Check(value)) {
   20108             :                         unsigned long long test_var;
   20109           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20110           0 :                         if (PyErr_Occurred() != NULL) {
   20111           0 :                                 return -1;
   20112             :                         }
   20113           0 :                         if (test_var > uint_max) {
   20114           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20115             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20116           0 :                                 return -1;
   20117             :                         }
   20118           0 :                         object->scavqosinfoupdatetime = test_var;
   20119             :                 } else {
   20120           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20121             :                           PyLong_Type.tp_name);
   20122           0 :                         return -1;
   20123             :                 }
   20124             :         }
   20125           0 :         return 0;
   20126             : }
   20127             : 
   20128           0 : static PyObject *py_srvsvc_NetSrvInfo599_get_maxworkitemidletime(PyObject *obj, void *closure)
   20129             : {
   20130           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(obj);
   20131             :         PyObject *py_maxworkitemidletime;
   20132           0 :         py_maxworkitemidletime = PyLong_FromUnsignedLongLong((uint32_t)object->maxworkitemidletime);
   20133           0 :         return py_maxworkitemidletime;
   20134             : }
   20135             : 
   20136           0 : static int py_srvsvc_NetSrvInfo599_set_maxworkitemidletime(PyObject *py_obj, PyObject *value, void *closure)
   20137             : {
   20138           0 :         struct srvsvc_NetSrvInfo599 *object = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(py_obj);
   20139           0 :         if (value == NULL) {
   20140           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxworkitemidletime");
   20141           0 :                 return -1;
   20142             :         }
   20143             :         {
   20144           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxworkitemidletime));
   20145           0 :                 if (PyLong_Check(value)) {
   20146             :                         unsigned long long test_var;
   20147           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20148           0 :                         if (PyErr_Occurred() != NULL) {
   20149           0 :                                 return -1;
   20150             :                         }
   20151           0 :                         if (test_var > uint_max) {
   20152           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20153             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20154           0 :                                 return -1;
   20155             :                         }
   20156           0 :                         object->maxworkitemidletime = test_var;
   20157             :                 } else {
   20158           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20159             :                           PyLong_Type.tp_name);
   20160           0 :                         return -1;
   20161             :                 }
   20162             :         }
   20163           0 :         return 0;
   20164             : }
   20165             : 
   20166             : static PyGetSetDef py_srvsvc_NetSrvInfo599_getsetters[] = {
   20167             :         {
   20168             :                 .name = discard_const_p(char, "sessopen"),
   20169             :                 .get = py_srvsvc_NetSrvInfo599_get_sessopen,
   20170             :                 .set = py_srvsvc_NetSrvInfo599_set_sessopen,
   20171             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20172             :         },
   20173             :         {
   20174             :                 .name = discard_const_p(char, "sesssvc"),
   20175             :                 .get = py_srvsvc_NetSrvInfo599_get_sesssvc,
   20176             :                 .set = py_srvsvc_NetSrvInfo599_set_sesssvc,
   20177             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20178             :         },
   20179             :         {
   20180             :                 .name = discard_const_p(char, "opensearch"),
   20181             :                 .get = py_srvsvc_NetSrvInfo599_get_opensearch,
   20182             :                 .set = py_srvsvc_NetSrvInfo599_set_opensearch,
   20183             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20184             :         },
   20185             :         {
   20186             :                 .name = discard_const_p(char, "sizereqbufs"),
   20187             :                 .get = py_srvsvc_NetSrvInfo599_get_sizereqbufs,
   20188             :                 .set = py_srvsvc_NetSrvInfo599_set_sizereqbufs,
   20189             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20190             :         },
   20191             :         {
   20192             :                 .name = discard_const_p(char, "initworkitems"),
   20193             :                 .get = py_srvsvc_NetSrvInfo599_get_initworkitems,
   20194             :                 .set = py_srvsvc_NetSrvInfo599_set_initworkitems,
   20195             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20196             :         },
   20197             :         {
   20198             :                 .name = discard_const_p(char, "maxworkitems"),
   20199             :                 .get = py_srvsvc_NetSrvInfo599_get_maxworkitems,
   20200             :                 .set = py_srvsvc_NetSrvInfo599_set_maxworkitems,
   20201             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20202             :         },
   20203             :         {
   20204             :                 .name = discard_const_p(char, "rawworkitems"),
   20205             :                 .get = py_srvsvc_NetSrvInfo599_get_rawworkitems,
   20206             :                 .set = py_srvsvc_NetSrvInfo599_set_rawworkitems,
   20207             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20208             :         },
   20209             :         {
   20210             :                 .name = discard_const_p(char, "irpstacksize"),
   20211             :                 .get = py_srvsvc_NetSrvInfo599_get_irpstacksize,
   20212             :                 .set = py_srvsvc_NetSrvInfo599_set_irpstacksize,
   20213             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20214             :         },
   20215             :         {
   20216             :                 .name = discard_const_p(char, "maxrawbuflen"),
   20217             :                 .get = py_srvsvc_NetSrvInfo599_get_maxrawbuflen,
   20218             :                 .set = py_srvsvc_NetSrvInfo599_set_maxrawbuflen,
   20219             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20220             :         },
   20221             :         {
   20222             :                 .name = discard_const_p(char, "sessusers"),
   20223             :                 .get = py_srvsvc_NetSrvInfo599_get_sessusers,
   20224             :                 .set = py_srvsvc_NetSrvInfo599_set_sessusers,
   20225             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20226             :         },
   20227             :         {
   20228             :                 .name = discard_const_p(char, "sessconns"),
   20229             :                 .get = py_srvsvc_NetSrvInfo599_get_sessconns,
   20230             :                 .set = py_srvsvc_NetSrvInfo599_set_sessconns,
   20231             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20232             :         },
   20233             :         {
   20234             :                 .name = discard_const_p(char, "maxpagedmemoryusage"),
   20235             :                 .get = py_srvsvc_NetSrvInfo599_get_maxpagedmemoryusage,
   20236             :                 .set = py_srvsvc_NetSrvInfo599_set_maxpagedmemoryusage,
   20237             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20238             :         },
   20239             :         {
   20240             :                 .name = discard_const_p(char, "maxnonpagedmemoryusage"),
   20241             :                 .get = py_srvsvc_NetSrvInfo599_get_maxnonpagedmemoryusage,
   20242             :                 .set = py_srvsvc_NetSrvInfo599_set_maxnonpagedmemoryusage,
   20243             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20244             :         },
   20245             :         {
   20246             :                 .name = discard_const_p(char, "enablesoftcompat"),
   20247             :                 .get = py_srvsvc_NetSrvInfo599_get_enablesoftcompat,
   20248             :                 .set = py_srvsvc_NetSrvInfo599_set_enablesoftcompat,
   20249             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20250             :         },
   20251             :         {
   20252             :                 .name = discard_const_p(char, "enableforcedlogoff"),
   20253             :                 .get = py_srvsvc_NetSrvInfo599_get_enableforcedlogoff,
   20254             :                 .set = py_srvsvc_NetSrvInfo599_set_enableforcedlogoff,
   20255             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20256             :         },
   20257             :         {
   20258             :                 .name = discard_const_p(char, "timesource"),
   20259             :                 .get = py_srvsvc_NetSrvInfo599_get_timesource,
   20260             :                 .set = py_srvsvc_NetSrvInfo599_set_timesource,
   20261             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20262             :         },
   20263             :         {
   20264             :                 .name = discard_const_p(char, "acceptdownlevelapis"),
   20265             :                 .get = py_srvsvc_NetSrvInfo599_get_acceptdownlevelapis,
   20266             :                 .set = py_srvsvc_NetSrvInfo599_set_acceptdownlevelapis,
   20267             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20268             :         },
   20269             :         {
   20270             :                 .name = discard_const_p(char, "lmannounce"),
   20271             :                 .get = py_srvsvc_NetSrvInfo599_get_lmannounce,
   20272             :                 .set = py_srvsvc_NetSrvInfo599_set_lmannounce,
   20273             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20274             :         },
   20275             :         {
   20276             :                 .name = discard_const_p(char, "domain"),
   20277             :                 .get = py_srvsvc_NetSrvInfo599_get_domain,
   20278             :                 .set = py_srvsvc_NetSrvInfo599_set_domain,
   20279             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   20280             :         },
   20281             :         {
   20282             :                 .name = discard_const_p(char, "maxcopyreadlen"),
   20283             :                 .get = py_srvsvc_NetSrvInfo599_get_maxcopyreadlen,
   20284             :                 .set = py_srvsvc_NetSrvInfo599_set_maxcopyreadlen,
   20285             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20286             :         },
   20287             :         {
   20288             :                 .name = discard_const_p(char, "maxcopywritelen"),
   20289             :                 .get = py_srvsvc_NetSrvInfo599_get_maxcopywritelen,
   20290             :                 .set = py_srvsvc_NetSrvInfo599_set_maxcopywritelen,
   20291             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20292             :         },
   20293             :         {
   20294             :                 .name = discard_const_p(char, "minkeepsearch"),
   20295             :                 .get = py_srvsvc_NetSrvInfo599_get_minkeepsearch,
   20296             :                 .set = py_srvsvc_NetSrvInfo599_set_minkeepsearch,
   20297             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20298             :         },
   20299             :         {
   20300             :                 .name = discard_const_p(char, "minkeepcomplsearch"),
   20301             :                 .get = py_srvsvc_NetSrvInfo599_get_minkeepcomplsearch,
   20302             :                 .set = py_srvsvc_NetSrvInfo599_set_minkeepcomplsearch,
   20303             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20304             :         },
   20305             :         {
   20306             :                 .name = discard_const_p(char, "maxkeepcomplsearch"),
   20307             :                 .get = py_srvsvc_NetSrvInfo599_get_maxkeepcomplsearch,
   20308             :                 .set = py_srvsvc_NetSrvInfo599_set_maxkeepcomplsearch,
   20309             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20310             :         },
   20311             :         {
   20312             :                 .name = discard_const_p(char, "threadcountadd"),
   20313             :                 .get = py_srvsvc_NetSrvInfo599_get_threadcountadd,
   20314             :                 .set = py_srvsvc_NetSrvInfo599_set_threadcountadd,
   20315             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20316             :         },
   20317             :         {
   20318             :                 .name = discard_const_p(char, "numlockthreads"),
   20319             :                 .get = py_srvsvc_NetSrvInfo599_get_numlockthreads,
   20320             :                 .set = py_srvsvc_NetSrvInfo599_set_numlockthreads,
   20321             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20322             :         },
   20323             :         {
   20324             :                 .name = discard_const_p(char, "scavtimeout"),
   20325             :                 .get = py_srvsvc_NetSrvInfo599_get_scavtimeout,
   20326             :                 .set = py_srvsvc_NetSrvInfo599_set_scavtimeout,
   20327             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20328             :         },
   20329             :         {
   20330             :                 .name = discard_const_p(char, "minrcvqueue"),
   20331             :                 .get = py_srvsvc_NetSrvInfo599_get_minrcvqueue,
   20332             :                 .set = py_srvsvc_NetSrvInfo599_set_minrcvqueue,
   20333             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20334             :         },
   20335             :         {
   20336             :                 .name = discard_const_p(char, "minfreeworkitems"),
   20337             :                 .get = py_srvsvc_NetSrvInfo599_get_minfreeworkitems,
   20338             :                 .set = py_srvsvc_NetSrvInfo599_set_minfreeworkitems,
   20339             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20340             :         },
   20341             :         {
   20342             :                 .name = discard_const_p(char, "xactmemsize"),
   20343             :                 .get = py_srvsvc_NetSrvInfo599_get_xactmemsize,
   20344             :                 .set = py_srvsvc_NetSrvInfo599_set_xactmemsize,
   20345             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20346             :         },
   20347             :         {
   20348             :                 .name = discard_const_p(char, "threadpriority"),
   20349             :                 .get = py_srvsvc_NetSrvInfo599_get_threadpriority,
   20350             :                 .set = py_srvsvc_NetSrvInfo599_set_threadpriority,
   20351             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20352             :         },
   20353             :         {
   20354             :                 .name = discard_const_p(char, "maxmpxct"),
   20355             :                 .get = py_srvsvc_NetSrvInfo599_get_maxmpxct,
   20356             :                 .set = py_srvsvc_NetSrvInfo599_set_maxmpxct,
   20357             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20358             :         },
   20359             :         {
   20360             :                 .name = discard_const_p(char, "oplockbreakwait"),
   20361             :                 .get = py_srvsvc_NetSrvInfo599_get_oplockbreakwait,
   20362             :                 .set = py_srvsvc_NetSrvInfo599_set_oplockbreakwait,
   20363             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20364             :         },
   20365             :         {
   20366             :                 .name = discard_const_p(char, "oplockbreakresponsewait"),
   20367             :                 .get = py_srvsvc_NetSrvInfo599_get_oplockbreakresponsewait,
   20368             :                 .set = py_srvsvc_NetSrvInfo599_set_oplockbreakresponsewait,
   20369             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20370             :         },
   20371             :         {
   20372             :                 .name = discard_const_p(char, "enableoplocks"),
   20373             :                 .get = py_srvsvc_NetSrvInfo599_get_enableoplocks,
   20374             :                 .set = py_srvsvc_NetSrvInfo599_set_enableoplocks,
   20375             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20376             :         },
   20377             :         {
   20378             :                 .name = discard_const_p(char, "enableoplockforceclose"),
   20379             :                 .get = py_srvsvc_NetSrvInfo599_get_enableoplockforceclose,
   20380             :                 .set = py_srvsvc_NetSrvInfo599_set_enableoplockforceclose,
   20381             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20382             :         },
   20383             :         {
   20384             :                 .name = discard_const_p(char, "enablefcbopens"),
   20385             :                 .get = py_srvsvc_NetSrvInfo599_get_enablefcbopens,
   20386             :                 .set = py_srvsvc_NetSrvInfo599_set_enablefcbopens,
   20387             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20388             :         },
   20389             :         {
   20390             :                 .name = discard_const_p(char, "enableraw"),
   20391             :                 .get = py_srvsvc_NetSrvInfo599_get_enableraw,
   20392             :                 .set = py_srvsvc_NetSrvInfo599_set_enableraw,
   20393             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20394             :         },
   20395             :         {
   20396             :                 .name = discard_const_p(char, "enablesharednetdrives"),
   20397             :                 .get = py_srvsvc_NetSrvInfo599_get_enablesharednetdrives,
   20398             :                 .set = py_srvsvc_NetSrvInfo599_set_enablesharednetdrives,
   20399             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20400             :         },
   20401             :         {
   20402             :                 .name = discard_const_p(char, "minfreeconnections"),
   20403             :                 .get = py_srvsvc_NetSrvInfo599_get_minfreeconnections,
   20404             :                 .set = py_srvsvc_NetSrvInfo599_set_minfreeconnections,
   20405             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20406             :         },
   20407             :         {
   20408             :                 .name = discard_const_p(char, "maxfreeconnections"),
   20409             :                 .get = py_srvsvc_NetSrvInfo599_get_maxfreeconnections,
   20410             :                 .set = py_srvsvc_NetSrvInfo599_set_maxfreeconnections,
   20411             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20412             :         },
   20413             :         {
   20414             :                 .name = discard_const_p(char, "initsesstable"),
   20415             :                 .get = py_srvsvc_NetSrvInfo599_get_initsesstable,
   20416             :                 .set = py_srvsvc_NetSrvInfo599_set_initsesstable,
   20417             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20418             :         },
   20419             :         {
   20420             :                 .name = discard_const_p(char, "initconntable"),
   20421             :                 .get = py_srvsvc_NetSrvInfo599_get_initconntable,
   20422             :                 .set = py_srvsvc_NetSrvInfo599_set_initconntable,
   20423             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20424             :         },
   20425             :         {
   20426             :                 .name = discard_const_p(char, "initfiletable"),
   20427             :                 .get = py_srvsvc_NetSrvInfo599_get_initfiletable,
   20428             :                 .set = py_srvsvc_NetSrvInfo599_set_initfiletable,
   20429             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20430             :         },
   20431             :         {
   20432             :                 .name = discard_const_p(char, "initsearchtable"),
   20433             :                 .get = py_srvsvc_NetSrvInfo599_get_initsearchtable,
   20434             :                 .set = py_srvsvc_NetSrvInfo599_set_initsearchtable,
   20435             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20436             :         },
   20437             :         {
   20438             :                 .name = discard_const_p(char, "alertsched"),
   20439             :                 .get = py_srvsvc_NetSrvInfo599_get_alertsched,
   20440             :                 .set = py_srvsvc_NetSrvInfo599_set_alertsched,
   20441             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20442             :         },
   20443             :         {
   20444             :                 .name = discard_const_p(char, "errortreshold"),
   20445             :                 .get = py_srvsvc_NetSrvInfo599_get_errortreshold,
   20446             :                 .set = py_srvsvc_NetSrvInfo599_set_errortreshold,
   20447             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20448             :         },
   20449             :         {
   20450             :                 .name = discard_const_p(char, "networkerrortreshold"),
   20451             :                 .get = py_srvsvc_NetSrvInfo599_get_networkerrortreshold,
   20452             :                 .set = py_srvsvc_NetSrvInfo599_set_networkerrortreshold,
   20453             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20454             :         },
   20455             :         {
   20456             :                 .name = discard_const_p(char, "diskspacetreshold"),
   20457             :                 .get = py_srvsvc_NetSrvInfo599_get_diskspacetreshold,
   20458             :                 .set = py_srvsvc_NetSrvInfo599_set_diskspacetreshold,
   20459             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20460             :         },
   20461             :         {
   20462             :                 .name = discard_const_p(char, "reserved"),
   20463             :                 .get = py_srvsvc_NetSrvInfo599_get_reserved,
   20464             :                 .set = py_srvsvc_NetSrvInfo599_set_reserved,
   20465             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20466             :         },
   20467             :         {
   20468             :                 .name = discard_const_p(char, "maxlinkdelay"),
   20469             :                 .get = py_srvsvc_NetSrvInfo599_get_maxlinkdelay,
   20470             :                 .set = py_srvsvc_NetSrvInfo599_set_maxlinkdelay,
   20471             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20472             :         },
   20473             :         {
   20474             :                 .name = discard_const_p(char, "minlinkthroughput"),
   20475             :                 .get = py_srvsvc_NetSrvInfo599_get_minlinkthroughput,
   20476             :                 .set = py_srvsvc_NetSrvInfo599_set_minlinkthroughput,
   20477             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20478             :         },
   20479             :         {
   20480             :                 .name = discard_const_p(char, "linkinfovalidtime"),
   20481             :                 .get = py_srvsvc_NetSrvInfo599_get_linkinfovalidtime,
   20482             :                 .set = py_srvsvc_NetSrvInfo599_set_linkinfovalidtime,
   20483             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20484             :         },
   20485             :         {
   20486             :                 .name = discard_const_p(char, "scavqosinfoupdatetime"),
   20487             :                 .get = py_srvsvc_NetSrvInfo599_get_scavqosinfoupdatetime,
   20488             :                 .set = py_srvsvc_NetSrvInfo599_set_scavqosinfoupdatetime,
   20489             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20490             :         },
   20491             :         {
   20492             :                 .name = discard_const_p(char, "maxworkitemidletime"),
   20493             :                 .get = py_srvsvc_NetSrvInfo599_get_maxworkitemidletime,
   20494             :                 .set = py_srvsvc_NetSrvInfo599_set_maxworkitemidletime,
   20495             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20496             :         },
   20497             :         { .name = NULL }
   20498             : };
   20499             : 
   20500           0 : static PyObject *py_srvsvc_NetSrvInfo599_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20501             : {
   20502           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo599, type);
   20503             : }
   20504             : 
   20505             : 
   20506             : static PyTypeObject srvsvc_NetSrvInfo599_Type = {
   20507             :         PyVarObject_HEAD_INIT(NULL, 0)
   20508             :         .tp_name = "srvsvc.NetSrvInfo599",
   20509             :         .tp_getset = py_srvsvc_NetSrvInfo599_getsetters,
   20510             :         .tp_methods = NULL,
   20511             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20512             :         .tp_new = py_srvsvc_NetSrvInfo599_new,
   20513             : };
   20514             : 
   20515             : 
   20516           0 : static PyObject *py_srvsvc_NetSrvInfo1005_get_comment(PyObject *obj, void *closure)
   20517             : {
   20518           0 :         struct srvsvc_NetSrvInfo1005 *object = (struct srvsvc_NetSrvInfo1005 *)pytalloc_get_ptr(obj);
   20519             :         PyObject *py_comment;
   20520           0 :         if (object->comment == NULL) {
   20521           0 :                 Py_RETURN_NONE;
   20522             :         }
   20523           0 :         if (object->comment == NULL) {
   20524           0 :                 py_comment = Py_None;
   20525           0 :                 Py_INCREF(py_comment);
   20526             :         } else {
   20527           0 :                 if (object->comment == NULL) {
   20528           0 :                         py_comment = Py_None;
   20529           0 :                         Py_INCREF(py_comment);
   20530             :                 } else {
   20531           0 :                         py_comment = PyUnicode_Decode(object->comment, strlen(object->comment), "utf-8", "ignore");
   20532             :                 }
   20533             :         }
   20534           0 :         return py_comment;
   20535             : }
   20536             : 
   20537           0 : static int py_srvsvc_NetSrvInfo1005_set_comment(PyObject *py_obj, PyObject *value, void *closure)
   20538             : {
   20539           0 :         struct srvsvc_NetSrvInfo1005 *object = (struct srvsvc_NetSrvInfo1005 *)pytalloc_get_ptr(py_obj);
   20540           0 :         if (value == NULL) {
   20541           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->comment");
   20542           0 :                 return -1;
   20543             :         }
   20544           0 :         if (value == Py_None) {
   20545           0 :                 object->comment = NULL;
   20546             :         } else {
   20547           0 :                 object->comment = NULL;
   20548             :                 {
   20549             :                         const char *test_str;
   20550             :                         const char *talloc_str;
   20551           0 :                         PyObject *unicode = NULL;
   20552           0 :                         if (PyUnicode_Check(value)) {
   20553           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   20554           0 :                                 if (unicode == NULL) {
   20555           0 :                                         PyErr_NoMemory();
   20556           0 :                                         return -1;
   20557             :                                 }
   20558           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   20559           0 :                         } else if (PyBytes_Check(value)) {
   20560           0 :                                 test_str = PyBytes_AS_STRING(value);
   20561             :                         } else {
   20562           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   20563           0 :                                 return -1;
   20564             :                         }
   20565           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   20566           0 :                         if (unicode != NULL) {
   20567           0 :                                 Py_DECREF(unicode);
   20568             :                         }
   20569           0 :                         if (talloc_str == NULL) {
   20570           0 :                                 PyErr_NoMemory();
   20571           0 :                                 return -1;
   20572             :                         }
   20573           0 :                         object->comment = talloc_str;
   20574             :                 }
   20575             :         }
   20576           0 :         return 0;
   20577             : }
   20578             : 
   20579             : static PyGetSetDef py_srvsvc_NetSrvInfo1005_getsetters[] = {
   20580             :         {
   20581             :                 .name = discard_const_p(char, "comment"),
   20582             :                 .get = py_srvsvc_NetSrvInfo1005_get_comment,
   20583             :                 .set = py_srvsvc_NetSrvInfo1005_set_comment,
   20584             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   20585             :         },
   20586             :         { .name = NULL }
   20587             : };
   20588             : 
   20589           0 : static PyObject *py_srvsvc_NetSrvInfo1005_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20590             : {
   20591           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1005, type);
   20592             : }
   20593             : 
   20594             : 
   20595             : static PyTypeObject srvsvc_NetSrvInfo1005_Type = {
   20596             :         PyVarObject_HEAD_INIT(NULL, 0)
   20597             :         .tp_name = "srvsvc.NetSrvInfo1005",
   20598             :         .tp_getset = py_srvsvc_NetSrvInfo1005_getsetters,
   20599             :         .tp_methods = NULL,
   20600             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20601             :         .tp_new = py_srvsvc_NetSrvInfo1005_new,
   20602             : };
   20603             : 
   20604             : 
   20605           0 : static PyObject *py_srvsvc_NetSrvInfo1010_get_disc(PyObject *obj, void *closure)
   20606             : {
   20607           0 :         struct srvsvc_NetSrvInfo1010 *object = (struct srvsvc_NetSrvInfo1010 *)pytalloc_get_ptr(obj);
   20608             :         PyObject *py_disc;
   20609           0 :         py_disc = PyLong_FromUnsignedLongLong((uint32_t)object->disc);
   20610           0 :         return py_disc;
   20611             : }
   20612             : 
   20613           0 : static int py_srvsvc_NetSrvInfo1010_set_disc(PyObject *py_obj, PyObject *value, void *closure)
   20614             : {
   20615           0 :         struct srvsvc_NetSrvInfo1010 *object = (struct srvsvc_NetSrvInfo1010 *)pytalloc_get_ptr(py_obj);
   20616           0 :         if (value == NULL) {
   20617           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->disc");
   20618           0 :                 return -1;
   20619             :         }
   20620             :         {
   20621           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->disc));
   20622           0 :                 if (PyLong_Check(value)) {
   20623             :                         unsigned long long test_var;
   20624           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20625           0 :                         if (PyErr_Occurred() != NULL) {
   20626           0 :                                 return -1;
   20627             :                         }
   20628           0 :                         if (test_var > uint_max) {
   20629           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20630             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20631           0 :                                 return -1;
   20632             :                         }
   20633           0 :                         object->disc = test_var;
   20634             :                 } else {
   20635           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20636             :                           PyLong_Type.tp_name);
   20637           0 :                         return -1;
   20638             :                 }
   20639             :         }
   20640           0 :         return 0;
   20641             : }
   20642             : 
   20643             : static PyGetSetDef py_srvsvc_NetSrvInfo1010_getsetters[] = {
   20644             :         {
   20645             :                 .name = discard_const_p(char, "disc"),
   20646             :                 .get = py_srvsvc_NetSrvInfo1010_get_disc,
   20647             :                 .set = py_srvsvc_NetSrvInfo1010_set_disc,
   20648             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20649             :         },
   20650             :         { .name = NULL }
   20651             : };
   20652             : 
   20653           0 : static PyObject *py_srvsvc_NetSrvInfo1010_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20654             : {
   20655           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1010, type);
   20656             : }
   20657             : 
   20658             : 
   20659             : static PyTypeObject srvsvc_NetSrvInfo1010_Type = {
   20660             :         PyVarObject_HEAD_INIT(NULL, 0)
   20661             :         .tp_name = "srvsvc.NetSrvInfo1010",
   20662             :         .tp_getset = py_srvsvc_NetSrvInfo1010_getsetters,
   20663             :         .tp_methods = NULL,
   20664             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20665             :         .tp_new = py_srvsvc_NetSrvInfo1010_new,
   20666             : };
   20667             : 
   20668             : 
   20669           0 : static PyObject *py_srvsvc_NetSrvInfo1016_get_hidden(PyObject *obj, void *closure)
   20670             : {
   20671           0 :         struct srvsvc_NetSrvInfo1016 *object = (struct srvsvc_NetSrvInfo1016 *)pytalloc_get_ptr(obj);
   20672             :         PyObject *py_hidden;
   20673           0 :         py_hidden = PyLong_FromUnsignedLongLong((uint32_t)object->hidden);
   20674           0 :         return py_hidden;
   20675             : }
   20676             : 
   20677           0 : static int py_srvsvc_NetSrvInfo1016_set_hidden(PyObject *py_obj, PyObject *value, void *closure)
   20678             : {
   20679           0 :         struct srvsvc_NetSrvInfo1016 *object = (struct srvsvc_NetSrvInfo1016 *)pytalloc_get_ptr(py_obj);
   20680           0 :         if (value == NULL) {
   20681           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->hidden");
   20682           0 :                 return -1;
   20683             :         }
   20684             :         {
   20685           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->hidden));
   20686           0 :                 if (PyLong_Check(value)) {
   20687             :                         unsigned long long test_var;
   20688           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20689           0 :                         if (PyErr_Occurred() != NULL) {
   20690           0 :                                 return -1;
   20691             :                         }
   20692           0 :                         if (test_var > uint_max) {
   20693           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20694             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20695           0 :                                 return -1;
   20696             :                         }
   20697           0 :                         object->hidden = test_var;
   20698             :                 } else {
   20699           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20700             :                           PyLong_Type.tp_name);
   20701           0 :                         return -1;
   20702             :                 }
   20703             :         }
   20704           0 :         return 0;
   20705             : }
   20706             : 
   20707             : static PyGetSetDef py_srvsvc_NetSrvInfo1016_getsetters[] = {
   20708             :         {
   20709             :                 .name = discard_const_p(char, "hidden"),
   20710             :                 .get = py_srvsvc_NetSrvInfo1016_get_hidden,
   20711             :                 .set = py_srvsvc_NetSrvInfo1016_set_hidden,
   20712             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20713             :         },
   20714             :         { .name = NULL }
   20715             : };
   20716             : 
   20717           0 : static PyObject *py_srvsvc_NetSrvInfo1016_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20718             : {
   20719           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1016, type);
   20720             : }
   20721             : 
   20722             : 
   20723             : static PyTypeObject srvsvc_NetSrvInfo1016_Type = {
   20724             :         PyVarObject_HEAD_INIT(NULL, 0)
   20725             :         .tp_name = "srvsvc.NetSrvInfo1016",
   20726             :         .tp_getset = py_srvsvc_NetSrvInfo1016_getsetters,
   20727             :         .tp_methods = NULL,
   20728             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20729             :         .tp_new = py_srvsvc_NetSrvInfo1016_new,
   20730             : };
   20731             : 
   20732             : 
   20733           0 : static PyObject *py_srvsvc_NetSrvInfo1017_get_announce(PyObject *obj, void *closure)
   20734             : {
   20735           0 :         struct srvsvc_NetSrvInfo1017 *object = (struct srvsvc_NetSrvInfo1017 *)pytalloc_get_ptr(obj);
   20736             :         PyObject *py_announce;
   20737           0 :         py_announce = PyLong_FromUnsignedLongLong((uint32_t)object->announce);
   20738           0 :         return py_announce;
   20739             : }
   20740             : 
   20741           0 : static int py_srvsvc_NetSrvInfo1017_set_announce(PyObject *py_obj, PyObject *value, void *closure)
   20742             : {
   20743           0 :         struct srvsvc_NetSrvInfo1017 *object = (struct srvsvc_NetSrvInfo1017 *)pytalloc_get_ptr(py_obj);
   20744           0 :         if (value == NULL) {
   20745           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->announce");
   20746           0 :                 return -1;
   20747             :         }
   20748             :         {
   20749           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->announce));
   20750           0 :                 if (PyLong_Check(value)) {
   20751             :                         unsigned long long test_var;
   20752           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20753           0 :                         if (PyErr_Occurred() != NULL) {
   20754           0 :                                 return -1;
   20755             :                         }
   20756           0 :                         if (test_var > uint_max) {
   20757           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20758             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20759           0 :                                 return -1;
   20760             :                         }
   20761           0 :                         object->announce = test_var;
   20762             :                 } else {
   20763           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20764             :                           PyLong_Type.tp_name);
   20765           0 :                         return -1;
   20766             :                 }
   20767             :         }
   20768           0 :         return 0;
   20769             : }
   20770             : 
   20771             : static PyGetSetDef py_srvsvc_NetSrvInfo1017_getsetters[] = {
   20772             :         {
   20773             :                 .name = discard_const_p(char, "announce"),
   20774             :                 .get = py_srvsvc_NetSrvInfo1017_get_announce,
   20775             :                 .set = py_srvsvc_NetSrvInfo1017_set_announce,
   20776             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20777             :         },
   20778             :         { .name = NULL }
   20779             : };
   20780             : 
   20781           0 : static PyObject *py_srvsvc_NetSrvInfo1017_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20782             : {
   20783           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1017, type);
   20784             : }
   20785             : 
   20786             : 
   20787             : static PyTypeObject srvsvc_NetSrvInfo1017_Type = {
   20788             :         PyVarObject_HEAD_INIT(NULL, 0)
   20789             :         .tp_name = "srvsvc.NetSrvInfo1017",
   20790             :         .tp_getset = py_srvsvc_NetSrvInfo1017_getsetters,
   20791             :         .tp_methods = NULL,
   20792             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20793             :         .tp_new = py_srvsvc_NetSrvInfo1017_new,
   20794             : };
   20795             : 
   20796             : 
   20797           0 : static PyObject *py_srvsvc_NetSrvInfo1018_get_anndelta(PyObject *obj, void *closure)
   20798             : {
   20799           0 :         struct srvsvc_NetSrvInfo1018 *object = (struct srvsvc_NetSrvInfo1018 *)pytalloc_get_ptr(obj);
   20800             :         PyObject *py_anndelta;
   20801           0 :         py_anndelta = PyLong_FromUnsignedLongLong((uint32_t)object->anndelta);
   20802           0 :         return py_anndelta;
   20803             : }
   20804             : 
   20805           0 : static int py_srvsvc_NetSrvInfo1018_set_anndelta(PyObject *py_obj, PyObject *value, void *closure)
   20806             : {
   20807           0 :         struct srvsvc_NetSrvInfo1018 *object = (struct srvsvc_NetSrvInfo1018 *)pytalloc_get_ptr(py_obj);
   20808           0 :         if (value == NULL) {
   20809           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->anndelta");
   20810           0 :                 return -1;
   20811             :         }
   20812             :         {
   20813           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->anndelta));
   20814           0 :                 if (PyLong_Check(value)) {
   20815             :                         unsigned long long test_var;
   20816           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20817           0 :                         if (PyErr_Occurred() != NULL) {
   20818           0 :                                 return -1;
   20819             :                         }
   20820           0 :                         if (test_var > uint_max) {
   20821           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20822             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20823           0 :                                 return -1;
   20824             :                         }
   20825           0 :                         object->anndelta = test_var;
   20826             :                 } else {
   20827           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20828             :                           PyLong_Type.tp_name);
   20829           0 :                         return -1;
   20830             :                 }
   20831             :         }
   20832           0 :         return 0;
   20833             : }
   20834             : 
   20835             : static PyGetSetDef py_srvsvc_NetSrvInfo1018_getsetters[] = {
   20836             :         {
   20837             :                 .name = discard_const_p(char, "anndelta"),
   20838             :                 .get = py_srvsvc_NetSrvInfo1018_get_anndelta,
   20839             :                 .set = py_srvsvc_NetSrvInfo1018_set_anndelta,
   20840             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20841             :         },
   20842             :         { .name = NULL }
   20843             : };
   20844             : 
   20845           0 : static PyObject *py_srvsvc_NetSrvInfo1018_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20846             : {
   20847           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1018, type);
   20848             : }
   20849             : 
   20850             : 
   20851             : static PyTypeObject srvsvc_NetSrvInfo1018_Type = {
   20852             :         PyVarObject_HEAD_INIT(NULL, 0)
   20853             :         .tp_name = "srvsvc.NetSrvInfo1018",
   20854             :         .tp_getset = py_srvsvc_NetSrvInfo1018_getsetters,
   20855             :         .tp_methods = NULL,
   20856             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20857             :         .tp_new = py_srvsvc_NetSrvInfo1018_new,
   20858             : };
   20859             : 
   20860             : 
   20861           0 : static PyObject *py_srvsvc_NetSrvInfo1107_get_users(PyObject *obj, void *closure)
   20862             : {
   20863           0 :         struct srvsvc_NetSrvInfo1107 *object = (struct srvsvc_NetSrvInfo1107 *)pytalloc_get_ptr(obj);
   20864             :         PyObject *py_users;
   20865           0 :         py_users = PyLong_FromUnsignedLongLong((uint32_t)object->users);
   20866           0 :         return py_users;
   20867             : }
   20868             : 
   20869           0 : static int py_srvsvc_NetSrvInfo1107_set_users(PyObject *py_obj, PyObject *value, void *closure)
   20870             : {
   20871           0 :         struct srvsvc_NetSrvInfo1107 *object = (struct srvsvc_NetSrvInfo1107 *)pytalloc_get_ptr(py_obj);
   20872           0 :         if (value == NULL) {
   20873           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->users");
   20874           0 :                 return -1;
   20875             :         }
   20876             :         {
   20877           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->users));
   20878           0 :                 if (PyLong_Check(value)) {
   20879             :                         unsigned long long test_var;
   20880           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20881           0 :                         if (PyErr_Occurred() != NULL) {
   20882           0 :                                 return -1;
   20883             :                         }
   20884           0 :                         if (test_var > uint_max) {
   20885           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20886             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20887           0 :                                 return -1;
   20888             :                         }
   20889           0 :                         object->users = test_var;
   20890             :                 } else {
   20891           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20892             :                           PyLong_Type.tp_name);
   20893           0 :                         return -1;
   20894             :                 }
   20895             :         }
   20896           0 :         return 0;
   20897             : }
   20898             : 
   20899             : static PyGetSetDef py_srvsvc_NetSrvInfo1107_getsetters[] = {
   20900             :         {
   20901             :                 .name = discard_const_p(char, "users"),
   20902             :                 .get = py_srvsvc_NetSrvInfo1107_get_users,
   20903             :                 .set = py_srvsvc_NetSrvInfo1107_set_users,
   20904             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20905             :         },
   20906             :         { .name = NULL }
   20907             : };
   20908             : 
   20909           0 : static PyObject *py_srvsvc_NetSrvInfo1107_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20910             : {
   20911           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1107, type);
   20912             : }
   20913             : 
   20914             : 
   20915             : static PyTypeObject srvsvc_NetSrvInfo1107_Type = {
   20916             :         PyVarObject_HEAD_INIT(NULL, 0)
   20917             :         .tp_name = "srvsvc.NetSrvInfo1107",
   20918             :         .tp_getset = py_srvsvc_NetSrvInfo1107_getsetters,
   20919             :         .tp_methods = NULL,
   20920             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20921             :         .tp_new = py_srvsvc_NetSrvInfo1107_new,
   20922             : };
   20923             : 
   20924             : 
   20925           0 : static PyObject *py_srvsvc_NetSrvInfo1501_get_sessopens(PyObject *obj, void *closure)
   20926             : {
   20927           0 :         struct srvsvc_NetSrvInfo1501 *object = (struct srvsvc_NetSrvInfo1501 *)pytalloc_get_ptr(obj);
   20928             :         PyObject *py_sessopens;
   20929           0 :         py_sessopens = PyLong_FromUnsignedLongLong((uint32_t)object->sessopens);
   20930           0 :         return py_sessopens;
   20931             : }
   20932             : 
   20933           0 : static int py_srvsvc_NetSrvInfo1501_set_sessopens(PyObject *py_obj, PyObject *value, void *closure)
   20934             : {
   20935           0 :         struct srvsvc_NetSrvInfo1501 *object = (struct srvsvc_NetSrvInfo1501 *)pytalloc_get_ptr(py_obj);
   20936           0 :         if (value == NULL) {
   20937           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessopens");
   20938           0 :                 return -1;
   20939             :         }
   20940             :         {
   20941           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessopens));
   20942           0 :                 if (PyLong_Check(value)) {
   20943             :                         unsigned long long test_var;
   20944           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20945           0 :                         if (PyErr_Occurred() != NULL) {
   20946           0 :                                 return -1;
   20947             :                         }
   20948           0 :                         if (test_var > uint_max) {
   20949           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20950             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20951           0 :                                 return -1;
   20952             :                         }
   20953           0 :                         object->sessopens = test_var;
   20954             :                 } else {
   20955           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20956             :                           PyLong_Type.tp_name);
   20957           0 :                         return -1;
   20958             :                 }
   20959             :         }
   20960           0 :         return 0;
   20961             : }
   20962             : 
   20963             : static PyGetSetDef py_srvsvc_NetSrvInfo1501_getsetters[] = {
   20964             :         {
   20965             :                 .name = discard_const_p(char, "sessopens"),
   20966             :                 .get = py_srvsvc_NetSrvInfo1501_get_sessopens,
   20967             :                 .set = py_srvsvc_NetSrvInfo1501_set_sessopens,
   20968             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20969             :         },
   20970             :         { .name = NULL }
   20971             : };
   20972             : 
   20973           0 : static PyObject *py_srvsvc_NetSrvInfo1501_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20974             : {
   20975           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1501, type);
   20976             : }
   20977             : 
   20978             : 
   20979             : static PyTypeObject srvsvc_NetSrvInfo1501_Type = {
   20980             :         PyVarObject_HEAD_INIT(NULL, 0)
   20981             :         .tp_name = "srvsvc.NetSrvInfo1501",
   20982             :         .tp_getset = py_srvsvc_NetSrvInfo1501_getsetters,
   20983             :         .tp_methods = NULL,
   20984             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20985             :         .tp_new = py_srvsvc_NetSrvInfo1501_new,
   20986             : };
   20987             : 
   20988             : 
   20989           0 : static PyObject *py_srvsvc_NetSrvInfo1502_get_sessvcs(PyObject *obj, void *closure)
   20990             : {
   20991           0 :         struct srvsvc_NetSrvInfo1502 *object = (struct srvsvc_NetSrvInfo1502 *)pytalloc_get_ptr(obj);
   20992             :         PyObject *py_sessvcs;
   20993           0 :         py_sessvcs = PyLong_FromUnsignedLongLong((uint32_t)object->sessvcs);
   20994           0 :         return py_sessvcs;
   20995             : }
   20996             : 
   20997           0 : static int py_srvsvc_NetSrvInfo1502_set_sessvcs(PyObject *py_obj, PyObject *value, void *closure)
   20998             : {
   20999           0 :         struct srvsvc_NetSrvInfo1502 *object = (struct srvsvc_NetSrvInfo1502 *)pytalloc_get_ptr(py_obj);
   21000           0 :         if (value == NULL) {
   21001           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessvcs");
   21002           0 :                 return -1;
   21003             :         }
   21004             :         {
   21005           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessvcs));
   21006           0 :                 if (PyLong_Check(value)) {
   21007             :                         unsigned long long test_var;
   21008           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21009           0 :                         if (PyErr_Occurred() != NULL) {
   21010           0 :                                 return -1;
   21011             :                         }
   21012           0 :                         if (test_var > uint_max) {
   21013           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21014             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21015           0 :                                 return -1;
   21016             :                         }
   21017           0 :                         object->sessvcs = test_var;
   21018             :                 } else {
   21019           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21020             :                           PyLong_Type.tp_name);
   21021           0 :                         return -1;
   21022             :                 }
   21023             :         }
   21024           0 :         return 0;
   21025             : }
   21026             : 
   21027             : static PyGetSetDef py_srvsvc_NetSrvInfo1502_getsetters[] = {
   21028             :         {
   21029             :                 .name = discard_const_p(char, "sessvcs"),
   21030             :                 .get = py_srvsvc_NetSrvInfo1502_get_sessvcs,
   21031             :                 .set = py_srvsvc_NetSrvInfo1502_set_sessvcs,
   21032             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21033             :         },
   21034             :         { .name = NULL }
   21035             : };
   21036             : 
   21037           0 : static PyObject *py_srvsvc_NetSrvInfo1502_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21038             : {
   21039           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1502, type);
   21040             : }
   21041             : 
   21042             : 
   21043             : static PyTypeObject srvsvc_NetSrvInfo1502_Type = {
   21044             :         PyVarObject_HEAD_INIT(NULL, 0)
   21045             :         .tp_name = "srvsvc.NetSrvInfo1502",
   21046             :         .tp_getset = py_srvsvc_NetSrvInfo1502_getsetters,
   21047             :         .tp_methods = NULL,
   21048             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21049             :         .tp_new = py_srvsvc_NetSrvInfo1502_new,
   21050             : };
   21051             : 
   21052             : 
   21053           0 : static PyObject *py_srvsvc_NetSrvInfo1503_get_opensearch(PyObject *obj, void *closure)
   21054             : {
   21055           0 :         struct srvsvc_NetSrvInfo1503 *object = (struct srvsvc_NetSrvInfo1503 *)pytalloc_get_ptr(obj);
   21056             :         PyObject *py_opensearch;
   21057           0 :         py_opensearch = PyLong_FromUnsignedLongLong((uint32_t)object->opensearch);
   21058           0 :         return py_opensearch;
   21059             : }
   21060             : 
   21061           0 : static int py_srvsvc_NetSrvInfo1503_set_opensearch(PyObject *py_obj, PyObject *value, void *closure)
   21062             : {
   21063           0 :         struct srvsvc_NetSrvInfo1503 *object = (struct srvsvc_NetSrvInfo1503 *)pytalloc_get_ptr(py_obj);
   21064           0 :         if (value == NULL) {
   21065           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->opensearch");
   21066           0 :                 return -1;
   21067             :         }
   21068             :         {
   21069           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->opensearch));
   21070           0 :                 if (PyLong_Check(value)) {
   21071             :                         unsigned long long test_var;
   21072           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21073           0 :                         if (PyErr_Occurred() != NULL) {
   21074           0 :                                 return -1;
   21075             :                         }
   21076           0 :                         if (test_var > uint_max) {
   21077           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21078             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21079           0 :                                 return -1;
   21080             :                         }
   21081           0 :                         object->opensearch = test_var;
   21082             :                 } else {
   21083           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21084             :                           PyLong_Type.tp_name);
   21085           0 :                         return -1;
   21086             :                 }
   21087             :         }
   21088           0 :         return 0;
   21089             : }
   21090             : 
   21091             : static PyGetSetDef py_srvsvc_NetSrvInfo1503_getsetters[] = {
   21092             :         {
   21093             :                 .name = discard_const_p(char, "opensearch"),
   21094             :                 .get = py_srvsvc_NetSrvInfo1503_get_opensearch,
   21095             :                 .set = py_srvsvc_NetSrvInfo1503_set_opensearch,
   21096             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21097             :         },
   21098             :         { .name = NULL }
   21099             : };
   21100             : 
   21101           0 : static PyObject *py_srvsvc_NetSrvInfo1503_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21102             : {
   21103           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1503, type);
   21104             : }
   21105             : 
   21106             : 
   21107             : static PyTypeObject srvsvc_NetSrvInfo1503_Type = {
   21108             :         PyVarObject_HEAD_INIT(NULL, 0)
   21109             :         .tp_name = "srvsvc.NetSrvInfo1503",
   21110             :         .tp_getset = py_srvsvc_NetSrvInfo1503_getsetters,
   21111             :         .tp_methods = NULL,
   21112             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21113             :         .tp_new = py_srvsvc_NetSrvInfo1503_new,
   21114             : };
   21115             : 
   21116             : 
   21117           0 : static PyObject *py_srvsvc_NetSrvInfo1506_get_maxworkitems(PyObject *obj, void *closure)
   21118             : {
   21119           0 :         struct srvsvc_NetSrvInfo1506 *object = (struct srvsvc_NetSrvInfo1506 *)pytalloc_get_ptr(obj);
   21120             :         PyObject *py_maxworkitems;
   21121           0 :         py_maxworkitems = PyLong_FromUnsignedLongLong((uint32_t)object->maxworkitems);
   21122           0 :         return py_maxworkitems;
   21123             : }
   21124             : 
   21125           0 : static int py_srvsvc_NetSrvInfo1506_set_maxworkitems(PyObject *py_obj, PyObject *value, void *closure)
   21126             : {
   21127           0 :         struct srvsvc_NetSrvInfo1506 *object = (struct srvsvc_NetSrvInfo1506 *)pytalloc_get_ptr(py_obj);
   21128           0 :         if (value == NULL) {
   21129           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxworkitems");
   21130           0 :                 return -1;
   21131             :         }
   21132             :         {
   21133           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxworkitems));
   21134           0 :                 if (PyLong_Check(value)) {
   21135             :                         unsigned long long test_var;
   21136           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21137           0 :                         if (PyErr_Occurred() != NULL) {
   21138           0 :                                 return -1;
   21139             :                         }
   21140           0 :                         if (test_var > uint_max) {
   21141           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21142             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21143           0 :                                 return -1;
   21144             :                         }
   21145           0 :                         object->maxworkitems = test_var;
   21146             :                 } else {
   21147           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21148             :                           PyLong_Type.tp_name);
   21149           0 :                         return -1;
   21150             :                 }
   21151             :         }
   21152           0 :         return 0;
   21153             : }
   21154             : 
   21155             : static PyGetSetDef py_srvsvc_NetSrvInfo1506_getsetters[] = {
   21156             :         {
   21157             :                 .name = discard_const_p(char, "maxworkitems"),
   21158             :                 .get = py_srvsvc_NetSrvInfo1506_get_maxworkitems,
   21159             :                 .set = py_srvsvc_NetSrvInfo1506_set_maxworkitems,
   21160             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21161             :         },
   21162             :         { .name = NULL }
   21163             : };
   21164             : 
   21165           0 : static PyObject *py_srvsvc_NetSrvInfo1506_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21166             : {
   21167           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1506, type);
   21168             : }
   21169             : 
   21170             : 
   21171             : static PyTypeObject srvsvc_NetSrvInfo1506_Type = {
   21172             :         PyVarObject_HEAD_INIT(NULL, 0)
   21173             :         .tp_name = "srvsvc.NetSrvInfo1506",
   21174             :         .tp_getset = py_srvsvc_NetSrvInfo1506_getsetters,
   21175             :         .tp_methods = NULL,
   21176             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21177             :         .tp_new = py_srvsvc_NetSrvInfo1506_new,
   21178             : };
   21179             : 
   21180             : 
   21181           0 : static PyObject *py_srvsvc_NetSrvInfo1509_get_maxrawbuflen(PyObject *obj, void *closure)
   21182             : {
   21183           0 :         struct srvsvc_NetSrvInfo1509 *object = (struct srvsvc_NetSrvInfo1509 *)pytalloc_get_ptr(obj);
   21184             :         PyObject *py_maxrawbuflen;
   21185           0 :         py_maxrawbuflen = PyLong_FromUnsignedLongLong((uint32_t)object->maxrawbuflen);
   21186           0 :         return py_maxrawbuflen;
   21187             : }
   21188             : 
   21189           0 : static int py_srvsvc_NetSrvInfo1509_set_maxrawbuflen(PyObject *py_obj, PyObject *value, void *closure)
   21190             : {
   21191           0 :         struct srvsvc_NetSrvInfo1509 *object = (struct srvsvc_NetSrvInfo1509 *)pytalloc_get_ptr(py_obj);
   21192           0 :         if (value == NULL) {
   21193           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxrawbuflen");
   21194           0 :                 return -1;
   21195             :         }
   21196             :         {
   21197           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxrawbuflen));
   21198           0 :                 if (PyLong_Check(value)) {
   21199             :                         unsigned long long test_var;
   21200           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21201           0 :                         if (PyErr_Occurred() != NULL) {
   21202           0 :                                 return -1;
   21203             :                         }
   21204           0 :                         if (test_var > uint_max) {
   21205           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21206             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21207           0 :                                 return -1;
   21208             :                         }
   21209           0 :                         object->maxrawbuflen = test_var;
   21210             :                 } else {
   21211           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21212             :                           PyLong_Type.tp_name);
   21213           0 :                         return -1;
   21214             :                 }
   21215             :         }
   21216           0 :         return 0;
   21217             : }
   21218             : 
   21219             : static PyGetSetDef py_srvsvc_NetSrvInfo1509_getsetters[] = {
   21220             :         {
   21221             :                 .name = discard_const_p(char, "maxrawbuflen"),
   21222             :                 .get = py_srvsvc_NetSrvInfo1509_get_maxrawbuflen,
   21223             :                 .set = py_srvsvc_NetSrvInfo1509_set_maxrawbuflen,
   21224             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21225             :         },
   21226             :         { .name = NULL }
   21227             : };
   21228             : 
   21229           0 : static PyObject *py_srvsvc_NetSrvInfo1509_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21230             : {
   21231           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1509, type);
   21232             : }
   21233             : 
   21234             : 
   21235             : static PyTypeObject srvsvc_NetSrvInfo1509_Type = {
   21236             :         PyVarObject_HEAD_INIT(NULL, 0)
   21237             :         .tp_name = "srvsvc.NetSrvInfo1509",
   21238             :         .tp_getset = py_srvsvc_NetSrvInfo1509_getsetters,
   21239             :         .tp_methods = NULL,
   21240             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21241             :         .tp_new = py_srvsvc_NetSrvInfo1509_new,
   21242             : };
   21243             : 
   21244             : 
   21245           0 : static PyObject *py_srvsvc_NetSrvInfo1510_get_sessusers(PyObject *obj, void *closure)
   21246             : {
   21247           0 :         struct srvsvc_NetSrvInfo1510 *object = (struct srvsvc_NetSrvInfo1510 *)pytalloc_get_ptr(obj);
   21248             :         PyObject *py_sessusers;
   21249           0 :         py_sessusers = PyLong_FromUnsignedLongLong((uint32_t)object->sessusers);
   21250           0 :         return py_sessusers;
   21251             : }
   21252             : 
   21253           0 : static int py_srvsvc_NetSrvInfo1510_set_sessusers(PyObject *py_obj, PyObject *value, void *closure)
   21254             : {
   21255           0 :         struct srvsvc_NetSrvInfo1510 *object = (struct srvsvc_NetSrvInfo1510 *)pytalloc_get_ptr(py_obj);
   21256           0 :         if (value == NULL) {
   21257           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sessusers");
   21258           0 :                 return -1;
   21259             :         }
   21260             :         {
   21261           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sessusers));
   21262           0 :                 if (PyLong_Check(value)) {
   21263             :                         unsigned long long test_var;
   21264           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21265           0 :                         if (PyErr_Occurred() != NULL) {
   21266           0 :                                 return -1;
   21267             :                         }
   21268           0 :                         if (test_var > uint_max) {
   21269           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21270             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21271           0 :                                 return -1;
   21272             :                         }
   21273           0 :                         object->sessusers = test_var;
   21274             :                 } else {
   21275           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21276             :                           PyLong_Type.tp_name);
   21277           0 :                         return -1;
   21278             :                 }
   21279             :         }
   21280           0 :         return 0;
   21281             : }
   21282             : 
   21283             : static PyGetSetDef py_srvsvc_NetSrvInfo1510_getsetters[] = {
   21284             :         {
   21285             :                 .name = discard_const_p(char, "sessusers"),
   21286             :                 .get = py_srvsvc_NetSrvInfo1510_get_sessusers,
   21287             :                 .set = py_srvsvc_NetSrvInfo1510_set_sessusers,
   21288             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21289             :         },
   21290             :         { .name = NULL }
   21291             : };
   21292             : 
   21293           0 : static PyObject *py_srvsvc_NetSrvInfo1510_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21294             : {
   21295           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1510, type);
   21296             : }
   21297             : 
   21298             : 
   21299             : static PyTypeObject srvsvc_NetSrvInfo1510_Type = {
   21300             :         PyVarObject_HEAD_INIT(NULL, 0)
   21301             :         .tp_name = "srvsvc.NetSrvInfo1510",
   21302             :         .tp_getset = py_srvsvc_NetSrvInfo1510_getsetters,
   21303             :         .tp_methods = NULL,
   21304             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21305             :         .tp_new = py_srvsvc_NetSrvInfo1510_new,
   21306             : };
   21307             : 
   21308             : 
   21309           0 : static PyObject *py_srvsvc_NetSrvInfo1511_get_sesscons(PyObject *obj, void *closure)
   21310             : {
   21311           0 :         struct srvsvc_NetSrvInfo1511 *object = (struct srvsvc_NetSrvInfo1511 *)pytalloc_get_ptr(obj);
   21312             :         PyObject *py_sesscons;
   21313           0 :         py_sesscons = PyLong_FromUnsignedLongLong((uint32_t)object->sesscons);
   21314           0 :         return py_sesscons;
   21315             : }
   21316             : 
   21317           0 : static int py_srvsvc_NetSrvInfo1511_set_sesscons(PyObject *py_obj, PyObject *value, void *closure)
   21318             : {
   21319           0 :         struct srvsvc_NetSrvInfo1511 *object = (struct srvsvc_NetSrvInfo1511 *)pytalloc_get_ptr(py_obj);
   21320           0 :         if (value == NULL) {
   21321           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sesscons");
   21322           0 :                 return -1;
   21323             :         }
   21324             :         {
   21325           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sesscons));
   21326           0 :                 if (PyLong_Check(value)) {
   21327             :                         unsigned long long test_var;
   21328           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21329           0 :                         if (PyErr_Occurred() != NULL) {
   21330           0 :                                 return -1;
   21331             :                         }
   21332           0 :                         if (test_var > uint_max) {
   21333           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21334             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21335           0 :                                 return -1;
   21336             :                         }
   21337           0 :                         object->sesscons = test_var;
   21338             :                 } else {
   21339           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21340             :                           PyLong_Type.tp_name);
   21341           0 :                         return -1;
   21342             :                 }
   21343             :         }
   21344           0 :         return 0;
   21345             : }
   21346             : 
   21347             : static PyGetSetDef py_srvsvc_NetSrvInfo1511_getsetters[] = {
   21348             :         {
   21349             :                 .name = discard_const_p(char, "sesscons"),
   21350             :                 .get = py_srvsvc_NetSrvInfo1511_get_sesscons,
   21351             :                 .set = py_srvsvc_NetSrvInfo1511_set_sesscons,
   21352             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21353             :         },
   21354             :         { .name = NULL }
   21355             : };
   21356             : 
   21357           0 : static PyObject *py_srvsvc_NetSrvInfo1511_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21358             : {
   21359           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1511, type);
   21360             : }
   21361             : 
   21362             : 
   21363             : static PyTypeObject srvsvc_NetSrvInfo1511_Type = {
   21364             :         PyVarObject_HEAD_INIT(NULL, 0)
   21365             :         .tp_name = "srvsvc.NetSrvInfo1511",
   21366             :         .tp_getset = py_srvsvc_NetSrvInfo1511_getsetters,
   21367             :         .tp_methods = NULL,
   21368             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21369             :         .tp_new = py_srvsvc_NetSrvInfo1511_new,
   21370             : };
   21371             : 
   21372             : 
   21373           0 : static PyObject *py_srvsvc_NetSrvInfo1512_get_maxnonpagedmemoryusage(PyObject *obj, void *closure)
   21374             : {
   21375           0 :         struct srvsvc_NetSrvInfo1512 *object = (struct srvsvc_NetSrvInfo1512 *)pytalloc_get_ptr(obj);
   21376             :         PyObject *py_maxnonpagedmemoryusage;
   21377           0 :         py_maxnonpagedmemoryusage = PyLong_FromUnsignedLongLong((uint32_t)object->maxnonpagedmemoryusage);
   21378           0 :         return py_maxnonpagedmemoryusage;
   21379             : }
   21380             : 
   21381           0 : static int py_srvsvc_NetSrvInfo1512_set_maxnonpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
   21382             : {
   21383           0 :         struct srvsvc_NetSrvInfo1512 *object = (struct srvsvc_NetSrvInfo1512 *)pytalloc_get_ptr(py_obj);
   21384           0 :         if (value == NULL) {
   21385           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxnonpagedmemoryusage");
   21386           0 :                 return -1;
   21387             :         }
   21388             :         {
   21389           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxnonpagedmemoryusage));
   21390           0 :                 if (PyLong_Check(value)) {
   21391             :                         unsigned long long test_var;
   21392           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21393           0 :                         if (PyErr_Occurred() != NULL) {
   21394           0 :                                 return -1;
   21395             :                         }
   21396           0 :                         if (test_var > uint_max) {
   21397           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21398             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21399           0 :                                 return -1;
   21400             :                         }
   21401           0 :                         object->maxnonpagedmemoryusage = test_var;
   21402             :                 } else {
   21403           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21404             :                           PyLong_Type.tp_name);
   21405           0 :                         return -1;
   21406             :                 }
   21407             :         }
   21408           0 :         return 0;
   21409             : }
   21410             : 
   21411             : static PyGetSetDef py_srvsvc_NetSrvInfo1512_getsetters[] = {
   21412             :         {
   21413             :                 .name = discard_const_p(char, "maxnonpagedmemoryusage"),
   21414             :                 .get = py_srvsvc_NetSrvInfo1512_get_maxnonpagedmemoryusage,
   21415             :                 .set = py_srvsvc_NetSrvInfo1512_set_maxnonpagedmemoryusage,
   21416             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21417             :         },
   21418             :         { .name = NULL }
   21419             : };
   21420             : 
   21421           0 : static PyObject *py_srvsvc_NetSrvInfo1512_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21422             : {
   21423           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1512, type);
   21424             : }
   21425             : 
   21426             : 
   21427             : static PyTypeObject srvsvc_NetSrvInfo1512_Type = {
   21428             :         PyVarObject_HEAD_INIT(NULL, 0)
   21429             :         .tp_name = "srvsvc.NetSrvInfo1512",
   21430             :         .tp_getset = py_srvsvc_NetSrvInfo1512_getsetters,
   21431             :         .tp_methods = NULL,
   21432             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21433             :         .tp_new = py_srvsvc_NetSrvInfo1512_new,
   21434             : };
   21435             : 
   21436             : 
   21437           0 : static PyObject *py_srvsvc_NetSrvInfo1513_get_maxpagedmemoryusage(PyObject *obj, void *closure)
   21438             : {
   21439           0 :         struct srvsvc_NetSrvInfo1513 *object = (struct srvsvc_NetSrvInfo1513 *)pytalloc_get_ptr(obj);
   21440             :         PyObject *py_maxpagedmemoryusage;
   21441           0 :         py_maxpagedmemoryusage = PyLong_FromUnsignedLongLong((uint32_t)object->maxpagedmemoryusage);
   21442           0 :         return py_maxpagedmemoryusage;
   21443             : }
   21444             : 
   21445           0 : static int py_srvsvc_NetSrvInfo1513_set_maxpagedmemoryusage(PyObject *py_obj, PyObject *value, void *closure)
   21446             : {
   21447           0 :         struct srvsvc_NetSrvInfo1513 *object = (struct srvsvc_NetSrvInfo1513 *)pytalloc_get_ptr(py_obj);
   21448           0 :         if (value == NULL) {
   21449           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxpagedmemoryusage");
   21450           0 :                 return -1;
   21451             :         }
   21452             :         {
   21453           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxpagedmemoryusage));
   21454           0 :                 if (PyLong_Check(value)) {
   21455             :                         unsigned long long test_var;
   21456           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21457           0 :                         if (PyErr_Occurred() != NULL) {
   21458           0 :                                 return -1;
   21459             :                         }
   21460           0 :                         if (test_var > uint_max) {
   21461           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21462             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21463           0 :                                 return -1;
   21464             :                         }
   21465           0 :                         object->maxpagedmemoryusage = test_var;
   21466             :                 } else {
   21467           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21468             :                           PyLong_Type.tp_name);
   21469           0 :                         return -1;
   21470             :                 }
   21471             :         }
   21472           0 :         return 0;
   21473             : }
   21474             : 
   21475             : static PyGetSetDef py_srvsvc_NetSrvInfo1513_getsetters[] = {
   21476             :         {
   21477             :                 .name = discard_const_p(char, "maxpagedmemoryusage"),
   21478             :                 .get = py_srvsvc_NetSrvInfo1513_get_maxpagedmemoryusage,
   21479             :                 .set = py_srvsvc_NetSrvInfo1513_set_maxpagedmemoryusage,
   21480             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21481             :         },
   21482             :         { .name = NULL }
   21483             : };
   21484             : 
   21485           0 : static PyObject *py_srvsvc_NetSrvInfo1513_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21486             : {
   21487           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1513, type);
   21488             : }
   21489             : 
   21490             : 
   21491             : static PyTypeObject srvsvc_NetSrvInfo1513_Type = {
   21492             :         PyVarObject_HEAD_INIT(NULL, 0)
   21493             :         .tp_name = "srvsvc.NetSrvInfo1513",
   21494             :         .tp_getset = py_srvsvc_NetSrvInfo1513_getsetters,
   21495             :         .tp_methods = NULL,
   21496             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21497             :         .tp_new = py_srvsvc_NetSrvInfo1513_new,
   21498             : };
   21499             : 
   21500             : 
   21501           0 : static PyObject *py_srvsvc_NetSrvInfo1514_get_enablesoftcompat(PyObject *obj, void *closure)
   21502             : {
   21503           0 :         struct srvsvc_NetSrvInfo1514 *object = (struct srvsvc_NetSrvInfo1514 *)pytalloc_get_ptr(obj);
   21504             :         PyObject *py_enablesoftcompat;
   21505           0 :         py_enablesoftcompat = PyLong_FromUnsignedLongLong((uint32_t)object->enablesoftcompat);
   21506           0 :         return py_enablesoftcompat;
   21507             : }
   21508             : 
   21509           0 : static int py_srvsvc_NetSrvInfo1514_set_enablesoftcompat(PyObject *py_obj, PyObject *value, void *closure)
   21510             : {
   21511           0 :         struct srvsvc_NetSrvInfo1514 *object = (struct srvsvc_NetSrvInfo1514 *)pytalloc_get_ptr(py_obj);
   21512           0 :         if (value == NULL) {
   21513           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enablesoftcompat");
   21514           0 :                 return -1;
   21515             :         }
   21516             :         {
   21517           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesoftcompat));
   21518           0 :                 if (PyLong_Check(value)) {
   21519             :                         unsigned long long test_var;
   21520           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21521           0 :                         if (PyErr_Occurred() != NULL) {
   21522           0 :                                 return -1;
   21523             :                         }
   21524           0 :                         if (test_var > uint_max) {
   21525           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21526             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21527           0 :                                 return -1;
   21528             :                         }
   21529           0 :                         object->enablesoftcompat = test_var;
   21530             :                 } else {
   21531           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21532             :                           PyLong_Type.tp_name);
   21533           0 :                         return -1;
   21534             :                 }
   21535             :         }
   21536           0 :         return 0;
   21537             : }
   21538             : 
   21539             : static PyGetSetDef py_srvsvc_NetSrvInfo1514_getsetters[] = {
   21540             :         {
   21541             :                 .name = discard_const_p(char, "enablesoftcompat"),
   21542             :                 .get = py_srvsvc_NetSrvInfo1514_get_enablesoftcompat,
   21543             :                 .set = py_srvsvc_NetSrvInfo1514_set_enablesoftcompat,
   21544             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21545             :         },
   21546             :         { .name = NULL }
   21547             : };
   21548             : 
   21549           0 : static PyObject *py_srvsvc_NetSrvInfo1514_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21550             : {
   21551           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1514, type);
   21552             : }
   21553             : 
   21554             : 
   21555             : static PyTypeObject srvsvc_NetSrvInfo1514_Type = {
   21556             :         PyVarObject_HEAD_INIT(NULL, 0)
   21557             :         .tp_name = "srvsvc.NetSrvInfo1514",
   21558             :         .tp_getset = py_srvsvc_NetSrvInfo1514_getsetters,
   21559             :         .tp_methods = NULL,
   21560             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21561             :         .tp_new = py_srvsvc_NetSrvInfo1514_new,
   21562             : };
   21563             : 
   21564             : 
   21565           0 : static PyObject *py_srvsvc_NetSrvInfo1515_get_enableforcedlogoff(PyObject *obj, void *closure)
   21566             : {
   21567           0 :         struct srvsvc_NetSrvInfo1515 *object = (struct srvsvc_NetSrvInfo1515 *)pytalloc_get_ptr(obj);
   21568             :         PyObject *py_enableforcedlogoff;
   21569           0 :         py_enableforcedlogoff = PyLong_FromUnsignedLongLong((uint32_t)object->enableforcedlogoff);
   21570           0 :         return py_enableforcedlogoff;
   21571             : }
   21572             : 
   21573           0 : static int py_srvsvc_NetSrvInfo1515_set_enableforcedlogoff(PyObject *py_obj, PyObject *value, void *closure)
   21574             : {
   21575           0 :         struct srvsvc_NetSrvInfo1515 *object = (struct srvsvc_NetSrvInfo1515 *)pytalloc_get_ptr(py_obj);
   21576           0 :         if (value == NULL) {
   21577           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enableforcedlogoff");
   21578           0 :                 return -1;
   21579             :         }
   21580             :         {
   21581           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableforcedlogoff));
   21582           0 :                 if (PyLong_Check(value)) {
   21583             :                         unsigned long long test_var;
   21584           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21585           0 :                         if (PyErr_Occurred() != NULL) {
   21586           0 :                                 return -1;
   21587             :                         }
   21588           0 :                         if (test_var > uint_max) {
   21589           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21590             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21591           0 :                                 return -1;
   21592             :                         }
   21593           0 :                         object->enableforcedlogoff = test_var;
   21594             :                 } else {
   21595           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21596             :                           PyLong_Type.tp_name);
   21597           0 :                         return -1;
   21598             :                 }
   21599             :         }
   21600           0 :         return 0;
   21601             : }
   21602             : 
   21603             : static PyGetSetDef py_srvsvc_NetSrvInfo1515_getsetters[] = {
   21604             :         {
   21605             :                 .name = discard_const_p(char, "enableforcedlogoff"),
   21606             :                 .get = py_srvsvc_NetSrvInfo1515_get_enableforcedlogoff,
   21607             :                 .set = py_srvsvc_NetSrvInfo1515_set_enableforcedlogoff,
   21608             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21609             :         },
   21610             :         { .name = NULL }
   21611             : };
   21612             : 
   21613           0 : static PyObject *py_srvsvc_NetSrvInfo1515_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21614             : {
   21615           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1515, type);
   21616             : }
   21617             : 
   21618             : 
   21619             : static PyTypeObject srvsvc_NetSrvInfo1515_Type = {
   21620             :         PyVarObject_HEAD_INIT(NULL, 0)
   21621             :         .tp_name = "srvsvc.NetSrvInfo1515",
   21622             :         .tp_getset = py_srvsvc_NetSrvInfo1515_getsetters,
   21623             :         .tp_methods = NULL,
   21624             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21625             :         .tp_new = py_srvsvc_NetSrvInfo1515_new,
   21626             : };
   21627             : 
   21628             : 
   21629           0 : static PyObject *py_srvsvc_NetSrvInfo1516_get_timesource(PyObject *obj, void *closure)
   21630             : {
   21631           0 :         struct srvsvc_NetSrvInfo1516 *object = (struct srvsvc_NetSrvInfo1516 *)pytalloc_get_ptr(obj);
   21632             :         PyObject *py_timesource;
   21633           0 :         py_timesource = PyLong_FromUnsignedLongLong((uint32_t)object->timesource);
   21634           0 :         return py_timesource;
   21635             : }
   21636             : 
   21637           0 : static int py_srvsvc_NetSrvInfo1516_set_timesource(PyObject *py_obj, PyObject *value, void *closure)
   21638             : {
   21639           0 :         struct srvsvc_NetSrvInfo1516 *object = (struct srvsvc_NetSrvInfo1516 *)pytalloc_get_ptr(py_obj);
   21640           0 :         if (value == NULL) {
   21641           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->timesource");
   21642           0 :                 return -1;
   21643             :         }
   21644             :         {
   21645           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timesource));
   21646           0 :                 if (PyLong_Check(value)) {
   21647             :                         unsigned long long test_var;
   21648           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21649           0 :                         if (PyErr_Occurred() != NULL) {
   21650           0 :                                 return -1;
   21651             :                         }
   21652           0 :                         if (test_var > uint_max) {
   21653           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21654             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21655           0 :                                 return -1;
   21656             :                         }
   21657           0 :                         object->timesource = test_var;
   21658             :                 } else {
   21659           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21660             :                           PyLong_Type.tp_name);
   21661           0 :                         return -1;
   21662             :                 }
   21663             :         }
   21664           0 :         return 0;
   21665             : }
   21666             : 
   21667             : static PyGetSetDef py_srvsvc_NetSrvInfo1516_getsetters[] = {
   21668             :         {
   21669             :                 .name = discard_const_p(char, "timesource"),
   21670             :                 .get = py_srvsvc_NetSrvInfo1516_get_timesource,
   21671             :                 .set = py_srvsvc_NetSrvInfo1516_set_timesource,
   21672             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21673             :         },
   21674             :         { .name = NULL }
   21675             : };
   21676             : 
   21677           0 : static PyObject *py_srvsvc_NetSrvInfo1516_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21678             : {
   21679           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1516, type);
   21680             : }
   21681             : 
   21682             : 
   21683             : static PyTypeObject srvsvc_NetSrvInfo1516_Type = {
   21684             :         PyVarObject_HEAD_INIT(NULL, 0)
   21685             :         .tp_name = "srvsvc.NetSrvInfo1516",
   21686             :         .tp_getset = py_srvsvc_NetSrvInfo1516_getsetters,
   21687             :         .tp_methods = NULL,
   21688             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21689             :         .tp_new = py_srvsvc_NetSrvInfo1516_new,
   21690             : };
   21691             : 
   21692             : 
   21693           0 : static PyObject *py_srvsvc_NetSrvInfo1518_get_lmannounce(PyObject *obj, void *closure)
   21694             : {
   21695           0 :         struct srvsvc_NetSrvInfo1518 *object = (struct srvsvc_NetSrvInfo1518 *)pytalloc_get_ptr(obj);
   21696             :         PyObject *py_lmannounce;
   21697           0 :         py_lmannounce = PyLong_FromUnsignedLongLong((uint32_t)object->lmannounce);
   21698           0 :         return py_lmannounce;
   21699             : }
   21700             : 
   21701           0 : static int py_srvsvc_NetSrvInfo1518_set_lmannounce(PyObject *py_obj, PyObject *value, void *closure)
   21702             : {
   21703           0 :         struct srvsvc_NetSrvInfo1518 *object = (struct srvsvc_NetSrvInfo1518 *)pytalloc_get_ptr(py_obj);
   21704           0 :         if (value == NULL) {
   21705           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lmannounce");
   21706           0 :                 return -1;
   21707             :         }
   21708             :         {
   21709           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lmannounce));
   21710           0 :                 if (PyLong_Check(value)) {
   21711             :                         unsigned long long test_var;
   21712           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21713           0 :                         if (PyErr_Occurred() != NULL) {
   21714           0 :                                 return -1;
   21715             :                         }
   21716           0 :                         if (test_var > uint_max) {
   21717           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21718             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21719           0 :                                 return -1;
   21720             :                         }
   21721           0 :                         object->lmannounce = test_var;
   21722             :                 } else {
   21723           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21724             :                           PyLong_Type.tp_name);
   21725           0 :                         return -1;
   21726             :                 }
   21727             :         }
   21728           0 :         return 0;
   21729             : }
   21730             : 
   21731             : static PyGetSetDef py_srvsvc_NetSrvInfo1518_getsetters[] = {
   21732             :         {
   21733             :                 .name = discard_const_p(char, "lmannounce"),
   21734             :                 .get = py_srvsvc_NetSrvInfo1518_get_lmannounce,
   21735             :                 .set = py_srvsvc_NetSrvInfo1518_set_lmannounce,
   21736             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21737             :         },
   21738             :         { .name = NULL }
   21739             : };
   21740             : 
   21741           0 : static PyObject *py_srvsvc_NetSrvInfo1518_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21742             : {
   21743           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1518, type);
   21744             : }
   21745             : 
   21746             : 
   21747             : static PyTypeObject srvsvc_NetSrvInfo1518_Type = {
   21748             :         PyVarObject_HEAD_INIT(NULL, 0)
   21749             :         .tp_name = "srvsvc.NetSrvInfo1518",
   21750             :         .tp_getset = py_srvsvc_NetSrvInfo1518_getsetters,
   21751             :         .tp_methods = NULL,
   21752             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21753             :         .tp_new = py_srvsvc_NetSrvInfo1518_new,
   21754             : };
   21755             : 
   21756             : 
   21757           0 : static PyObject *py_srvsvc_NetSrvInfo1520_get_maxcopyreadlen(PyObject *obj, void *closure)
   21758             : {
   21759           0 :         struct srvsvc_NetSrvInfo1520 *object = (struct srvsvc_NetSrvInfo1520 *)pytalloc_get_ptr(obj);
   21760             :         PyObject *py_maxcopyreadlen;
   21761           0 :         py_maxcopyreadlen = PyLong_FromUnsignedLongLong((uint32_t)object->maxcopyreadlen);
   21762           0 :         return py_maxcopyreadlen;
   21763             : }
   21764             : 
   21765           0 : static int py_srvsvc_NetSrvInfo1520_set_maxcopyreadlen(PyObject *py_obj, PyObject *value, void *closure)
   21766             : {
   21767           0 :         struct srvsvc_NetSrvInfo1520 *object = (struct srvsvc_NetSrvInfo1520 *)pytalloc_get_ptr(py_obj);
   21768           0 :         if (value == NULL) {
   21769           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxcopyreadlen");
   21770           0 :                 return -1;
   21771             :         }
   21772             :         {
   21773           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxcopyreadlen));
   21774           0 :                 if (PyLong_Check(value)) {
   21775             :                         unsigned long long test_var;
   21776           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21777           0 :                         if (PyErr_Occurred() != NULL) {
   21778           0 :                                 return -1;
   21779             :                         }
   21780           0 :                         if (test_var > uint_max) {
   21781           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21782             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21783           0 :                                 return -1;
   21784             :                         }
   21785           0 :                         object->maxcopyreadlen = test_var;
   21786             :                 } else {
   21787           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21788             :                           PyLong_Type.tp_name);
   21789           0 :                         return -1;
   21790             :                 }
   21791             :         }
   21792           0 :         return 0;
   21793             : }
   21794             : 
   21795             : static PyGetSetDef py_srvsvc_NetSrvInfo1520_getsetters[] = {
   21796             :         {
   21797             :                 .name = discard_const_p(char, "maxcopyreadlen"),
   21798             :                 .get = py_srvsvc_NetSrvInfo1520_get_maxcopyreadlen,
   21799             :                 .set = py_srvsvc_NetSrvInfo1520_set_maxcopyreadlen,
   21800             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21801             :         },
   21802             :         { .name = NULL }
   21803             : };
   21804             : 
   21805           0 : static PyObject *py_srvsvc_NetSrvInfo1520_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21806             : {
   21807           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1520, type);
   21808             : }
   21809             : 
   21810             : 
   21811             : static PyTypeObject srvsvc_NetSrvInfo1520_Type = {
   21812             :         PyVarObject_HEAD_INIT(NULL, 0)
   21813             :         .tp_name = "srvsvc.NetSrvInfo1520",
   21814             :         .tp_getset = py_srvsvc_NetSrvInfo1520_getsetters,
   21815             :         .tp_methods = NULL,
   21816             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21817             :         .tp_new = py_srvsvc_NetSrvInfo1520_new,
   21818             : };
   21819             : 
   21820             : 
   21821           0 : static PyObject *py_srvsvc_NetSrvInfo1521_get_maxcopywritelen(PyObject *obj, void *closure)
   21822             : {
   21823           0 :         struct srvsvc_NetSrvInfo1521 *object = (struct srvsvc_NetSrvInfo1521 *)pytalloc_get_ptr(obj);
   21824             :         PyObject *py_maxcopywritelen;
   21825           0 :         py_maxcopywritelen = PyLong_FromUnsignedLongLong((uint32_t)object->maxcopywritelen);
   21826           0 :         return py_maxcopywritelen;
   21827             : }
   21828             : 
   21829           0 : static int py_srvsvc_NetSrvInfo1521_set_maxcopywritelen(PyObject *py_obj, PyObject *value, void *closure)
   21830             : {
   21831           0 :         struct srvsvc_NetSrvInfo1521 *object = (struct srvsvc_NetSrvInfo1521 *)pytalloc_get_ptr(py_obj);
   21832           0 :         if (value == NULL) {
   21833           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxcopywritelen");
   21834           0 :                 return -1;
   21835             :         }
   21836             :         {
   21837           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxcopywritelen));
   21838           0 :                 if (PyLong_Check(value)) {
   21839             :                         unsigned long long test_var;
   21840           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21841           0 :                         if (PyErr_Occurred() != NULL) {
   21842           0 :                                 return -1;
   21843             :                         }
   21844           0 :                         if (test_var > uint_max) {
   21845           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21846             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21847           0 :                                 return -1;
   21848             :                         }
   21849           0 :                         object->maxcopywritelen = test_var;
   21850             :                 } else {
   21851           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21852             :                           PyLong_Type.tp_name);
   21853           0 :                         return -1;
   21854             :                 }
   21855             :         }
   21856           0 :         return 0;
   21857             : }
   21858             : 
   21859             : static PyGetSetDef py_srvsvc_NetSrvInfo1521_getsetters[] = {
   21860             :         {
   21861             :                 .name = discard_const_p(char, "maxcopywritelen"),
   21862             :                 .get = py_srvsvc_NetSrvInfo1521_get_maxcopywritelen,
   21863             :                 .set = py_srvsvc_NetSrvInfo1521_set_maxcopywritelen,
   21864             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21865             :         },
   21866             :         { .name = NULL }
   21867             : };
   21868             : 
   21869           0 : static PyObject *py_srvsvc_NetSrvInfo1521_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21870             : {
   21871           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1521, type);
   21872             : }
   21873             : 
   21874             : 
   21875             : static PyTypeObject srvsvc_NetSrvInfo1521_Type = {
   21876             :         PyVarObject_HEAD_INIT(NULL, 0)
   21877             :         .tp_name = "srvsvc.NetSrvInfo1521",
   21878             :         .tp_getset = py_srvsvc_NetSrvInfo1521_getsetters,
   21879             :         .tp_methods = NULL,
   21880             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21881             :         .tp_new = py_srvsvc_NetSrvInfo1521_new,
   21882             : };
   21883             : 
   21884             : 
   21885           0 : static PyObject *py_srvsvc_NetSrvInfo1522_get_minkeepsearch(PyObject *obj, void *closure)
   21886             : {
   21887           0 :         struct srvsvc_NetSrvInfo1522 *object = (struct srvsvc_NetSrvInfo1522 *)pytalloc_get_ptr(obj);
   21888             :         PyObject *py_minkeepsearch;
   21889           0 :         py_minkeepsearch = PyLong_FromUnsignedLongLong((uint32_t)object->minkeepsearch);
   21890           0 :         return py_minkeepsearch;
   21891             : }
   21892             : 
   21893           0 : static int py_srvsvc_NetSrvInfo1522_set_minkeepsearch(PyObject *py_obj, PyObject *value, void *closure)
   21894             : {
   21895           0 :         struct srvsvc_NetSrvInfo1522 *object = (struct srvsvc_NetSrvInfo1522 *)pytalloc_get_ptr(py_obj);
   21896           0 :         if (value == NULL) {
   21897           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minkeepsearch");
   21898           0 :                 return -1;
   21899             :         }
   21900             :         {
   21901           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minkeepsearch));
   21902           0 :                 if (PyLong_Check(value)) {
   21903             :                         unsigned long long test_var;
   21904           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21905           0 :                         if (PyErr_Occurred() != NULL) {
   21906           0 :                                 return -1;
   21907             :                         }
   21908           0 :                         if (test_var > uint_max) {
   21909           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21910             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21911           0 :                                 return -1;
   21912             :                         }
   21913           0 :                         object->minkeepsearch = test_var;
   21914             :                 } else {
   21915           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21916             :                           PyLong_Type.tp_name);
   21917           0 :                         return -1;
   21918             :                 }
   21919             :         }
   21920           0 :         return 0;
   21921             : }
   21922             : 
   21923             : static PyGetSetDef py_srvsvc_NetSrvInfo1522_getsetters[] = {
   21924             :         {
   21925             :                 .name = discard_const_p(char, "minkeepsearch"),
   21926             :                 .get = py_srvsvc_NetSrvInfo1522_get_minkeepsearch,
   21927             :                 .set = py_srvsvc_NetSrvInfo1522_set_minkeepsearch,
   21928             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21929             :         },
   21930             :         { .name = NULL }
   21931             : };
   21932             : 
   21933           0 : static PyObject *py_srvsvc_NetSrvInfo1522_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21934             : {
   21935           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1522, type);
   21936             : }
   21937             : 
   21938             : 
   21939             : static PyTypeObject srvsvc_NetSrvInfo1522_Type = {
   21940             :         PyVarObject_HEAD_INIT(NULL, 0)
   21941             :         .tp_name = "srvsvc.NetSrvInfo1522",
   21942             :         .tp_getset = py_srvsvc_NetSrvInfo1522_getsetters,
   21943             :         .tp_methods = NULL,
   21944             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21945             :         .tp_new = py_srvsvc_NetSrvInfo1522_new,
   21946             : };
   21947             : 
   21948             : 
   21949           0 : static PyObject *py_srvsvc_NetSrvInfo1523_get_maxkeepsearch(PyObject *obj, void *closure)
   21950             : {
   21951           0 :         struct srvsvc_NetSrvInfo1523 *object = (struct srvsvc_NetSrvInfo1523 *)pytalloc_get_ptr(obj);
   21952             :         PyObject *py_maxkeepsearch;
   21953           0 :         py_maxkeepsearch = PyLong_FromUnsignedLongLong((uint32_t)object->maxkeepsearch);
   21954           0 :         return py_maxkeepsearch;
   21955             : }
   21956             : 
   21957           0 : static int py_srvsvc_NetSrvInfo1523_set_maxkeepsearch(PyObject *py_obj, PyObject *value, void *closure)
   21958             : {
   21959           0 :         struct srvsvc_NetSrvInfo1523 *object = (struct srvsvc_NetSrvInfo1523 *)pytalloc_get_ptr(py_obj);
   21960           0 :         if (value == NULL) {
   21961           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxkeepsearch");
   21962           0 :                 return -1;
   21963             :         }
   21964             :         {
   21965           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxkeepsearch));
   21966           0 :                 if (PyLong_Check(value)) {
   21967             :                         unsigned long long test_var;
   21968           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21969           0 :                         if (PyErr_Occurred() != NULL) {
   21970           0 :                                 return -1;
   21971             :                         }
   21972           0 :                         if (test_var > uint_max) {
   21973           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21974             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21975           0 :                                 return -1;
   21976             :                         }
   21977           0 :                         object->maxkeepsearch = test_var;
   21978             :                 } else {
   21979           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21980             :                           PyLong_Type.tp_name);
   21981           0 :                         return -1;
   21982             :                 }
   21983             :         }
   21984           0 :         return 0;
   21985             : }
   21986             : 
   21987             : static PyGetSetDef py_srvsvc_NetSrvInfo1523_getsetters[] = {
   21988             :         {
   21989             :                 .name = discard_const_p(char, "maxkeepsearch"),
   21990             :                 .get = py_srvsvc_NetSrvInfo1523_get_maxkeepsearch,
   21991             :                 .set = py_srvsvc_NetSrvInfo1523_set_maxkeepsearch,
   21992             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21993             :         },
   21994             :         { .name = NULL }
   21995             : };
   21996             : 
   21997           0 : static PyObject *py_srvsvc_NetSrvInfo1523_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21998             : {
   21999           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1523, type);
   22000             : }
   22001             : 
   22002             : 
   22003             : static PyTypeObject srvsvc_NetSrvInfo1523_Type = {
   22004             :         PyVarObject_HEAD_INIT(NULL, 0)
   22005             :         .tp_name = "srvsvc.NetSrvInfo1523",
   22006             :         .tp_getset = py_srvsvc_NetSrvInfo1523_getsetters,
   22007             :         .tp_methods = NULL,
   22008             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22009             :         .tp_new = py_srvsvc_NetSrvInfo1523_new,
   22010             : };
   22011             : 
   22012             : 
   22013           0 : static PyObject *py_srvsvc_NetSrvInfo1524_get_minkeepcomplsearch(PyObject *obj, void *closure)
   22014             : {
   22015           0 :         struct srvsvc_NetSrvInfo1524 *object = (struct srvsvc_NetSrvInfo1524 *)pytalloc_get_ptr(obj);
   22016             :         PyObject *py_minkeepcomplsearch;
   22017           0 :         py_minkeepcomplsearch = PyLong_FromUnsignedLongLong((uint32_t)object->minkeepcomplsearch);
   22018           0 :         return py_minkeepcomplsearch;
   22019             : }
   22020             : 
   22021           0 : static int py_srvsvc_NetSrvInfo1524_set_minkeepcomplsearch(PyObject *py_obj, PyObject *value, void *closure)
   22022             : {
   22023           0 :         struct srvsvc_NetSrvInfo1524 *object = (struct srvsvc_NetSrvInfo1524 *)pytalloc_get_ptr(py_obj);
   22024           0 :         if (value == NULL) {
   22025           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minkeepcomplsearch");
   22026           0 :                 return -1;
   22027             :         }
   22028             :         {
   22029           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minkeepcomplsearch));
   22030           0 :                 if (PyLong_Check(value)) {
   22031             :                         unsigned long long test_var;
   22032           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22033           0 :                         if (PyErr_Occurred() != NULL) {
   22034           0 :                                 return -1;
   22035             :                         }
   22036           0 :                         if (test_var > uint_max) {
   22037           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22038             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22039           0 :                                 return -1;
   22040             :                         }
   22041           0 :                         object->minkeepcomplsearch = test_var;
   22042             :                 } else {
   22043           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22044             :                           PyLong_Type.tp_name);
   22045           0 :                         return -1;
   22046             :                 }
   22047             :         }
   22048           0 :         return 0;
   22049             : }
   22050             : 
   22051             : static PyGetSetDef py_srvsvc_NetSrvInfo1524_getsetters[] = {
   22052             :         {
   22053             :                 .name = discard_const_p(char, "minkeepcomplsearch"),
   22054             :                 .get = py_srvsvc_NetSrvInfo1524_get_minkeepcomplsearch,
   22055             :                 .set = py_srvsvc_NetSrvInfo1524_set_minkeepcomplsearch,
   22056             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22057             :         },
   22058             :         { .name = NULL }
   22059             : };
   22060             : 
   22061           0 : static PyObject *py_srvsvc_NetSrvInfo1524_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22062             : {
   22063           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1524, type);
   22064             : }
   22065             : 
   22066             : 
   22067             : static PyTypeObject srvsvc_NetSrvInfo1524_Type = {
   22068             :         PyVarObject_HEAD_INIT(NULL, 0)
   22069             :         .tp_name = "srvsvc.NetSrvInfo1524",
   22070             :         .tp_getset = py_srvsvc_NetSrvInfo1524_getsetters,
   22071             :         .tp_methods = NULL,
   22072             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22073             :         .tp_new = py_srvsvc_NetSrvInfo1524_new,
   22074             : };
   22075             : 
   22076             : 
   22077           0 : static PyObject *py_srvsvc_NetSrvInfo1525_get_maxkeepcomplsearch(PyObject *obj, void *closure)
   22078             : {
   22079           0 :         struct srvsvc_NetSrvInfo1525 *object = (struct srvsvc_NetSrvInfo1525 *)pytalloc_get_ptr(obj);
   22080             :         PyObject *py_maxkeepcomplsearch;
   22081           0 :         py_maxkeepcomplsearch = PyLong_FromUnsignedLongLong((uint32_t)object->maxkeepcomplsearch);
   22082           0 :         return py_maxkeepcomplsearch;
   22083             : }
   22084             : 
   22085           0 : static int py_srvsvc_NetSrvInfo1525_set_maxkeepcomplsearch(PyObject *py_obj, PyObject *value, void *closure)
   22086             : {
   22087           0 :         struct srvsvc_NetSrvInfo1525 *object = (struct srvsvc_NetSrvInfo1525 *)pytalloc_get_ptr(py_obj);
   22088           0 :         if (value == NULL) {
   22089           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxkeepcomplsearch");
   22090           0 :                 return -1;
   22091             :         }
   22092             :         {
   22093           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxkeepcomplsearch));
   22094           0 :                 if (PyLong_Check(value)) {
   22095             :                         unsigned long long test_var;
   22096           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22097           0 :                         if (PyErr_Occurred() != NULL) {
   22098           0 :                                 return -1;
   22099             :                         }
   22100           0 :                         if (test_var > uint_max) {
   22101           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22102             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22103           0 :                                 return -1;
   22104             :                         }
   22105           0 :                         object->maxkeepcomplsearch = test_var;
   22106             :                 } else {
   22107           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22108             :                           PyLong_Type.tp_name);
   22109           0 :                         return -1;
   22110             :                 }
   22111             :         }
   22112           0 :         return 0;
   22113             : }
   22114             : 
   22115             : static PyGetSetDef py_srvsvc_NetSrvInfo1525_getsetters[] = {
   22116             :         {
   22117             :                 .name = discard_const_p(char, "maxkeepcomplsearch"),
   22118             :                 .get = py_srvsvc_NetSrvInfo1525_get_maxkeepcomplsearch,
   22119             :                 .set = py_srvsvc_NetSrvInfo1525_set_maxkeepcomplsearch,
   22120             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22121             :         },
   22122             :         { .name = NULL }
   22123             : };
   22124             : 
   22125           0 : static PyObject *py_srvsvc_NetSrvInfo1525_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22126             : {
   22127           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1525, type);
   22128             : }
   22129             : 
   22130             : 
   22131             : static PyTypeObject srvsvc_NetSrvInfo1525_Type = {
   22132             :         PyVarObject_HEAD_INIT(NULL, 0)
   22133             :         .tp_name = "srvsvc.NetSrvInfo1525",
   22134             :         .tp_getset = py_srvsvc_NetSrvInfo1525_getsetters,
   22135             :         .tp_methods = NULL,
   22136             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22137             :         .tp_new = py_srvsvc_NetSrvInfo1525_new,
   22138             : };
   22139             : 
   22140             : 
   22141           0 : static PyObject *py_srvsvc_NetSrvInfo1528_get_scavtimeout(PyObject *obj, void *closure)
   22142             : {
   22143           0 :         struct srvsvc_NetSrvInfo1528 *object = (struct srvsvc_NetSrvInfo1528 *)pytalloc_get_ptr(obj);
   22144             :         PyObject *py_scavtimeout;
   22145           0 :         py_scavtimeout = PyLong_FromUnsignedLongLong((uint32_t)object->scavtimeout);
   22146           0 :         return py_scavtimeout;
   22147             : }
   22148             : 
   22149           0 : static int py_srvsvc_NetSrvInfo1528_set_scavtimeout(PyObject *py_obj, PyObject *value, void *closure)
   22150             : {
   22151           0 :         struct srvsvc_NetSrvInfo1528 *object = (struct srvsvc_NetSrvInfo1528 *)pytalloc_get_ptr(py_obj);
   22152           0 :         if (value == NULL) {
   22153           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->scavtimeout");
   22154           0 :                 return -1;
   22155             :         }
   22156             :         {
   22157           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->scavtimeout));
   22158           0 :                 if (PyLong_Check(value)) {
   22159             :                         unsigned long long test_var;
   22160           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22161           0 :                         if (PyErr_Occurred() != NULL) {
   22162           0 :                                 return -1;
   22163             :                         }
   22164           0 :                         if (test_var > uint_max) {
   22165           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22166             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22167           0 :                                 return -1;
   22168             :                         }
   22169           0 :                         object->scavtimeout = test_var;
   22170             :                 } else {
   22171           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22172             :                           PyLong_Type.tp_name);
   22173           0 :                         return -1;
   22174             :                 }
   22175             :         }
   22176           0 :         return 0;
   22177             : }
   22178             : 
   22179             : static PyGetSetDef py_srvsvc_NetSrvInfo1528_getsetters[] = {
   22180             :         {
   22181             :                 .name = discard_const_p(char, "scavtimeout"),
   22182             :                 .get = py_srvsvc_NetSrvInfo1528_get_scavtimeout,
   22183             :                 .set = py_srvsvc_NetSrvInfo1528_set_scavtimeout,
   22184             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22185             :         },
   22186             :         { .name = NULL }
   22187             : };
   22188             : 
   22189           0 : static PyObject *py_srvsvc_NetSrvInfo1528_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22190             : {
   22191           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1528, type);
   22192             : }
   22193             : 
   22194             : 
   22195             : static PyTypeObject srvsvc_NetSrvInfo1528_Type = {
   22196             :         PyVarObject_HEAD_INIT(NULL, 0)
   22197             :         .tp_name = "srvsvc.NetSrvInfo1528",
   22198             :         .tp_getset = py_srvsvc_NetSrvInfo1528_getsetters,
   22199             :         .tp_methods = NULL,
   22200             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22201             :         .tp_new = py_srvsvc_NetSrvInfo1528_new,
   22202             : };
   22203             : 
   22204             : 
   22205           0 : static PyObject *py_srvsvc_NetSrvInfo1529_get_minrcvqueue(PyObject *obj, void *closure)
   22206             : {
   22207           0 :         struct srvsvc_NetSrvInfo1529 *object = (struct srvsvc_NetSrvInfo1529 *)pytalloc_get_ptr(obj);
   22208             :         PyObject *py_minrcvqueue;
   22209           0 :         py_minrcvqueue = PyLong_FromUnsignedLongLong((uint32_t)object->minrcvqueue);
   22210           0 :         return py_minrcvqueue;
   22211             : }
   22212             : 
   22213           0 : static int py_srvsvc_NetSrvInfo1529_set_minrcvqueue(PyObject *py_obj, PyObject *value, void *closure)
   22214             : {
   22215           0 :         struct srvsvc_NetSrvInfo1529 *object = (struct srvsvc_NetSrvInfo1529 *)pytalloc_get_ptr(py_obj);
   22216           0 :         if (value == NULL) {
   22217           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minrcvqueue");
   22218           0 :                 return -1;
   22219             :         }
   22220             :         {
   22221           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minrcvqueue));
   22222           0 :                 if (PyLong_Check(value)) {
   22223             :                         unsigned long long test_var;
   22224           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22225           0 :                         if (PyErr_Occurred() != NULL) {
   22226           0 :                                 return -1;
   22227             :                         }
   22228           0 :                         if (test_var > uint_max) {
   22229           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22230             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22231           0 :                                 return -1;
   22232             :                         }
   22233           0 :                         object->minrcvqueue = test_var;
   22234             :                 } else {
   22235           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22236             :                           PyLong_Type.tp_name);
   22237           0 :                         return -1;
   22238             :                 }
   22239             :         }
   22240           0 :         return 0;
   22241             : }
   22242             : 
   22243             : static PyGetSetDef py_srvsvc_NetSrvInfo1529_getsetters[] = {
   22244             :         {
   22245             :                 .name = discard_const_p(char, "minrcvqueue"),
   22246             :                 .get = py_srvsvc_NetSrvInfo1529_get_minrcvqueue,
   22247             :                 .set = py_srvsvc_NetSrvInfo1529_set_minrcvqueue,
   22248             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22249             :         },
   22250             :         { .name = NULL }
   22251             : };
   22252             : 
   22253           0 : static PyObject *py_srvsvc_NetSrvInfo1529_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22254             : {
   22255           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1529, type);
   22256             : }
   22257             : 
   22258             : 
   22259             : static PyTypeObject srvsvc_NetSrvInfo1529_Type = {
   22260             :         PyVarObject_HEAD_INIT(NULL, 0)
   22261             :         .tp_name = "srvsvc.NetSrvInfo1529",
   22262             :         .tp_getset = py_srvsvc_NetSrvInfo1529_getsetters,
   22263             :         .tp_methods = NULL,
   22264             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22265             :         .tp_new = py_srvsvc_NetSrvInfo1529_new,
   22266             : };
   22267             : 
   22268             : 
   22269           0 : static PyObject *py_srvsvc_NetSrvInfo1530_get_minfreeworkitems(PyObject *obj, void *closure)
   22270             : {
   22271           0 :         struct srvsvc_NetSrvInfo1530 *object = (struct srvsvc_NetSrvInfo1530 *)pytalloc_get_ptr(obj);
   22272             :         PyObject *py_minfreeworkitems;
   22273           0 :         py_minfreeworkitems = PyLong_FromUnsignedLongLong((uint32_t)object->minfreeworkitems);
   22274           0 :         return py_minfreeworkitems;
   22275             : }
   22276             : 
   22277           0 : static int py_srvsvc_NetSrvInfo1530_set_minfreeworkitems(PyObject *py_obj, PyObject *value, void *closure)
   22278             : {
   22279           0 :         struct srvsvc_NetSrvInfo1530 *object = (struct srvsvc_NetSrvInfo1530 *)pytalloc_get_ptr(py_obj);
   22280           0 :         if (value == NULL) {
   22281           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minfreeworkitems");
   22282           0 :                 return -1;
   22283             :         }
   22284             :         {
   22285           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minfreeworkitems));
   22286           0 :                 if (PyLong_Check(value)) {
   22287             :                         unsigned long long test_var;
   22288           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22289           0 :                         if (PyErr_Occurred() != NULL) {
   22290           0 :                                 return -1;
   22291             :                         }
   22292           0 :                         if (test_var > uint_max) {
   22293           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22294             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22295           0 :                                 return -1;
   22296             :                         }
   22297           0 :                         object->minfreeworkitems = test_var;
   22298             :                 } else {
   22299           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22300             :                           PyLong_Type.tp_name);
   22301           0 :                         return -1;
   22302             :                 }
   22303             :         }
   22304           0 :         return 0;
   22305             : }
   22306             : 
   22307             : static PyGetSetDef py_srvsvc_NetSrvInfo1530_getsetters[] = {
   22308             :         {
   22309             :                 .name = discard_const_p(char, "minfreeworkitems"),
   22310             :                 .get = py_srvsvc_NetSrvInfo1530_get_minfreeworkitems,
   22311             :                 .set = py_srvsvc_NetSrvInfo1530_set_minfreeworkitems,
   22312             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22313             :         },
   22314             :         { .name = NULL }
   22315             : };
   22316             : 
   22317           0 : static PyObject *py_srvsvc_NetSrvInfo1530_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22318             : {
   22319           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1530, type);
   22320             : }
   22321             : 
   22322             : 
   22323             : static PyTypeObject srvsvc_NetSrvInfo1530_Type = {
   22324             :         PyVarObject_HEAD_INIT(NULL, 0)
   22325             :         .tp_name = "srvsvc.NetSrvInfo1530",
   22326             :         .tp_getset = py_srvsvc_NetSrvInfo1530_getsetters,
   22327             :         .tp_methods = NULL,
   22328             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22329             :         .tp_new = py_srvsvc_NetSrvInfo1530_new,
   22330             : };
   22331             : 
   22332             : 
   22333           0 : static PyObject *py_srvsvc_NetSrvInfo1533_get_maxmpxct(PyObject *obj, void *closure)
   22334             : {
   22335           0 :         struct srvsvc_NetSrvInfo1533 *object = (struct srvsvc_NetSrvInfo1533 *)pytalloc_get_ptr(obj);
   22336             :         PyObject *py_maxmpxct;
   22337           0 :         py_maxmpxct = PyLong_FromUnsignedLongLong((uint32_t)object->maxmpxct);
   22338           0 :         return py_maxmpxct;
   22339             : }
   22340             : 
   22341           0 : static int py_srvsvc_NetSrvInfo1533_set_maxmpxct(PyObject *py_obj, PyObject *value, void *closure)
   22342             : {
   22343           0 :         struct srvsvc_NetSrvInfo1533 *object = (struct srvsvc_NetSrvInfo1533 *)pytalloc_get_ptr(py_obj);
   22344           0 :         if (value == NULL) {
   22345           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxmpxct");
   22346           0 :                 return -1;
   22347             :         }
   22348             :         {
   22349           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxmpxct));
   22350           0 :                 if (PyLong_Check(value)) {
   22351             :                         unsigned long long test_var;
   22352           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22353           0 :                         if (PyErr_Occurred() != NULL) {
   22354           0 :                                 return -1;
   22355             :                         }
   22356           0 :                         if (test_var > uint_max) {
   22357           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22358             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22359           0 :                                 return -1;
   22360             :                         }
   22361           0 :                         object->maxmpxct = test_var;
   22362             :                 } else {
   22363           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22364             :                           PyLong_Type.tp_name);
   22365           0 :                         return -1;
   22366             :                 }
   22367             :         }
   22368           0 :         return 0;
   22369             : }
   22370             : 
   22371             : static PyGetSetDef py_srvsvc_NetSrvInfo1533_getsetters[] = {
   22372             :         {
   22373             :                 .name = discard_const_p(char, "maxmpxct"),
   22374             :                 .get = py_srvsvc_NetSrvInfo1533_get_maxmpxct,
   22375             :                 .set = py_srvsvc_NetSrvInfo1533_set_maxmpxct,
   22376             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22377             :         },
   22378             :         { .name = NULL }
   22379             : };
   22380             : 
   22381           0 : static PyObject *py_srvsvc_NetSrvInfo1533_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22382             : {
   22383           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1533, type);
   22384             : }
   22385             : 
   22386             : 
   22387             : static PyTypeObject srvsvc_NetSrvInfo1533_Type = {
   22388             :         PyVarObject_HEAD_INIT(NULL, 0)
   22389             :         .tp_name = "srvsvc.NetSrvInfo1533",
   22390             :         .tp_getset = py_srvsvc_NetSrvInfo1533_getsetters,
   22391             :         .tp_methods = NULL,
   22392             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22393             :         .tp_new = py_srvsvc_NetSrvInfo1533_new,
   22394             : };
   22395             : 
   22396             : 
   22397           0 : static PyObject *py_srvsvc_NetSrvInfo1534_get_oplockbreakwait(PyObject *obj, void *closure)
   22398             : {
   22399           0 :         struct srvsvc_NetSrvInfo1534 *object = (struct srvsvc_NetSrvInfo1534 *)pytalloc_get_ptr(obj);
   22400             :         PyObject *py_oplockbreakwait;
   22401           0 :         py_oplockbreakwait = PyLong_FromUnsignedLongLong((uint32_t)object->oplockbreakwait);
   22402           0 :         return py_oplockbreakwait;
   22403             : }
   22404             : 
   22405           0 : static int py_srvsvc_NetSrvInfo1534_set_oplockbreakwait(PyObject *py_obj, PyObject *value, void *closure)
   22406             : {
   22407           0 :         struct srvsvc_NetSrvInfo1534 *object = (struct srvsvc_NetSrvInfo1534 *)pytalloc_get_ptr(py_obj);
   22408           0 :         if (value == NULL) {
   22409           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->oplockbreakwait");
   22410           0 :                 return -1;
   22411             :         }
   22412             :         {
   22413           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->oplockbreakwait));
   22414           0 :                 if (PyLong_Check(value)) {
   22415             :                         unsigned long long test_var;
   22416           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22417           0 :                         if (PyErr_Occurred() != NULL) {
   22418           0 :                                 return -1;
   22419             :                         }
   22420           0 :                         if (test_var > uint_max) {
   22421           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22422             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22423           0 :                                 return -1;
   22424             :                         }
   22425           0 :                         object->oplockbreakwait = test_var;
   22426             :                 } else {
   22427           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22428             :                           PyLong_Type.tp_name);
   22429           0 :                         return -1;
   22430             :                 }
   22431             :         }
   22432           0 :         return 0;
   22433             : }
   22434             : 
   22435             : static PyGetSetDef py_srvsvc_NetSrvInfo1534_getsetters[] = {
   22436             :         {
   22437             :                 .name = discard_const_p(char, "oplockbreakwait"),
   22438             :                 .get = py_srvsvc_NetSrvInfo1534_get_oplockbreakwait,
   22439             :                 .set = py_srvsvc_NetSrvInfo1534_set_oplockbreakwait,
   22440             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22441             :         },
   22442             :         { .name = NULL }
   22443             : };
   22444             : 
   22445           0 : static PyObject *py_srvsvc_NetSrvInfo1534_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22446             : {
   22447           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1534, type);
   22448             : }
   22449             : 
   22450             : 
   22451             : static PyTypeObject srvsvc_NetSrvInfo1534_Type = {
   22452             :         PyVarObject_HEAD_INIT(NULL, 0)
   22453             :         .tp_name = "srvsvc.NetSrvInfo1534",
   22454             :         .tp_getset = py_srvsvc_NetSrvInfo1534_getsetters,
   22455             :         .tp_methods = NULL,
   22456             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22457             :         .tp_new = py_srvsvc_NetSrvInfo1534_new,
   22458             : };
   22459             : 
   22460             : 
   22461           0 : static PyObject *py_srvsvc_NetSrvInfo1535_get_oplockbreakresponsewait(PyObject *obj, void *closure)
   22462             : {
   22463           0 :         struct srvsvc_NetSrvInfo1535 *object = (struct srvsvc_NetSrvInfo1535 *)pytalloc_get_ptr(obj);
   22464             :         PyObject *py_oplockbreakresponsewait;
   22465           0 :         py_oplockbreakresponsewait = PyLong_FromUnsignedLongLong((uint32_t)object->oplockbreakresponsewait);
   22466           0 :         return py_oplockbreakresponsewait;
   22467             : }
   22468             : 
   22469           0 : static int py_srvsvc_NetSrvInfo1535_set_oplockbreakresponsewait(PyObject *py_obj, PyObject *value, void *closure)
   22470             : {
   22471           0 :         struct srvsvc_NetSrvInfo1535 *object = (struct srvsvc_NetSrvInfo1535 *)pytalloc_get_ptr(py_obj);
   22472           0 :         if (value == NULL) {
   22473           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->oplockbreakresponsewait");
   22474           0 :                 return -1;
   22475             :         }
   22476             :         {
   22477           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->oplockbreakresponsewait));
   22478           0 :                 if (PyLong_Check(value)) {
   22479             :                         unsigned long long test_var;
   22480           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22481           0 :                         if (PyErr_Occurred() != NULL) {
   22482           0 :                                 return -1;
   22483             :                         }
   22484           0 :                         if (test_var > uint_max) {
   22485           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22486             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22487           0 :                                 return -1;
   22488             :                         }
   22489           0 :                         object->oplockbreakresponsewait = test_var;
   22490             :                 } else {
   22491           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22492             :                           PyLong_Type.tp_name);
   22493           0 :                         return -1;
   22494             :                 }
   22495             :         }
   22496           0 :         return 0;
   22497             : }
   22498             : 
   22499             : static PyGetSetDef py_srvsvc_NetSrvInfo1535_getsetters[] = {
   22500             :         {
   22501             :                 .name = discard_const_p(char, "oplockbreakresponsewait"),
   22502             :                 .get = py_srvsvc_NetSrvInfo1535_get_oplockbreakresponsewait,
   22503             :                 .set = py_srvsvc_NetSrvInfo1535_set_oplockbreakresponsewait,
   22504             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22505             :         },
   22506             :         { .name = NULL }
   22507             : };
   22508             : 
   22509           0 : static PyObject *py_srvsvc_NetSrvInfo1535_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22510             : {
   22511           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1535, type);
   22512             : }
   22513             : 
   22514             : 
   22515             : static PyTypeObject srvsvc_NetSrvInfo1535_Type = {
   22516             :         PyVarObject_HEAD_INIT(NULL, 0)
   22517             :         .tp_name = "srvsvc.NetSrvInfo1535",
   22518             :         .tp_getset = py_srvsvc_NetSrvInfo1535_getsetters,
   22519             :         .tp_methods = NULL,
   22520             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22521             :         .tp_new = py_srvsvc_NetSrvInfo1535_new,
   22522             : };
   22523             : 
   22524             : 
   22525           0 : static PyObject *py_srvsvc_NetSrvInfo1536_get_enableoplocks(PyObject *obj, void *closure)
   22526             : {
   22527           0 :         struct srvsvc_NetSrvInfo1536 *object = (struct srvsvc_NetSrvInfo1536 *)pytalloc_get_ptr(obj);
   22528             :         PyObject *py_enableoplocks;
   22529           0 :         py_enableoplocks = PyLong_FromUnsignedLongLong((uint32_t)object->enableoplocks);
   22530           0 :         return py_enableoplocks;
   22531             : }
   22532             : 
   22533           0 : static int py_srvsvc_NetSrvInfo1536_set_enableoplocks(PyObject *py_obj, PyObject *value, void *closure)
   22534             : {
   22535           0 :         struct srvsvc_NetSrvInfo1536 *object = (struct srvsvc_NetSrvInfo1536 *)pytalloc_get_ptr(py_obj);
   22536           0 :         if (value == NULL) {
   22537           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enableoplocks");
   22538           0 :                 return -1;
   22539             :         }
   22540             :         {
   22541           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableoplocks));
   22542           0 :                 if (PyLong_Check(value)) {
   22543             :                         unsigned long long test_var;
   22544           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22545           0 :                         if (PyErr_Occurred() != NULL) {
   22546           0 :                                 return -1;
   22547             :                         }
   22548           0 :                         if (test_var > uint_max) {
   22549           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22550             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22551           0 :                                 return -1;
   22552             :                         }
   22553           0 :                         object->enableoplocks = test_var;
   22554             :                 } else {
   22555           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22556             :                           PyLong_Type.tp_name);
   22557           0 :                         return -1;
   22558             :                 }
   22559             :         }
   22560           0 :         return 0;
   22561             : }
   22562             : 
   22563             : static PyGetSetDef py_srvsvc_NetSrvInfo1536_getsetters[] = {
   22564             :         {
   22565             :                 .name = discard_const_p(char, "enableoplocks"),
   22566             :                 .get = py_srvsvc_NetSrvInfo1536_get_enableoplocks,
   22567             :                 .set = py_srvsvc_NetSrvInfo1536_set_enableoplocks,
   22568             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22569             :         },
   22570             :         { .name = NULL }
   22571             : };
   22572             : 
   22573           0 : static PyObject *py_srvsvc_NetSrvInfo1536_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22574             : {
   22575           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1536, type);
   22576             : }
   22577             : 
   22578             : 
   22579             : static PyTypeObject srvsvc_NetSrvInfo1536_Type = {
   22580             :         PyVarObject_HEAD_INIT(NULL, 0)
   22581             :         .tp_name = "srvsvc.NetSrvInfo1536",
   22582             :         .tp_getset = py_srvsvc_NetSrvInfo1536_getsetters,
   22583             :         .tp_methods = NULL,
   22584             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22585             :         .tp_new = py_srvsvc_NetSrvInfo1536_new,
   22586             : };
   22587             : 
   22588             : 
   22589           0 : static PyObject *py_srvsvc_NetSrvInfo1537_get_enableoplockforceclose(PyObject *obj, void *closure)
   22590             : {
   22591           0 :         struct srvsvc_NetSrvInfo1537 *object = (struct srvsvc_NetSrvInfo1537 *)pytalloc_get_ptr(obj);
   22592             :         PyObject *py_enableoplockforceclose;
   22593           0 :         py_enableoplockforceclose = PyLong_FromUnsignedLongLong((uint32_t)object->enableoplockforceclose);
   22594           0 :         return py_enableoplockforceclose;
   22595             : }
   22596             : 
   22597           0 : static int py_srvsvc_NetSrvInfo1537_set_enableoplockforceclose(PyObject *py_obj, PyObject *value, void *closure)
   22598             : {
   22599           0 :         struct srvsvc_NetSrvInfo1537 *object = (struct srvsvc_NetSrvInfo1537 *)pytalloc_get_ptr(py_obj);
   22600           0 :         if (value == NULL) {
   22601           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enableoplockforceclose");
   22602           0 :                 return -1;
   22603             :         }
   22604             :         {
   22605           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableoplockforceclose));
   22606           0 :                 if (PyLong_Check(value)) {
   22607             :                         unsigned long long test_var;
   22608           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22609           0 :                         if (PyErr_Occurred() != NULL) {
   22610           0 :                                 return -1;
   22611             :                         }
   22612           0 :                         if (test_var > uint_max) {
   22613           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22614             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22615           0 :                                 return -1;
   22616             :                         }
   22617           0 :                         object->enableoplockforceclose = test_var;
   22618             :                 } else {
   22619           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22620             :                           PyLong_Type.tp_name);
   22621           0 :                         return -1;
   22622             :                 }
   22623             :         }
   22624           0 :         return 0;
   22625             : }
   22626             : 
   22627             : static PyGetSetDef py_srvsvc_NetSrvInfo1537_getsetters[] = {
   22628             :         {
   22629             :                 .name = discard_const_p(char, "enableoplockforceclose"),
   22630             :                 .get = py_srvsvc_NetSrvInfo1537_get_enableoplockforceclose,
   22631             :                 .set = py_srvsvc_NetSrvInfo1537_set_enableoplockforceclose,
   22632             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22633             :         },
   22634             :         { .name = NULL }
   22635             : };
   22636             : 
   22637           0 : static PyObject *py_srvsvc_NetSrvInfo1537_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22638             : {
   22639           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1537, type);
   22640             : }
   22641             : 
   22642             : 
   22643             : static PyTypeObject srvsvc_NetSrvInfo1537_Type = {
   22644             :         PyVarObject_HEAD_INIT(NULL, 0)
   22645             :         .tp_name = "srvsvc.NetSrvInfo1537",
   22646             :         .tp_getset = py_srvsvc_NetSrvInfo1537_getsetters,
   22647             :         .tp_methods = NULL,
   22648             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22649             :         .tp_new = py_srvsvc_NetSrvInfo1537_new,
   22650             : };
   22651             : 
   22652             : 
   22653           0 : static PyObject *py_srvsvc_NetSrvInfo1538_get_enablefcbopens(PyObject *obj, void *closure)
   22654             : {
   22655           0 :         struct srvsvc_NetSrvInfo1538 *object = (struct srvsvc_NetSrvInfo1538 *)pytalloc_get_ptr(obj);
   22656             :         PyObject *py_enablefcbopens;
   22657           0 :         py_enablefcbopens = PyLong_FromUnsignedLongLong((uint32_t)object->enablefcbopens);
   22658           0 :         return py_enablefcbopens;
   22659             : }
   22660             : 
   22661           0 : static int py_srvsvc_NetSrvInfo1538_set_enablefcbopens(PyObject *py_obj, PyObject *value, void *closure)
   22662             : {
   22663           0 :         struct srvsvc_NetSrvInfo1538 *object = (struct srvsvc_NetSrvInfo1538 *)pytalloc_get_ptr(py_obj);
   22664           0 :         if (value == NULL) {
   22665           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enablefcbopens");
   22666           0 :                 return -1;
   22667             :         }
   22668             :         {
   22669           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablefcbopens));
   22670           0 :                 if (PyLong_Check(value)) {
   22671             :                         unsigned long long test_var;
   22672           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22673           0 :                         if (PyErr_Occurred() != NULL) {
   22674           0 :                                 return -1;
   22675             :                         }
   22676           0 :                         if (test_var > uint_max) {
   22677           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22678             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22679           0 :                                 return -1;
   22680             :                         }
   22681           0 :                         object->enablefcbopens = test_var;
   22682             :                 } else {
   22683           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22684             :                           PyLong_Type.tp_name);
   22685           0 :                         return -1;
   22686             :                 }
   22687             :         }
   22688           0 :         return 0;
   22689             : }
   22690             : 
   22691             : static PyGetSetDef py_srvsvc_NetSrvInfo1538_getsetters[] = {
   22692             :         {
   22693             :                 .name = discard_const_p(char, "enablefcbopens"),
   22694             :                 .get = py_srvsvc_NetSrvInfo1538_get_enablefcbopens,
   22695             :                 .set = py_srvsvc_NetSrvInfo1538_set_enablefcbopens,
   22696             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22697             :         },
   22698             :         { .name = NULL }
   22699             : };
   22700             : 
   22701           0 : static PyObject *py_srvsvc_NetSrvInfo1538_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22702             : {
   22703           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1538, type);
   22704             : }
   22705             : 
   22706             : 
   22707             : static PyTypeObject srvsvc_NetSrvInfo1538_Type = {
   22708             :         PyVarObject_HEAD_INIT(NULL, 0)
   22709             :         .tp_name = "srvsvc.NetSrvInfo1538",
   22710             :         .tp_getset = py_srvsvc_NetSrvInfo1538_getsetters,
   22711             :         .tp_methods = NULL,
   22712             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22713             :         .tp_new = py_srvsvc_NetSrvInfo1538_new,
   22714             : };
   22715             : 
   22716             : 
   22717           0 : static PyObject *py_srvsvc_NetSrvInfo1539_get_enableraw(PyObject *obj, void *closure)
   22718             : {
   22719           0 :         struct srvsvc_NetSrvInfo1539 *object = (struct srvsvc_NetSrvInfo1539 *)pytalloc_get_ptr(obj);
   22720             :         PyObject *py_enableraw;
   22721           0 :         py_enableraw = PyLong_FromUnsignedLongLong((uint32_t)object->enableraw);
   22722           0 :         return py_enableraw;
   22723             : }
   22724             : 
   22725           0 : static int py_srvsvc_NetSrvInfo1539_set_enableraw(PyObject *py_obj, PyObject *value, void *closure)
   22726             : {
   22727           0 :         struct srvsvc_NetSrvInfo1539 *object = (struct srvsvc_NetSrvInfo1539 *)pytalloc_get_ptr(py_obj);
   22728           0 :         if (value == NULL) {
   22729           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enableraw");
   22730           0 :                 return -1;
   22731             :         }
   22732             :         {
   22733           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enableraw));
   22734           0 :                 if (PyLong_Check(value)) {
   22735             :                         unsigned long long test_var;
   22736           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22737           0 :                         if (PyErr_Occurred() != NULL) {
   22738           0 :                                 return -1;
   22739             :                         }
   22740           0 :                         if (test_var > uint_max) {
   22741           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22742             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22743           0 :                                 return -1;
   22744             :                         }
   22745           0 :                         object->enableraw = test_var;
   22746             :                 } else {
   22747           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22748             :                           PyLong_Type.tp_name);
   22749           0 :                         return -1;
   22750             :                 }
   22751             :         }
   22752           0 :         return 0;
   22753             : }
   22754             : 
   22755             : static PyGetSetDef py_srvsvc_NetSrvInfo1539_getsetters[] = {
   22756             :         {
   22757             :                 .name = discard_const_p(char, "enableraw"),
   22758             :                 .get = py_srvsvc_NetSrvInfo1539_get_enableraw,
   22759             :                 .set = py_srvsvc_NetSrvInfo1539_set_enableraw,
   22760             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22761             :         },
   22762             :         { .name = NULL }
   22763             : };
   22764             : 
   22765           0 : static PyObject *py_srvsvc_NetSrvInfo1539_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22766             : {
   22767           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1539, type);
   22768             : }
   22769             : 
   22770             : 
   22771             : static PyTypeObject srvsvc_NetSrvInfo1539_Type = {
   22772             :         PyVarObject_HEAD_INIT(NULL, 0)
   22773             :         .tp_name = "srvsvc.NetSrvInfo1539",
   22774             :         .tp_getset = py_srvsvc_NetSrvInfo1539_getsetters,
   22775             :         .tp_methods = NULL,
   22776             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22777             :         .tp_new = py_srvsvc_NetSrvInfo1539_new,
   22778             : };
   22779             : 
   22780             : 
   22781           0 : static PyObject *py_srvsvc_NetSrvInfo1540_get_enablesharednetdrives(PyObject *obj, void *closure)
   22782             : {
   22783           0 :         struct srvsvc_NetSrvInfo1540 *object = (struct srvsvc_NetSrvInfo1540 *)pytalloc_get_ptr(obj);
   22784             :         PyObject *py_enablesharednetdrives;
   22785           0 :         py_enablesharednetdrives = PyLong_FromUnsignedLongLong((uint32_t)object->enablesharednetdrives);
   22786           0 :         return py_enablesharednetdrives;
   22787             : }
   22788             : 
   22789           0 : static int py_srvsvc_NetSrvInfo1540_set_enablesharednetdrives(PyObject *py_obj, PyObject *value, void *closure)
   22790             : {
   22791           0 :         struct srvsvc_NetSrvInfo1540 *object = (struct srvsvc_NetSrvInfo1540 *)pytalloc_get_ptr(py_obj);
   22792           0 :         if (value == NULL) {
   22793           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enablesharednetdrives");
   22794           0 :                 return -1;
   22795             :         }
   22796             :         {
   22797           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enablesharednetdrives));
   22798           0 :                 if (PyLong_Check(value)) {
   22799             :                         unsigned long long test_var;
   22800           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22801           0 :                         if (PyErr_Occurred() != NULL) {
   22802           0 :                                 return -1;
   22803             :                         }
   22804           0 :                         if (test_var > uint_max) {
   22805           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22806             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22807           0 :                                 return -1;
   22808             :                         }
   22809           0 :                         object->enablesharednetdrives = test_var;
   22810             :                 } else {
   22811           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22812             :                           PyLong_Type.tp_name);
   22813           0 :                         return -1;
   22814             :                 }
   22815             :         }
   22816           0 :         return 0;
   22817             : }
   22818             : 
   22819             : static PyGetSetDef py_srvsvc_NetSrvInfo1540_getsetters[] = {
   22820             :         {
   22821             :                 .name = discard_const_p(char, "enablesharednetdrives"),
   22822             :                 .get = py_srvsvc_NetSrvInfo1540_get_enablesharednetdrives,
   22823             :                 .set = py_srvsvc_NetSrvInfo1540_set_enablesharednetdrives,
   22824             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22825             :         },
   22826             :         { .name = NULL }
   22827             : };
   22828             : 
   22829           0 : static PyObject *py_srvsvc_NetSrvInfo1540_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22830             : {
   22831           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1540, type);
   22832             : }
   22833             : 
   22834             : 
   22835             : static PyTypeObject srvsvc_NetSrvInfo1540_Type = {
   22836             :         PyVarObject_HEAD_INIT(NULL, 0)
   22837             :         .tp_name = "srvsvc.NetSrvInfo1540",
   22838             :         .tp_getset = py_srvsvc_NetSrvInfo1540_getsetters,
   22839             :         .tp_methods = NULL,
   22840             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22841             :         .tp_new = py_srvsvc_NetSrvInfo1540_new,
   22842             : };
   22843             : 
   22844             : 
   22845           0 : static PyObject *py_srvsvc_NetSrvInfo1541_get_minfreeconnections(PyObject *obj, void *closure)
   22846             : {
   22847           0 :         struct srvsvc_NetSrvInfo1541 *object = (struct srvsvc_NetSrvInfo1541 *)pytalloc_get_ptr(obj);
   22848             :         PyObject *py_minfreeconnections;
   22849           0 :         py_minfreeconnections = PyLong_FromUnsignedLongLong((uint32_t)object->minfreeconnections);
   22850           0 :         return py_minfreeconnections;
   22851             : }
   22852             : 
   22853           0 : static int py_srvsvc_NetSrvInfo1541_set_minfreeconnections(PyObject *py_obj, PyObject *value, void *closure)
   22854             : {
   22855           0 :         struct srvsvc_NetSrvInfo1541 *object = (struct srvsvc_NetSrvInfo1541 *)pytalloc_get_ptr(py_obj);
   22856           0 :         if (value == NULL) {
   22857           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minfreeconnections");
   22858           0 :                 return -1;
   22859             :         }
   22860             :         {
   22861           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minfreeconnections));
   22862           0 :                 if (PyLong_Check(value)) {
   22863             :                         unsigned long long test_var;
   22864           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22865           0 :                         if (PyErr_Occurred() != NULL) {
   22866           0 :                                 return -1;
   22867             :                         }
   22868           0 :                         if (test_var > uint_max) {
   22869           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22870             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22871           0 :                                 return -1;
   22872             :                         }
   22873           0 :                         object->minfreeconnections = test_var;
   22874             :                 } else {
   22875           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22876             :                           PyLong_Type.tp_name);
   22877           0 :                         return -1;
   22878             :                 }
   22879             :         }
   22880           0 :         return 0;
   22881             : }
   22882             : 
   22883             : static PyGetSetDef py_srvsvc_NetSrvInfo1541_getsetters[] = {
   22884             :         {
   22885             :                 .name = discard_const_p(char, "minfreeconnections"),
   22886             :                 .get = py_srvsvc_NetSrvInfo1541_get_minfreeconnections,
   22887             :                 .set = py_srvsvc_NetSrvInfo1541_set_minfreeconnections,
   22888             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22889             :         },
   22890             :         { .name = NULL }
   22891             : };
   22892             : 
   22893           0 : static PyObject *py_srvsvc_NetSrvInfo1541_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22894             : {
   22895           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1541, type);
   22896             : }
   22897             : 
   22898             : 
   22899             : static PyTypeObject srvsvc_NetSrvInfo1541_Type = {
   22900             :         PyVarObject_HEAD_INIT(NULL, 0)
   22901             :         .tp_name = "srvsvc.NetSrvInfo1541",
   22902             :         .tp_getset = py_srvsvc_NetSrvInfo1541_getsetters,
   22903             :         .tp_methods = NULL,
   22904             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22905             :         .tp_new = py_srvsvc_NetSrvInfo1541_new,
   22906             : };
   22907             : 
   22908             : 
   22909           0 : static PyObject *py_srvsvc_NetSrvInfo1542_get_maxfreeconnections(PyObject *obj, void *closure)
   22910             : {
   22911           0 :         struct srvsvc_NetSrvInfo1542 *object = (struct srvsvc_NetSrvInfo1542 *)pytalloc_get_ptr(obj);
   22912             :         PyObject *py_maxfreeconnections;
   22913           0 :         py_maxfreeconnections = PyLong_FromUnsignedLongLong((uint32_t)object->maxfreeconnections);
   22914           0 :         return py_maxfreeconnections;
   22915             : }
   22916             : 
   22917           0 : static int py_srvsvc_NetSrvInfo1542_set_maxfreeconnections(PyObject *py_obj, PyObject *value, void *closure)
   22918             : {
   22919           0 :         struct srvsvc_NetSrvInfo1542 *object = (struct srvsvc_NetSrvInfo1542 *)pytalloc_get_ptr(py_obj);
   22920           0 :         if (value == NULL) {
   22921           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxfreeconnections");
   22922           0 :                 return -1;
   22923             :         }
   22924             :         {
   22925           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxfreeconnections));
   22926           0 :                 if (PyLong_Check(value)) {
   22927             :                         unsigned long long test_var;
   22928           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22929           0 :                         if (PyErr_Occurred() != NULL) {
   22930           0 :                                 return -1;
   22931             :                         }
   22932           0 :                         if (test_var > uint_max) {
   22933           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22934             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22935           0 :                                 return -1;
   22936             :                         }
   22937           0 :                         object->maxfreeconnections = test_var;
   22938             :                 } else {
   22939           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22940             :                           PyLong_Type.tp_name);
   22941           0 :                         return -1;
   22942             :                 }
   22943             :         }
   22944           0 :         return 0;
   22945             : }
   22946             : 
   22947             : static PyGetSetDef py_srvsvc_NetSrvInfo1542_getsetters[] = {
   22948             :         {
   22949             :                 .name = discard_const_p(char, "maxfreeconnections"),
   22950             :                 .get = py_srvsvc_NetSrvInfo1542_get_maxfreeconnections,
   22951             :                 .set = py_srvsvc_NetSrvInfo1542_set_maxfreeconnections,
   22952             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22953             :         },
   22954             :         { .name = NULL }
   22955             : };
   22956             : 
   22957           0 : static PyObject *py_srvsvc_NetSrvInfo1542_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22958             : {
   22959           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1542, type);
   22960             : }
   22961             : 
   22962             : 
   22963             : static PyTypeObject srvsvc_NetSrvInfo1542_Type = {
   22964             :         PyVarObject_HEAD_INIT(NULL, 0)
   22965             :         .tp_name = "srvsvc.NetSrvInfo1542",
   22966             :         .tp_getset = py_srvsvc_NetSrvInfo1542_getsetters,
   22967             :         .tp_methods = NULL,
   22968             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22969             :         .tp_new = py_srvsvc_NetSrvInfo1542_new,
   22970             : };
   22971             : 
   22972             : 
   22973           0 : static PyObject *py_srvsvc_NetSrvInfo1543_get_initsesstable(PyObject *obj, void *closure)
   22974             : {
   22975           0 :         struct srvsvc_NetSrvInfo1543 *object = (struct srvsvc_NetSrvInfo1543 *)pytalloc_get_ptr(obj);
   22976             :         PyObject *py_initsesstable;
   22977           0 :         py_initsesstable = PyLong_FromUnsignedLongLong((uint32_t)object->initsesstable);
   22978           0 :         return py_initsesstable;
   22979             : }
   22980             : 
   22981           0 : static int py_srvsvc_NetSrvInfo1543_set_initsesstable(PyObject *py_obj, PyObject *value, void *closure)
   22982             : {
   22983           0 :         struct srvsvc_NetSrvInfo1543 *object = (struct srvsvc_NetSrvInfo1543 *)pytalloc_get_ptr(py_obj);
   22984           0 :         if (value == NULL) {
   22985           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->initsesstable");
   22986           0 :                 return -1;
   22987             :         }
   22988             :         {
   22989           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initsesstable));
   22990           0 :                 if (PyLong_Check(value)) {
   22991             :                         unsigned long long test_var;
   22992           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22993           0 :                         if (PyErr_Occurred() != NULL) {
   22994           0 :                                 return -1;
   22995             :                         }
   22996           0 :                         if (test_var > uint_max) {
   22997           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22998             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22999           0 :                                 return -1;
   23000             :                         }
   23001           0 :                         object->initsesstable = test_var;
   23002             :                 } else {
   23003           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23004             :                           PyLong_Type.tp_name);
   23005           0 :                         return -1;
   23006             :                 }
   23007             :         }
   23008           0 :         return 0;
   23009             : }
   23010             : 
   23011             : static PyGetSetDef py_srvsvc_NetSrvInfo1543_getsetters[] = {
   23012             :         {
   23013             :                 .name = discard_const_p(char, "initsesstable"),
   23014             :                 .get = py_srvsvc_NetSrvInfo1543_get_initsesstable,
   23015             :                 .set = py_srvsvc_NetSrvInfo1543_set_initsesstable,
   23016             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23017             :         },
   23018             :         { .name = NULL }
   23019             : };
   23020             : 
   23021           0 : static PyObject *py_srvsvc_NetSrvInfo1543_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23022             : {
   23023           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1543, type);
   23024             : }
   23025             : 
   23026             : 
   23027             : static PyTypeObject srvsvc_NetSrvInfo1543_Type = {
   23028             :         PyVarObject_HEAD_INIT(NULL, 0)
   23029             :         .tp_name = "srvsvc.NetSrvInfo1543",
   23030             :         .tp_getset = py_srvsvc_NetSrvInfo1543_getsetters,
   23031             :         .tp_methods = NULL,
   23032             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23033             :         .tp_new = py_srvsvc_NetSrvInfo1543_new,
   23034             : };
   23035             : 
   23036             : 
   23037           0 : static PyObject *py_srvsvc_NetSrvInfo1544_get_initconntable(PyObject *obj, void *closure)
   23038             : {
   23039           0 :         struct srvsvc_NetSrvInfo1544 *object = (struct srvsvc_NetSrvInfo1544 *)pytalloc_get_ptr(obj);
   23040             :         PyObject *py_initconntable;
   23041           0 :         py_initconntable = PyLong_FromUnsignedLongLong((uint32_t)object->initconntable);
   23042           0 :         return py_initconntable;
   23043             : }
   23044             : 
   23045           0 : static int py_srvsvc_NetSrvInfo1544_set_initconntable(PyObject *py_obj, PyObject *value, void *closure)
   23046             : {
   23047           0 :         struct srvsvc_NetSrvInfo1544 *object = (struct srvsvc_NetSrvInfo1544 *)pytalloc_get_ptr(py_obj);
   23048           0 :         if (value == NULL) {
   23049           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->initconntable");
   23050           0 :                 return -1;
   23051             :         }
   23052             :         {
   23053           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initconntable));
   23054           0 :                 if (PyLong_Check(value)) {
   23055             :                         unsigned long long test_var;
   23056           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23057           0 :                         if (PyErr_Occurred() != NULL) {
   23058           0 :                                 return -1;
   23059             :                         }
   23060           0 :                         if (test_var > uint_max) {
   23061           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23062             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23063           0 :                                 return -1;
   23064             :                         }
   23065           0 :                         object->initconntable = test_var;
   23066             :                 } else {
   23067           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23068             :                           PyLong_Type.tp_name);
   23069           0 :                         return -1;
   23070             :                 }
   23071             :         }
   23072           0 :         return 0;
   23073             : }
   23074             : 
   23075             : static PyGetSetDef py_srvsvc_NetSrvInfo1544_getsetters[] = {
   23076             :         {
   23077             :                 .name = discard_const_p(char, "initconntable"),
   23078             :                 .get = py_srvsvc_NetSrvInfo1544_get_initconntable,
   23079             :                 .set = py_srvsvc_NetSrvInfo1544_set_initconntable,
   23080             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23081             :         },
   23082             :         { .name = NULL }
   23083             : };
   23084             : 
   23085           0 : static PyObject *py_srvsvc_NetSrvInfo1544_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23086             : {
   23087           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1544, type);
   23088             : }
   23089             : 
   23090             : 
   23091             : static PyTypeObject srvsvc_NetSrvInfo1544_Type = {
   23092             :         PyVarObject_HEAD_INIT(NULL, 0)
   23093             :         .tp_name = "srvsvc.NetSrvInfo1544",
   23094             :         .tp_getset = py_srvsvc_NetSrvInfo1544_getsetters,
   23095             :         .tp_methods = NULL,
   23096             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23097             :         .tp_new = py_srvsvc_NetSrvInfo1544_new,
   23098             : };
   23099             : 
   23100             : 
   23101           0 : static PyObject *py_srvsvc_NetSrvInfo1545_get_initfiletable(PyObject *obj, void *closure)
   23102             : {
   23103           0 :         struct srvsvc_NetSrvInfo1545 *object = (struct srvsvc_NetSrvInfo1545 *)pytalloc_get_ptr(obj);
   23104             :         PyObject *py_initfiletable;
   23105           0 :         py_initfiletable = PyLong_FromUnsignedLongLong((uint32_t)object->initfiletable);
   23106           0 :         return py_initfiletable;
   23107             : }
   23108             : 
   23109           0 : static int py_srvsvc_NetSrvInfo1545_set_initfiletable(PyObject *py_obj, PyObject *value, void *closure)
   23110             : {
   23111           0 :         struct srvsvc_NetSrvInfo1545 *object = (struct srvsvc_NetSrvInfo1545 *)pytalloc_get_ptr(py_obj);
   23112           0 :         if (value == NULL) {
   23113           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->initfiletable");
   23114           0 :                 return -1;
   23115             :         }
   23116             :         {
   23117           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initfiletable));
   23118           0 :                 if (PyLong_Check(value)) {
   23119             :                         unsigned long long test_var;
   23120           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23121           0 :                         if (PyErr_Occurred() != NULL) {
   23122           0 :                                 return -1;
   23123             :                         }
   23124           0 :                         if (test_var > uint_max) {
   23125           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23126             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23127           0 :                                 return -1;
   23128             :                         }
   23129           0 :                         object->initfiletable = test_var;
   23130             :                 } else {
   23131           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23132             :                           PyLong_Type.tp_name);
   23133           0 :                         return -1;
   23134             :                 }
   23135             :         }
   23136           0 :         return 0;
   23137             : }
   23138             : 
   23139             : static PyGetSetDef py_srvsvc_NetSrvInfo1545_getsetters[] = {
   23140             :         {
   23141             :                 .name = discard_const_p(char, "initfiletable"),
   23142             :                 .get = py_srvsvc_NetSrvInfo1545_get_initfiletable,
   23143             :                 .set = py_srvsvc_NetSrvInfo1545_set_initfiletable,
   23144             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23145             :         },
   23146             :         { .name = NULL }
   23147             : };
   23148             : 
   23149           0 : static PyObject *py_srvsvc_NetSrvInfo1545_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23150             : {
   23151           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1545, type);
   23152             : }
   23153             : 
   23154             : 
   23155             : static PyTypeObject srvsvc_NetSrvInfo1545_Type = {
   23156             :         PyVarObject_HEAD_INIT(NULL, 0)
   23157             :         .tp_name = "srvsvc.NetSrvInfo1545",
   23158             :         .tp_getset = py_srvsvc_NetSrvInfo1545_getsetters,
   23159             :         .tp_methods = NULL,
   23160             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23161             :         .tp_new = py_srvsvc_NetSrvInfo1545_new,
   23162             : };
   23163             : 
   23164             : 
   23165           0 : static PyObject *py_srvsvc_NetSrvInfo1546_get_initsearchtable(PyObject *obj, void *closure)
   23166             : {
   23167           0 :         struct srvsvc_NetSrvInfo1546 *object = (struct srvsvc_NetSrvInfo1546 *)pytalloc_get_ptr(obj);
   23168             :         PyObject *py_initsearchtable;
   23169           0 :         py_initsearchtable = PyLong_FromUnsignedLongLong((uint32_t)object->initsearchtable);
   23170           0 :         return py_initsearchtable;
   23171             : }
   23172             : 
   23173           0 : static int py_srvsvc_NetSrvInfo1546_set_initsearchtable(PyObject *py_obj, PyObject *value, void *closure)
   23174             : {
   23175           0 :         struct srvsvc_NetSrvInfo1546 *object = (struct srvsvc_NetSrvInfo1546 *)pytalloc_get_ptr(py_obj);
   23176           0 :         if (value == NULL) {
   23177           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->initsearchtable");
   23178           0 :                 return -1;
   23179             :         }
   23180             :         {
   23181           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->initsearchtable));
   23182           0 :                 if (PyLong_Check(value)) {
   23183             :                         unsigned long long test_var;
   23184           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23185           0 :                         if (PyErr_Occurred() != NULL) {
   23186           0 :                                 return -1;
   23187             :                         }
   23188           0 :                         if (test_var > uint_max) {
   23189           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23190             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23191           0 :                                 return -1;
   23192             :                         }
   23193           0 :                         object->initsearchtable = test_var;
   23194             :                 } else {
   23195           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23196             :                           PyLong_Type.tp_name);
   23197           0 :                         return -1;
   23198             :                 }
   23199             :         }
   23200           0 :         return 0;
   23201             : }
   23202             : 
   23203             : static PyGetSetDef py_srvsvc_NetSrvInfo1546_getsetters[] = {
   23204             :         {
   23205             :                 .name = discard_const_p(char, "initsearchtable"),
   23206             :                 .get = py_srvsvc_NetSrvInfo1546_get_initsearchtable,
   23207             :                 .set = py_srvsvc_NetSrvInfo1546_set_initsearchtable,
   23208             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23209             :         },
   23210             :         { .name = NULL }
   23211             : };
   23212             : 
   23213           0 : static PyObject *py_srvsvc_NetSrvInfo1546_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23214             : {
   23215           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1546, type);
   23216             : }
   23217             : 
   23218             : 
   23219             : static PyTypeObject srvsvc_NetSrvInfo1546_Type = {
   23220             :         PyVarObject_HEAD_INIT(NULL, 0)
   23221             :         .tp_name = "srvsvc.NetSrvInfo1546",
   23222             :         .tp_getset = py_srvsvc_NetSrvInfo1546_getsetters,
   23223             :         .tp_methods = NULL,
   23224             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23225             :         .tp_new = py_srvsvc_NetSrvInfo1546_new,
   23226             : };
   23227             : 
   23228             : 
   23229           0 : static PyObject *py_srvsvc_NetSrvInfo1547_get_alertsched(PyObject *obj, void *closure)
   23230             : {
   23231           0 :         struct srvsvc_NetSrvInfo1547 *object = (struct srvsvc_NetSrvInfo1547 *)pytalloc_get_ptr(obj);
   23232             :         PyObject *py_alertsched;
   23233           0 :         py_alertsched = PyLong_FromUnsignedLongLong((uint32_t)object->alertsched);
   23234           0 :         return py_alertsched;
   23235             : }
   23236             : 
   23237           0 : static int py_srvsvc_NetSrvInfo1547_set_alertsched(PyObject *py_obj, PyObject *value, void *closure)
   23238             : {
   23239           0 :         struct srvsvc_NetSrvInfo1547 *object = (struct srvsvc_NetSrvInfo1547 *)pytalloc_get_ptr(py_obj);
   23240           0 :         if (value == NULL) {
   23241           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->alertsched");
   23242           0 :                 return -1;
   23243             :         }
   23244             :         {
   23245           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->alertsched));
   23246           0 :                 if (PyLong_Check(value)) {
   23247             :                         unsigned long long test_var;
   23248           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23249           0 :                         if (PyErr_Occurred() != NULL) {
   23250           0 :                                 return -1;
   23251             :                         }
   23252           0 :                         if (test_var > uint_max) {
   23253           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23254             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23255           0 :                                 return -1;
   23256             :                         }
   23257           0 :                         object->alertsched = test_var;
   23258             :                 } else {
   23259           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23260             :                           PyLong_Type.tp_name);
   23261           0 :                         return -1;
   23262             :                 }
   23263             :         }
   23264           0 :         return 0;
   23265             : }
   23266             : 
   23267             : static PyGetSetDef py_srvsvc_NetSrvInfo1547_getsetters[] = {
   23268             :         {
   23269             :                 .name = discard_const_p(char, "alertsched"),
   23270             :                 .get = py_srvsvc_NetSrvInfo1547_get_alertsched,
   23271             :                 .set = py_srvsvc_NetSrvInfo1547_set_alertsched,
   23272             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23273             :         },
   23274             :         { .name = NULL }
   23275             : };
   23276             : 
   23277           0 : static PyObject *py_srvsvc_NetSrvInfo1547_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23278             : {
   23279           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1547, type);
   23280             : }
   23281             : 
   23282             : 
   23283             : static PyTypeObject srvsvc_NetSrvInfo1547_Type = {
   23284             :         PyVarObject_HEAD_INIT(NULL, 0)
   23285             :         .tp_name = "srvsvc.NetSrvInfo1547",
   23286             :         .tp_getset = py_srvsvc_NetSrvInfo1547_getsetters,
   23287             :         .tp_methods = NULL,
   23288             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23289             :         .tp_new = py_srvsvc_NetSrvInfo1547_new,
   23290             : };
   23291             : 
   23292             : 
   23293           0 : static PyObject *py_srvsvc_NetSrvInfo1548_get_errortreshold(PyObject *obj, void *closure)
   23294             : {
   23295           0 :         struct srvsvc_NetSrvInfo1548 *object = (struct srvsvc_NetSrvInfo1548 *)pytalloc_get_ptr(obj);
   23296             :         PyObject *py_errortreshold;
   23297           0 :         py_errortreshold = PyLong_FromUnsignedLongLong((uint32_t)object->errortreshold);
   23298           0 :         return py_errortreshold;
   23299             : }
   23300             : 
   23301           0 : static int py_srvsvc_NetSrvInfo1548_set_errortreshold(PyObject *py_obj, PyObject *value, void *closure)
   23302             : {
   23303           0 :         struct srvsvc_NetSrvInfo1548 *object = (struct srvsvc_NetSrvInfo1548 *)pytalloc_get_ptr(py_obj);
   23304           0 :         if (value == NULL) {
   23305           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->errortreshold");
   23306           0 :                 return -1;
   23307             :         }
   23308             :         {
   23309           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->errortreshold));
   23310           0 :                 if (PyLong_Check(value)) {
   23311             :                         unsigned long long test_var;
   23312           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23313           0 :                         if (PyErr_Occurred() != NULL) {
   23314           0 :                                 return -1;
   23315             :                         }
   23316           0 :                         if (test_var > uint_max) {
   23317           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23318             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23319           0 :                                 return -1;
   23320             :                         }
   23321           0 :                         object->errortreshold = test_var;
   23322             :                 } else {
   23323           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23324             :                           PyLong_Type.tp_name);
   23325           0 :                         return -1;
   23326             :                 }
   23327             :         }
   23328           0 :         return 0;
   23329             : }
   23330             : 
   23331             : static PyGetSetDef py_srvsvc_NetSrvInfo1548_getsetters[] = {
   23332             :         {
   23333             :                 .name = discard_const_p(char, "errortreshold"),
   23334             :                 .get = py_srvsvc_NetSrvInfo1548_get_errortreshold,
   23335             :                 .set = py_srvsvc_NetSrvInfo1548_set_errortreshold,
   23336             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23337             :         },
   23338             :         { .name = NULL }
   23339             : };
   23340             : 
   23341           0 : static PyObject *py_srvsvc_NetSrvInfo1548_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23342             : {
   23343           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1548, type);
   23344             : }
   23345             : 
   23346             : 
   23347             : static PyTypeObject srvsvc_NetSrvInfo1548_Type = {
   23348             :         PyVarObject_HEAD_INIT(NULL, 0)
   23349             :         .tp_name = "srvsvc.NetSrvInfo1548",
   23350             :         .tp_getset = py_srvsvc_NetSrvInfo1548_getsetters,
   23351             :         .tp_methods = NULL,
   23352             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23353             :         .tp_new = py_srvsvc_NetSrvInfo1548_new,
   23354             : };
   23355             : 
   23356             : 
   23357           0 : static PyObject *py_srvsvc_NetSrvInfo1549_get_networkerrortreshold(PyObject *obj, void *closure)
   23358             : {
   23359           0 :         struct srvsvc_NetSrvInfo1549 *object = (struct srvsvc_NetSrvInfo1549 *)pytalloc_get_ptr(obj);
   23360             :         PyObject *py_networkerrortreshold;
   23361           0 :         py_networkerrortreshold = PyLong_FromUnsignedLongLong((uint32_t)object->networkerrortreshold);
   23362           0 :         return py_networkerrortreshold;
   23363             : }
   23364             : 
   23365           0 : static int py_srvsvc_NetSrvInfo1549_set_networkerrortreshold(PyObject *py_obj, PyObject *value, void *closure)
   23366             : {
   23367           0 :         struct srvsvc_NetSrvInfo1549 *object = (struct srvsvc_NetSrvInfo1549 *)pytalloc_get_ptr(py_obj);
   23368           0 :         if (value == NULL) {
   23369           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->networkerrortreshold");
   23370           0 :                 return -1;
   23371             :         }
   23372             :         {
   23373           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->networkerrortreshold));
   23374           0 :                 if (PyLong_Check(value)) {
   23375             :                         unsigned long long test_var;
   23376           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23377           0 :                         if (PyErr_Occurred() != NULL) {
   23378           0 :                                 return -1;
   23379             :                         }
   23380           0 :                         if (test_var > uint_max) {
   23381           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23382             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23383           0 :                                 return -1;
   23384             :                         }
   23385           0 :                         object->networkerrortreshold = test_var;
   23386             :                 } else {
   23387           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23388             :                           PyLong_Type.tp_name);
   23389           0 :                         return -1;
   23390             :                 }
   23391             :         }
   23392           0 :         return 0;
   23393             : }
   23394             : 
   23395             : static PyGetSetDef py_srvsvc_NetSrvInfo1549_getsetters[] = {
   23396             :         {
   23397             :                 .name = discard_const_p(char, "networkerrortreshold"),
   23398             :                 .get = py_srvsvc_NetSrvInfo1549_get_networkerrortreshold,
   23399             :                 .set = py_srvsvc_NetSrvInfo1549_set_networkerrortreshold,
   23400             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23401             :         },
   23402             :         { .name = NULL }
   23403             : };
   23404             : 
   23405           0 : static PyObject *py_srvsvc_NetSrvInfo1549_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23406             : {
   23407           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1549, type);
   23408             : }
   23409             : 
   23410             : 
   23411             : static PyTypeObject srvsvc_NetSrvInfo1549_Type = {
   23412             :         PyVarObject_HEAD_INIT(NULL, 0)
   23413             :         .tp_name = "srvsvc.NetSrvInfo1549",
   23414             :         .tp_getset = py_srvsvc_NetSrvInfo1549_getsetters,
   23415             :         .tp_methods = NULL,
   23416             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23417             :         .tp_new = py_srvsvc_NetSrvInfo1549_new,
   23418             : };
   23419             : 
   23420             : 
   23421           0 : static PyObject *py_srvsvc_NetSrvInfo1550_get_diskspacetreshold(PyObject *obj, void *closure)
   23422             : {
   23423           0 :         struct srvsvc_NetSrvInfo1550 *object = (struct srvsvc_NetSrvInfo1550 *)pytalloc_get_ptr(obj);
   23424             :         PyObject *py_diskspacetreshold;
   23425           0 :         py_diskspacetreshold = PyLong_FromUnsignedLongLong((uint32_t)object->diskspacetreshold);
   23426           0 :         return py_diskspacetreshold;
   23427             : }
   23428             : 
   23429           0 : static int py_srvsvc_NetSrvInfo1550_set_diskspacetreshold(PyObject *py_obj, PyObject *value, void *closure)
   23430             : {
   23431           0 :         struct srvsvc_NetSrvInfo1550 *object = (struct srvsvc_NetSrvInfo1550 *)pytalloc_get_ptr(py_obj);
   23432           0 :         if (value == NULL) {
   23433           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->diskspacetreshold");
   23434           0 :                 return -1;
   23435             :         }
   23436             :         {
   23437           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->diskspacetreshold));
   23438           0 :                 if (PyLong_Check(value)) {
   23439             :                         unsigned long long test_var;
   23440           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23441           0 :                         if (PyErr_Occurred() != NULL) {
   23442           0 :                                 return -1;
   23443             :                         }
   23444           0 :                         if (test_var > uint_max) {
   23445           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23446             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23447           0 :                                 return -1;
   23448             :                         }
   23449           0 :                         object->diskspacetreshold = test_var;
   23450             :                 } else {
   23451           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23452             :                           PyLong_Type.tp_name);
   23453           0 :                         return -1;
   23454             :                 }
   23455             :         }
   23456           0 :         return 0;
   23457             : }
   23458             : 
   23459             : static PyGetSetDef py_srvsvc_NetSrvInfo1550_getsetters[] = {
   23460             :         {
   23461             :                 .name = discard_const_p(char, "diskspacetreshold"),
   23462             :                 .get = py_srvsvc_NetSrvInfo1550_get_diskspacetreshold,
   23463             :                 .set = py_srvsvc_NetSrvInfo1550_set_diskspacetreshold,
   23464             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23465             :         },
   23466             :         { .name = NULL }
   23467             : };
   23468             : 
   23469           0 : static PyObject *py_srvsvc_NetSrvInfo1550_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23470             : {
   23471           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1550, type);
   23472             : }
   23473             : 
   23474             : 
   23475             : static PyTypeObject srvsvc_NetSrvInfo1550_Type = {
   23476             :         PyVarObject_HEAD_INIT(NULL, 0)
   23477             :         .tp_name = "srvsvc.NetSrvInfo1550",
   23478             :         .tp_getset = py_srvsvc_NetSrvInfo1550_getsetters,
   23479             :         .tp_methods = NULL,
   23480             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23481             :         .tp_new = py_srvsvc_NetSrvInfo1550_new,
   23482             : };
   23483             : 
   23484             : 
   23485           0 : static PyObject *py_srvsvc_NetSrvInfo1552_get_maxlinkdelay(PyObject *obj, void *closure)
   23486             : {
   23487           0 :         struct srvsvc_NetSrvInfo1552 *object = (struct srvsvc_NetSrvInfo1552 *)pytalloc_get_ptr(obj);
   23488             :         PyObject *py_maxlinkdelay;
   23489           0 :         py_maxlinkdelay = PyLong_FromUnsignedLongLong((uint32_t)object->maxlinkdelay);
   23490           0 :         return py_maxlinkdelay;
   23491             : }
   23492             : 
   23493           0 : static int py_srvsvc_NetSrvInfo1552_set_maxlinkdelay(PyObject *py_obj, PyObject *value, void *closure)
   23494             : {
   23495           0 :         struct srvsvc_NetSrvInfo1552 *object = (struct srvsvc_NetSrvInfo1552 *)pytalloc_get_ptr(py_obj);
   23496           0 :         if (value == NULL) {
   23497           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxlinkdelay");
   23498           0 :                 return -1;
   23499             :         }
   23500             :         {
   23501           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxlinkdelay));
   23502           0 :                 if (PyLong_Check(value)) {
   23503             :                         unsigned long long test_var;
   23504           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23505           0 :                         if (PyErr_Occurred() != NULL) {
   23506           0 :                                 return -1;
   23507             :                         }
   23508           0 :                         if (test_var > uint_max) {
   23509           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23510             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23511           0 :                                 return -1;
   23512             :                         }
   23513           0 :                         object->maxlinkdelay = test_var;
   23514             :                 } else {
   23515           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23516             :                           PyLong_Type.tp_name);
   23517           0 :                         return -1;
   23518             :                 }
   23519             :         }
   23520           0 :         return 0;
   23521             : }
   23522             : 
   23523             : static PyGetSetDef py_srvsvc_NetSrvInfo1552_getsetters[] = {
   23524             :         {
   23525             :                 .name = discard_const_p(char, "maxlinkdelay"),
   23526             :                 .get = py_srvsvc_NetSrvInfo1552_get_maxlinkdelay,
   23527             :                 .set = py_srvsvc_NetSrvInfo1552_set_maxlinkdelay,
   23528             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23529             :         },
   23530             :         { .name = NULL }
   23531             : };
   23532             : 
   23533           0 : static PyObject *py_srvsvc_NetSrvInfo1552_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23534             : {
   23535           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1552, type);
   23536             : }
   23537             : 
   23538             : 
   23539             : static PyTypeObject srvsvc_NetSrvInfo1552_Type = {
   23540             :         PyVarObject_HEAD_INIT(NULL, 0)
   23541             :         .tp_name = "srvsvc.NetSrvInfo1552",
   23542             :         .tp_getset = py_srvsvc_NetSrvInfo1552_getsetters,
   23543             :         .tp_methods = NULL,
   23544             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23545             :         .tp_new = py_srvsvc_NetSrvInfo1552_new,
   23546             : };
   23547             : 
   23548             : 
   23549           0 : static PyObject *py_srvsvc_NetSrvInfo1553_get_minlinkthroughput(PyObject *obj, void *closure)
   23550             : {
   23551           0 :         struct srvsvc_NetSrvInfo1553 *object = (struct srvsvc_NetSrvInfo1553 *)pytalloc_get_ptr(obj);
   23552             :         PyObject *py_minlinkthroughput;
   23553           0 :         py_minlinkthroughput = PyLong_FromUnsignedLongLong((uint32_t)object->minlinkthroughput);
   23554           0 :         return py_minlinkthroughput;
   23555             : }
   23556             : 
   23557           0 : static int py_srvsvc_NetSrvInfo1553_set_minlinkthroughput(PyObject *py_obj, PyObject *value, void *closure)
   23558             : {
   23559           0 :         struct srvsvc_NetSrvInfo1553 *object = (struct srvsvc_NetSrvInfo1553 *)pytalloc_get_ptr(py_obj);
   23560           0 :         if (value == NULL) {
   23561           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minlinkthroughput");
   23562           0 :                 return -1;
   23563             :         }
   23564             :         {
   23565           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minlinkthroughput));
   23566           0 :                 if (PyLong_Check(value)) {
   23567             :                         unsigned long long test_var;
   23568           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23569           0 :                         if (PyErr_Occurred() != NULL) {
   23570           0 :                                 return -1;
   23571             :                         }
   23572           0 :                         if (test_var > uint_max) {
   23573           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23574             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23575           0 :                                 return -1;
   23576             :                         }
   23577           0 :                         object->minlinkthroughput = test_var;
   23578             :                 } else {
   23579           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23580             :                           PyLong_Type.tp_name);
   23581           0 :                         return -1;
   23582             :                 }
   23583             :         }
   23584           0 :         return 0;
   23585             : }
   23586             : 
   23587             : static PyGetSetDef py_srvsvc_NetSrvInfo1553_getsetters[] = {
   23588             :         {
   23589             :                 .name = discard_const_p(char, "minlinkthroughput"),
   23590             :                 .get = py_srvsvc_NetSrvInfo1553_get_minlinkthroughput,
   23591             :                 .set = py_srvsvc_NetSrvInfo1553_set_minlinkthroughput,
   23592             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23593             :         },
   23594             :         { .name = NULL }
   23595             : };
   23596             : 
   23597           0 : static PyObject *py_srvsvc_NetSrvInfo1553_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23598             : {
   23599           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1553, type);
   23600             : }
   23601             : 
   23602             : 
   23603             : static PyTypeObject srvsvc_NetSrvInfo1553_Type = {
   23604             :         PyVarObject_HEAD_INIT(NULL, 0)
   23605             :         .tp_name = "srvsvc.NetSrvInfo1553",
   23606             :         .tp_getset = py_srvsvc_NetSrvInfo1553_getsetters,
   23607             :         .tp_methods = NULL,
   23608             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23609             :         .tp_new = py_srvsvc_NetSrvInfo1553_new,
   23610             : };
   23611             : 
   23612             : 
   23613           0 : static PyObject *py_srvsvc_NetSrvInfo1554_get_linkinfovalidtime(PyObject *obj, void *closure)
   23614             : {
   23615           0 :         struct srvsvc_NetSrvInfo1554 *object = (struct srvsvc_NetSrvInfo1554 *)pytalloc_get_ptr(obj);
   23616             :         PyObject *py_linkinfovalidtime;
   23617           0 :         py_linkinfovalidtime = PyLong_FromUnsignedLongLong((uint32_t)object->linkinfovalidtime);
   23618           0 :         return py_linkinfovalidtime;
   23619             : }
   23620             : 
   23621           0 : static int py_srvsvc_NetSrvInfo1554_set_linkinfovalidtime(PyObject *py_obj, PyObject *value, void *closure)
   23622             : {
   23623           0 :         struct srvsvc_NetSrvInfo1554 *object = (struct srvsvc_NetSrvInfo1554 *)pytalloc_get_ptr(py_obj);
   23624           0 :         if (value == NULL) {
   23625           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->linkinfovalidtime");
   23626           0 :                 return -1;
   23627             :         }
   23628             :         {
   23629           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->linkinfovalidtime));
   23630           0 :                 if (PyLong_Check(value)) {
   23631             :                         unsigned long long test_var;
   23632           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23633           0 :                         if (PyErr_Occurred() != NULL) {
   23634           0 :                                 return -1;
   23635             :                         }
   23636           0 :                         if (test_var > uint_max) {
   23637           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23638             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23639           0 :                                 return -1;
   23640             :                         }
   23641           0 :                         object->linkinfovalidtime = test_var;
   23642             :                 } else {
   23643           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23644             :                           PyLong_Type.tp_name);
   23645           0 :                         return -1;
   23646             :                 }
   23647             :         }
   23648           0 :         return 0;
   23649             : }
   23650             : 
   23651             : static PyGetSetDef py_srvsvc_NetSrvInfo1554_getsetters[] = {
   23652             :         {
   23653             :                 .name = discard_const_p(char, "linkinfovalidtime"),
   23654             :                 .get = py_srvsvc_NetSrvInfo1554_get_linkinfovalidtime,
   23655             :                 .set = py_srvsvc_NetSrvInfo1554_set_linkinfovalidtime,
   23656             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23657             :         },
   23658             :         { .name = NULL }
   23659             : };
   23660             : 
   23661           0 : static PyObject *py_srvsvc_NetSrvInfo1554_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23662             : {
   23663           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1554, type);
   23664             : }
   23665             : 
   23666             : 
   23667             : static PyTypeObject srvsvc_NetSrvInfo1554_Type = {
   23668             :         PyVarObject_HEAD_INIT(NULL, 0)
   23669             :         .tp_name = "srvsvc.NetSrvInfo1554",
   23670             :         .tp_getset = py_srvsvc_NetSrvInfo1554_getsetters,
   23671             :         .tp_methods = NULL,
   23672             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23673             :         .tp_new = py_srvsvc_NetSrvInfo1554_new,
   23674             : };
   23675             : 
   23676             : 
   23677           0 : static PyObject *py_srvsvc_NetSrvInfo1555_get_scavqosinfoupdatetime(PyObject *obj, void *closure)
   23678             : {
   23679           0 :         struct srvsvc_NetSrvInfo1555 *object = (struct srvsvc_NetSrvInfo1555 *)pytalloc_get_ptr(obj);
   23680             :         PyObject *py_scavqosinfoupdatetime;
   23681           0 :         py_scavqosinfoupdatetime = PyLong_FromUnsignedLongLong((uint32_t)object->scavqosinfoupdatetime);
   23682           0 :         return py_scavqosinfoupdatetime;
   23683             : }
   23684             : 
   23685           0 : static int py_srvsvc_NetSrvInfo1555_set_scavqosinfoupdatetime(PyObject *py_obj, PyObject *value, void *closure)
   23686             : {
   23687           0 :         struct srvsvc_NetSrvInfo1555 *object = (struct srvsvc_NetSrvInfo1555 *)pytalloc_get_ptr(py_obj);
   23688           0 :         if (value == NULL) {
   23689           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->scavqosinfoupdatetime");
   23690           0 :                 return -1;
   23691             :         }
   23692             :         {
   23693           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->scavqosinfoupdatetime));
   23694           0 :                 if (PyLong_Check(value)) {
   23695             :                         unsigned long long test_var;
   23696           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23697           0 :                         if (PyErr_Occurred() != NULL) {
   23698           0 :                                 return -1;
   23699             :                         }
   23700           0 :                         if (test_var > uint_max) {
   23701           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23702             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23703           0 :                                 return -1;
   23704             :                         }
   23705           0 :                         object->scavqosinfoupdatetime = test_var;
   23706             :                 } else {
   23707           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23708             :                           PyLong_Type.tp_name);
   23709           0 :                         return -1;
   23710             :                 }
   23711             :         }
   23712           0 :         return 0;
   23713             : }
   23714             : 
   23715             : static PyGetSetDef py_srvsvc_NetSrvInfo1555_getsetters[] = {
   23716             :         {
   23717             :                 .name = discard_const_p(char, "scavqosinfoupdatetime"),
   23718             :                 .get = py_srvsvc_NetSrvInfo1555_get_scavqosinfoupdatetime,
   23719             :                 .set = py_srvsvc_NetSrvInfo1555_set_scavqosinfoupdatetime,
   23720             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23721             :         },
   23722             :         { .name = NULL }
   23723             : };
   23724             : 
   23725           0 : static PyObject *py_srvsvc_NetSrvInfo1555_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23726             : {
   23727           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1555, type);
   23728             : }
   23729             : 
   23730             : 
   23731             : static PyTypeObject srvsvc_NetSrvInfo1555_Type = {
   23732             :         PyVarObject_HEAD_INIT(NULL, 0)
   23733             :         .tp_name = "srvsvc.NetSrvInfo1555",
   23734             :         .tp_getset = py_srvsvc_NetSrvInfo1555_getsetters,
   23735             :         .tp_methods = NULL,
   23736             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23737             :         .tp_new = py_srvsvc_NetSrvInfo1555_new,
   23738             : };
   23739             : 
   23740             : 
   23741           0 : static PyObject *py_srvsvc_NetSrvInfo1556_get_maxworkitemidletime(PyObject *obj, void *closure)
   23742             : {
   23743           0 :         struct srvsvc_NetSrvInfo1556 *object = (struct srvsvc_NetSrvInfo1556 *)pytalloc_get_ptr(obj);
   23744             :         PyObject *py_maxworkitemidletime;
   23745           0 :         py_maxworkitemidletime = PyLong_FromUnsignedLongLong((uint32_t)object->maxworkitemidletime);
   23746           0 :         return py_maxworkitemidletime;
   23747             : }
   23748             : 
   23749           0 : static int py_srvsvc_NetSrvInfo1556_set_maxworkitemidletime(PyObject *py_obj, PyObject *value, void *closure)
   23750             : {
   23751           0 :         struct srvsvc_NetSrvInfo1556 *object = (struct srvsvc_NetSrvInfo1556 *)pytalloc_get_ptr(py_obj);
   23752           0 :         if (value == NULL) {
   23753           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxworkitemidletime");
   23754           0 :                 return -1;
   23755             :         }
   23756             :         {
   23757           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxworkitemidletime));
   23758           0 :                 if (PyLong_Check(value)) {
   23759             :                         unsigned long long test_var;
   23760           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23761           0 :                         if (PyErr_Occurred() != NULL) {
   23762           0 :                                 return -1;
   23763             :                         }
   23764           0 :                         if (test_var > uint_max) {
   23765           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23766             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23767           0 :                                 return -1;
   23768             :                         }
   23769           0 :                         object->maxworkitemidletime = test_var;
   23770             :                 } else {
   23771           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23772             :                           PyLong_Type.tp_name);
   23773           0 :                         return -1;
   23774             :                 }
   23775             :         }
   23776           0 :         return 0;
   23777             : }
   23778             : 
   23779             : static PyGetSetDef py_srvsvc_NetSrvInfo1556_getsetters[] = {
   23780             :         {
   23781             :                 .name = discard_const_p(char, "maxworkitemidletime"),
   23782             :                 .get = py_srvsvc_NetSrvInfo1556_get_maxworkitemidletime,
   23783             :                 .set = py_srvsvc_NetSrvInfo1556_set_maxworkitemidletime,
   23784             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23785             :         },
   23786             :         { .name = NULL }
   23787             : };
   23788             : 
   23789           0 : static PyObject *py_srvsvc_NetSrvInfo1556_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23790             : {
   23791           0 :         return pytalloc_new(struct srvsvc_NetSrvInfo1556, type);
   23792             : }
   23793             : 
   23794             : 
   23795             : static PyTypeObject srvsvc_NetSrvInfo1556_Type = {
   23796             :         PyVarObject_HEAD_INIT(NULL, 0)
   23797             :         .tp_name = "srvsvc.NetSrvInfo1556",
   23798             :         .tp_getset = py_srvsvc_NetSrvInfo1556_getsetters,
   23799             :         .tp_methods = NULL,
   23800             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23801             :         .tp_new = py_srvsvc_NetSrvInfo1556_new,
   23802             : };
   23803             : 
   23804           1 : static PyObject *py_import_srvsvc_NetSrvInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetSrvInfo *in)
   23805             : {
   23806             :         PyObject *ret;
   23807             : 
   23808           1 :         switch (level) {
   23809           0 :                 case 100:
   23810           0 :                         if (in->info100 == NULL) {
   23811           0 :                                 ret = Py_None;
   23812           0 :                                 Py_INCREF(ret);
   23813             :                         } else {
   23814           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo100_Type, in->info100, in->info100);
   23815             :                         }
   23816           0 :                         return ret;
   23817             : 
   23818           1 :                 case 101:
   23819           1 :                         if (in->info101 == NULL) {
   23820           0 :                                 ret = Py_None;
   23821           0 :                                 Py_INCREF(ret);
   23822             :                         } else {
   23823           1 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo101_Type, in->info101, in->info101);
   23824             :                         }
   23825           1 :                         return ret;
   23826             : 
   23827           0 :                 case 102:
   23828           0 :                         if (in->info102 == NULL) {
   23829           0 :                                 ret = Py_None;
   23830           0 :                                 Py_INCREF(ret);
   23831             :                         } else {
   23832           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo102_Type, in->info102, in->info102);
   23833             :                         }
   23834           0 :                         return ret;
   23835             : 
   23836           0 :                 case 402:
   23837           0 :                         if (in->info402 == NULL) {
   23838           0 :                                 ret = Py_None;
   23839           0 :                                 Py_INCREF(ret);
   23840             :                         } else {
   23841           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo402_Type, in->info402, in->info402);
   23842             :                         }
   23843           0 :                         return ret;
   23844             : 
   23845           0 :                 case 403:
   23846           0 :                         if (in->info403 == NULL) {
   23847           0 :                                 ret = Py_None;
   23848           0 :                                 Py_INCREF(ret);
   23849             :                         } else {
   23850           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo403_Type, in->info403, in->info403);
   23851             :                         }
   23852           0 :                         return ret;
   23853             : 
   23854           0 :                 case 502:
   23855           0 :                         if (in->info502 == NULL) {
   23856           0 :                                 ret = Py_None;
   23857           0 :                                 Py_INCREF(ret);
   23858             :                         } else {
   23859           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo502_Type, in->info502, in->info502);
   23860             :                         }
   23861           0 :                         return ret;
   23862             : 
   23863           0 :                 case 503:
   23864           0 :                         if (in->info503 == NULL) {
   23865           0 :                                 ret = Py_None;
   23866           0 :                                 Py_INCREF(ret);
   23867             :                         } else {
   23868           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo503_Type, in->info503, in->info503);
   23869             :                         }
   23870           0 :                         return ret;
   23871             : 
   23872           0 :                 case 599:
   23873           0 :                         if (in->info599 == NULL) {
   23874           0 :                                 ret = Py_None;
   23875           0 :                                 Py_INCREF(ret);
   23876             :                         } else {
   23877           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo599_Type, in->info599, in->info599);
   23878             :                         }
   23879           0 :                         return ret;
   23880             : 
   23881           0 :                 case 1005:
   23882           0 :                         if (in->info1005 == NULL) {
   23883           0 :                                 ret = Py_None;
   23884           0 :                                 Py_INCREF(ret);
   23885             :                         } else {
   23886           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1005_Type, in->info1005, in->info1005);
   23887             :                         }
   23888           0 :                         return ret;
   23889             : 
   23890           0 :                 case 1010:
   23891           0 :                         if (in->info1010 == NULL) {
   23892           0 :                                 ret = Py_None;
   23893           0 :                                 Py_INCREF(ret);
   23894             :                         } else {
   23895           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1010_Type, in->info1010, in->info1010);
   23896             :                         }
   23897           0 :                         return ret;
   23898             : 
   23899           0 :                 case 1016:
   23900           0 :                         if (in->info1016 == NULL) {
   23901           0 :                                 ret = Py_None;
   23902           0 :                                 Py_INCREF(ret);
   23903             :                         } else {
   23904           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1016_Type, in->info1016, in->info1016);
   23905             :                         }
   23906           0 :                         return ret;
   23907             : 
   23908           0 :                 case 1017:
   23909           0 :                         if (in->info1017 == NULL) {
   23910           0 :                                 ret = Py_None;
   23911           0 :                                 Py_INCREF(ret);
   23912             :                         } else {
   23913           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1017_Type, in->info1017, in->info1017);
   23914             :                         }
   23915           0 :                         return ret;
   23916             : 
   23917           0 :                 case 1018:
   23918           0 :                         if (in->info1018 == NULL) {
   23919           0 :                                 ret = Py_None;
   23920           0 :                                 Py_INCREF(ret);
   23921             :                         } else {
   23922           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1018_Type, in->info1018, in->info1018);
   23923             :                         }
   23924           0 :                         return ret;
   23925             : 
   23926           0 :                 case 1107:
   23927           0 :                         if (in->info1107 == NULL) {
   23928           0 :                                 ret = Py_None;
   23929           0 :                                 Py_INCREF(ret);
   23930             :                         } else {
   23931           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1107_Type, in->info1107, in->info1107);
   23932             :                         }
   23933           0 :                         return ret;
   23934             : 
   23935           0 :                 case 1501:
   23936           0 :                         if (in->info1501 == NULL) {
   23937           0 :                                 ret = Py_None;
   23938           0 :                                 Py_INCREF(ret);
   23939             :                         } else {
   23940           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1501_Type, in->info1501, in->info1501);
   23941             :                         }
   23942           0 :                         return ret;
   23943             : 
   23944           0 :                 case 1502:
   23945           0 :                         if (in->info1502 == NULL) {
   23946           0 :                                 ret = Py_None;
   23947           0 :                                 Py_INCREF(ret);
   23948             :                         } else {
   23949           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1502_Type, in->info1502, in->info1502);
   23950             :                         }
   23951           0 :                         return ret;
   23952             : 
   23953           0 :                 case 1503:
   23954           0 :                         if (in->info1503 == NULL) {
   23955           0 :                                 ret = Py_None;
   23956           0 :                                 Py_INCREF(ret);
   23957             :                         } else {
   23958           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1503_Type, in->info1503, in->info1503);
   23959             :                         }
   23960           0 :                         return ret;
   23961             : 
   23962           0 :                 case 1506:
   23963           0 :                         if (in->info1506 == NULL) {
   23964           0 :                                 ret = Py_None;
   23965           0 :                                 Py_INCREF(ret);
   23966             :                         } else {
   23967           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1506_Type, in->info1506, in->info1506);
   23968             :                         }
   23969           0 :                         return ret;
   23970             : 
   23971           0 :                 case 1509:
   23972           0 :                         if (in->info1509 == NULL) {
   23973           0 :                                 ret = Py_None;
   23974           0 :                                 Py_INCREF(ret);
   23975             :                         } else {
   23976           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1509_Type, in->info1509, in->info1509);
   23977             :                         }
   23978           0 :                         return ret;
   23979             : 
   23980           0 :                 case 1510:
   23981           0 :                         if (in->info1510 == NULL) {
   23982           0 :                                 ret = Py_None;
   23983           0 :                                 Py_INCREF(ret);
   23984             :                         } else {
   23985           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1510_Type, in->info1510, in->info1510);
   23986             :                         }
   23987           0 :                         return ret;
   23988             : 
   23989           0 :                 case 1511:
   23990           0 :                         if (in->info1511 == NULL) {
   23991           0 :                                 ret = Py_None;
   23992           0 :                                 Py_INCREF(ret);
   23993             :                         } else {
   23994           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1511_Type, in->info1511, in->info1511);
   23995             :                         }
   23996           0 :                         return ret;
   23997             : 
   23998           0 :                 case 1512:
   23999           0 :                         if (in->info1512 == NULL) {
   24000           0 :                                 ret = Py_None;
   24001           0 :                                 Py_INCREF(ret);
   24002             :                         } else {
   24003           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1512_Type, in->info1512, in->info1512);
   24004             :                         }
   24005           0 :                         return ret;
   24006             : 
   24007           0 :                 case 1513:
   24008           0 :                         if (in->info1513 == NULL) {
   24009           0 :                                 ret = Py_None;
   24010           0 :                                 Py_INCREF(ret);
   24011             :                         } else {
   24012           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1513_Type, in->info1513, in->info1513);
   24013             :                         }
   24014           0 :                         return ret;
   24015             : 
   24016           0 :                 case 1514:
   24017           0 :                         if (in->info1514 == NULL) {
   24018           0 :                                 ret = Py_None;
   24019           0 :                                 Py_INCREF(ret);
   24020             :                         } else {
   24021           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1514_Type, in->info1514, in->info1514);
   24022             :                         }
   24023           0 :                         return ret;
   24024             : 
   24025           0 :                 case 1515:
   24026           0 :                         if (in->info1515 == NULL) {
   24027           0 :                                 ret = Py_None;
   24028           0 :                                 Py_INCREF(ret);
   24029             :                         } else {
   24030           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1515_Type, in->info1515, in->info1515);
   24031             :                         }
   24032           0 :                         return ret;
   24033             : 
   24034           0 :                 case 1516:
   24035           0 :                         if (in->info1516 == NULL) {
   24036           0 :                                 ret = Py_None;
   24037           0 :                                 Py_INCREF(ret);
   24038             :                         } else {
   24039           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1516_Type, in->info1516, in->info1516);
   24040             :                         }
   24041           0 :                         return ret;
   24042             : 
   24043           0 :                 case 1518:
   24044           0 :                         if (in->info1518 == NULL) {
   24045           0 :                                 ret = Py_None;
   24046           0 :                                 Py_INCREF(ret);
   24047             :                         } else {
   24048           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1518_Type, in->info1518, in->info1518);
   24049             :                         }
   24050           0 :                         return ret;
   24051             : 
   24052           0 :                 case 1520:
   24053           0 :                         if (in->info1520 == NULL) {
   24054           0 :                                 ret = Py_None;
   24055           0 :                                 Py_INCREF(ret);
   24056             :                         } else {
   24057           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1520_Type, in->info1520, in->info1520);
   24058             :                         }
   24059           0 :                         return ret;
   24060             : 
   24061           0 :                 case 1521:
   24062           0 :                         if (in->info1521 == NULL) {
   24063           0 :                                 ret = Py_None;
   24064           0 :                                 Py_INCREF(ret);
   24065             :                         } else {
   24066           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1521_Type, in->info1521, in->info1521);
   24067             :                         }
   24068           0 :                         return ret;
   24069             : 
   24070           0 :                 case 1522:
   24071           0 :                         if (in->info1522 == NULL) {
   24072           0 :                                 ret = Py_None;
   24073           0 :                                 Py_INCREF(ret);
   24074             :                         } else {
   24075           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1522_Type, in->info1522, in->info1522);
   24076             :                         }
   24077           0 :                         return ret;
   24078             : 
   24079           0 :                 case 1523:
   24080           0 :                         if (in->info1523 == NULL) {
   24081           0 :                                 ret = Py_None;
   24082           0 :                                 Py_INCREF(ret);
   24083             :                         } else {
   24084           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1523_Type, in->info1523, in->info1523);
   24085             :                         }
   24086           0 :                         return ret;
   24087             : 
   24088           0 :                 case 1524:
   24089           0 :                         if (in->info1524 == NULL) {
   24090           0 :                                 ret = Py_None;
   24091           0 :                                 Py_INCREF(ret);
   24092             :                         } else {
   24093           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1524_Type, in->info1524, in->info1524);
   24094             :                         }
   24095           0 :                         return ret;
   24096             : 
   24097           0 :                 case 1525:
   24098           0 :                         if (in->info1525 == NULL) {
   24099           0 :                                 ret = Py_None;
   24100           0 :                                 Py_INCREF(ret);
   24101             :                         } else {
   24102           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1525_Type, in->info1525, in->info1525);
   24103             :                         }
   24104           0 :                         return ret;
   24105             : 
   24106           0 :                 case 1528:
   24107           0 :                         if (in->info1528 == NULL) {
   24108           0 :                                 ret = Py_None;
   24109           0 :                                 Py_INCREF(ret);
   24110             :                         } else {
   24111           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1528_Type, in->info1528, in->info1528);
   24112             :                         }
   24113           0 :                         return ret;
   24114             : 
   24115           0 :                 case 1529:
   24116           0 :                         if (in->info1529 == NULL) {
   24117           0 :                                 ret = Py_None;
   24118           0 :                                 Py_INCREF(ret);
   24119             :                         } else {
   24120           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1529_Type, in->info1529, in->info1529);
   24121             :                         }
   24122           0 :                         return ret;
   24123             : 
   24124           0 :                 case 1530:
   24125           0 :                         if (in->info1530 == NULL) {
   24126           0 :                                 ret = Py_None;
   24127           0 :                                 Py_INCREF(ret);
   24128             :                         } else {
   24129           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1530_Type, in->info1530, in->info1530);
   24130             :                         }
   24131           0 :                         return ret;
   24132             : 
   24133           0 :                 case 1533:
   24134           0 :                         if (in->info1533 == NULL) {
   24135           0 :                                 ret = Py_None;
   24136           0 :                                 Py_INCREF(ret);
   24137             :                         } else {
   24138           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1533_Type, in->info1533, in->info1533);
   24139             :                         }
   24140           0 :                         return ret;
   24141             : 
   24142           0 :                 case 1534:
   24143           0 :                         if (in->info1534 == NULL) {
   24144           0 :                                 ret = Py_None;
   24145           0 :                                 Py_INCREF(ret);
   24146             :                         } else {
   24147           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1534_Type, in->info1534, in->info1534);
   24148             :                         }
   24149           0 :                         return ret;
   24150             : 
   24151           0 :                 case 1535:
   24152           0 :                         if (in->info1535 == NULL) {
   24153           0 :                                 ret = Py_None;
   24154           0 :                                 Py_INCREF(ret);
   24155             :                         } else {
   24156           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1535_Type, in->info1535, in->info1535);
   24157             :                         }
   24158           0 :                         return ret;
   24159             : 
   24160           0 :                 case 1536:
   24161           0 :                         if (in->info1536 == NULL) {
   24162           0 :                                 ret = Py_None;
   24163           0 :                                 Py_INCREF(ret);
   24164             :                         } else {
   24165           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1536_Type, in->info1536, in->info1536);
   24166             :                         }
   24167           0 :                         return ret;
   24168             : 
   24169           0 :                 case 1537:
   24170           0 :                         if (in->info1537 == NULL) {
   24171           0 :                                 ret = Py_None;
   24172           0 :                                 Py_INCREF(ret);
   24173             :                         } else {
   24174           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1537_Type, in->info1537, in->info1537);
   24175             :                         }
   24176           0 :                         return ret;
   24177             : 
   24178           0 :                 case 1538:
   24179           0 :                         if (in->info1538 == NULL) {
   24180           0 :                                 ret = Py_None;
   24181           0 :                                 Py_INCREF(ret);
   24182             :                         } else {
   24183           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1538_Type, in->info1538, in->info1538);
   24184             :                         }
   24185           0 :                         return ret;
   24186             : 
   24187           0 :                 case 1539:
   24188           0 :                         if (in->info1539 == NULL) {
   24189           0 :                                 ret = Py_None;
   24190           0 :                                 Py_INCREF(ret);
   24191             :                         } else {
   24192           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1539_Type, in->info1539, in->info1539);
   24193             :                         }
   24194           0 :                         return ret;
   24195             : 
   24196           0 :                 case 1540:
   24197           0 :                         if (in->info1540 == NULL) {
   24198           0 :                                 ret = Py_None;
   24199           0 :                                 Py_INCREF(ret);
   24200             :                         } else {
   24201           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1540_Type, in->info1540, in->info1540);
   24202             :                         }
   24203           0 :                         return ret;
   24204             : 
   24205           0 :                 case 1541:
   24206           0 :                         if (in->info1541 == NULL) {
   24207           0 :                                 ret = Py_None;
   24208           0 :                                 Py_INCREF(ret);
   24209             :                         } else {
   24210           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1541_Type, in->info1541, in->info1541);
   24211             :                         }
   24212           0 :                         return ret;
   24213             : 
   24214           0 :                 case 1542:
   24215           0 :                         if (in->info1542 == NULL) {
   24216           0 :                                 ret = Py_None;
   24217           0 :                                 Py_INCREF(ret);
   24218             :                         } else {
   24219           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1542_Type, in->info1542, in->info1542);
   24220             :                         }
   24221           0 :                         return ret;
   24222             : 
   24223           0 :                 case 1543:
   24224           0 :                         if (in->info1543 == NULL) {
   24225           0 :                                 ret = Py_None;
   24226           0 :                                 Py_INCREF(ret);
   24227             :                         } else {
   24228           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1543_Type, in->info1543, in->info1543);
   24229             :                         }
   24230           0 :                         return ret;
   24231             : 
   24232           0 :                 case 1544:
   24233           0 :                         if (in->info1544 == NULL) {
   24234           0 :                                 ret = Py_None;
   24235           0 :                                 Py_INCREF(ret);
   24236             :                         } else {
   24237           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1544_Type, in->info1544, in->info1544);
   24238             :                         }
   24239           0 :                         return ret;
   24240             : 
   24241           0 :                 case 1545:
   24242           0 :                         if (in->info1545 == NULL) {
   24243           0 :                                 ret = Py_None;
   24244           0 :                                 Py_INCREF(ret);
   24245             :                         } else {
   24246           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1545_Type, in->info1545, in->info1545);
   24247             :                         }
   24248           0 :                         return ret;
   24249             : 
   24250           0 :                 case 1546:
   24251           0 :                         if (in->info1546 == NULL) {
   24252           0 :                                 ret = Py_None;
   24253           0 :                                 Py_INCREF(ret);
   24254             :                         } else {
   24255           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1546_Type, in->info1546, in->info1546);
   24256             :                         }
   24257           0 :                         return ret;
   24258             : 
   24259           0 :                 case 1547:
   24260           0 :                         if (in->info1547 == NULL) {
   24261           0 :                                 ret = Py_None;
   24262           0 :                                 Py_INCREF(ret);
   24263             :                         } else {
   24264           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1547_Type, in->info1547, in->info1547);
   24265             :                         }
   24266           0 :                         return ret;
   24267             : 
   24268           0 :                 case 1548:
   24269           0 :                         if (in->info1548 == NULL) {
   24270           0 :                                 ret = Py_None;
   24271           0 :                                 Py_INCREF(ret);
   24272             :                         } else {
   24273           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1548_Type, in->info1548, in->info1548);
   24274             :                         }
   24275           0 :                         return ret;
   24276             : 
   24277           0 :                 case 1549:
   24278           0 :                         if (in->info1549 == NULL) {
   24279           0 :                                 ret = Py_None;
   24280           0 :                                 Py_INCREF(ret);
   24281             :                         } else {
   24282           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1549_Type, in->info1549, in->info1549);
   24283             :                         }
   24284           0 :                         return ret;
   24285             : 
   24286           0 :                 case 1550:
   24287           0 :                         if (in->info1550 == NULL) {
   24288           0 :                                 ret = Py_None;
   24289           0 :                                 Py_INCREF(ret);
   24290             :                         } else {
   24291           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1550_Type, in->info1550, in->info1550);
   24292             :                         }
   24293           0 :                         return ret;
   24294             : 
   24295           0 :                 case 1552:
   24296           0 :                         if (in->info1552 == NULL) {
   24297           0 :                                 ret = Py_None;
   24298           0 :                                 Py_INCREF(ret);
   24299             :                         } else {
   24300           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1552_Type, in->info1552, in->info1552);
   24301             :                         }
   24302           0 :                         return ret;
   24303             : 
   24304           0 :                 case 1553:
   24305           0 :                         if (in->info1553 == NULL) {
   24306           0 :                                 ret = Py_None;
   24307           0 :                                 Py_INCREF(ret);
   24308             :                         } else {
   24309           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1553_Type, in->info1553, in->info1553);
   24310             :                         }
   24311           0 :                         return ret;
   24312             : 
   24313           0 :                 case 1554:
   24314           0 :                         if (in->info1554 == NULL) {
   24315           0 :                                 ret = Py_None;
   24316           0 :                                 Py_INCREF(ret);
   24317             :                         } else {
   24318           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1554_Type, in->info1554, in->info1554);
   24319             :                         }
   24320           0 :                         return ret;
   24321             : 
   24322           0 :                 case 1555:
   24323           0 :                         if (in->info1555 == NULL) {
   24324           0 :                                 ret = Py_None;
   24325           0 :                                 Py_INCREF(ret);
   24326             :                         } else {
   24327           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1555_Type, in->info1555, in->info1555);
   24328             :                         }
   24329           0 :                         return ret;
   24330             : 
   24331           0 :                 case 1556:
   24332           0 :                         if (in->info1556 == NULL) {
   24333           0 :                                 ret = Py_None;
   24334           0 :                                 Py_INCREF(ret);
   24335             :                         } else {
   24336           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetSrvInfo1556_Type, in->info1556, in->info1556);
   24337             :                         }
   24338           0 :                         return ret;
   24339             : 
   24340           0 :                 default:
   24341           0 :                         ret = Py_None;
   24342           0 :                         Py_INCREF(ret);
   24343           0 :                         return ret;
   24344             : 
   24345             :         }
   24346             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   24347             :         return NULL;
   24348             : }
   24349             : 
   24350           0 : static union srvsvc_NetSrvInfo *py_export_srvsvc_NetSrvInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   24351             : {
   24352           0 :         union srvsvc_NetSrvInfo *ret = talloc_zero(mem_ctx, union srvsvc_NetSrvInfo);
   24353           0 :         switch (level) {
   24354           0 :                 case 100:
   24355           0 :                         if (in == NULL) {
   24356           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info100");
   24357           0 :                                 talloc_free(ret); return NULL;
   24358             :                         }
   24359           0 :                         if (in == Py_None) {
   24360           0 :                                 ret->info100 = NULL;
   24361             :                         } else {
   24362           0 :                                 ret->info100 = NULL;
   24363           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo100_Type, in, talloc_free(ret); return NULL;);
   24364           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24365           0 :                                         PyErr_NoMemory();
   24366           0 :                                         talloc_free(ret); return NULL;
   24367             :                                 }
   24368           0 :                                 ret->info100 = (struct srvsvc_NetSrvInfo100 *)pytalloc_get_ptr(in);
   24369             :                         }
   24370           0 :                         break;
   24371             : 
   24372           0 :                 case 101:
   24373           0 :                         if (in == NULL) {
   24374           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info101");
   24375           0 :                                 talloc_free(ret); return NULL;
   24376             :                         }
   24377           0 :                         if (in == Py_None) {
   24378           0 :                                 ret->info101 = NULL;
   24379             :                         } else {
   24380           0 :                                 ret->info101 = NULL;
   24381           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo101_Type, in, talloc_free(ret); return NULL;);
   24382           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24383           0 :                                         PyErr_NoMemory();
   24384           0 :                                         talloc_free(ret); return NULL;
   24385             :                                 }
   24386           0 :                                 ret->info101 = (struct srvsvc_NetSrvInfo101 *)pytalloc_get_ptr(in);
   24387             :                         }
   24388           0 :                         break;
   24389             : 
   24390           0 :                 case 102:
   24391           0 :                         if (in == NULL) {
   24392           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info102");
   24393           0 :                                 talloc_free(ret); return NULL;
   24394             :                         }
   24395           0 :                         if (in == Py_None) {
   24396           0 :                                 ret->info102 = NULL;
   24397             :                         } else {
   24398           0 :                                 ret->info102 = NULL;
   24399           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo102_Type, in, talloc_free(ret); return NULL;);
   24400           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24401           0 :                                         PyErr_NoMemory();
   24402           0 :                                         talloc_free(ret); return NULL;
   24403             :                                 }
   24404           0 :                                 ret->info102 = (struct srvsvc_NetSrvInfo102 *)pytalloc_get_ptr(in);
   24405             :                         }
   24406           0 :                         break;
   24407             : 
   24408           0 :                 case 402:
   24409           0 :                         if (in == NULL) {
   24410           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info402");
   24411           0 :                                 talloc_free(ret); return NULL;
   24412             :                         }
   24413           0 :                         if (in == Py_None) {
   24414           0 :                                 ret->info402 = NULL;
   24415             :                         } else {
   24416           0 :                                 ret->info402 = NULL;
   24417           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo402_Type, in, talloc_free(ret); return NULL;);
   24418           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24419           0 :                                         PyErr_NoMemory();
   24420           0 :                                         talloc_free(ret); return NULL;
   24421             :                                 }
   24422           0 :                                 ret->info402 = (struct srvsvc_NetSrvInfo402 *)pytalloc_get_ptr(in);
   24423             :                         }
   24424           0 :                         break;
   24425             : 
   24426           0 :                 case 403:
   24427           0 :                         if (in == NULL) {
   24428           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info403");
   24429           0 :                                 talloc_free(ret); return NULL;
   24430             :                         }
   24431           0 :                         if (in == Py_None) {
   24432           0 :                                 ret->info403 = NULL;
   24433             :                         } else {
   24434           0 :                                 ret->info403 = NULL;
   24435           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo403_Type, in, talloc_free(ret); return NULL;);
   24436           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24437           0 :                                         PyErr_NoMemory();
   24438           0 :                                         talloc_free(ret); return NULL;
   24439             :                                 }
   24440           0 :                                 ret->info403 = (struct srvsvc_NetSrvInfo403 *)pytalloc_get_ptr(in);
   24441             :                         }
   24442           0 :                         break;
   24443             : 
   24444           0 :                 case 502:
   24445           0 :                         if (in == NULL) {
   24446           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info502");
   24447           0 :                                 talloc_free(ret); return NULL;
   24448             :                         }
   24449           0 :                         if (in == Py_None) {
   24450           0 :                                 ret->info502 = NULL;
   24451             :                         } else {
   24452           0 :                                 ret->info502 = NULL;
   24453           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo502_Type, in, talloc_free(ret); return NULL;);
   24454           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24455           0 :                                         PyErr_NoMemory();
   24456           0 :                                         talloc_free(ret); return NULL;
   24457             :                                 }
   24458           0 :                                 ret->info502 = (struct srvsvc_NetSrvInfo502 *)pytalloc_get_ptr(in);
   24459             :                         }
   24460           0 :                         break;
   24461             : 
   24462           0 :                 case 503:
   24463           0 :                         if (in == NULL) {
   24464           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info503");
   24465           0 :                                 talloc_free(ret); return NULL;
   24466             :                         }
   24467           0 :                         if (in == Py_None) {
   24468           0 :                                 ret->info503 = NULL;
   24469             :                         } else {
   24470           0 :                                 ret->info503 = NULL;
   24471           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo503_Type, in, talloc_free(ret); return NULL;);
   24472           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24473           0 :                                         PyErr_NoMemory();
   24474           0 :                                         talloc_free(ret); return NULL;
   24475             :                                 }
   24476           0 :                                 ret->info503 = (struct srvsvc_NetSrvInfo503 *)pytalloc_get_ptr(in);
   24477             :                         }
   24478           0 :                         break;
   24479             : 
   24480           0 :                 case 599:
   24481           0 :                         if (in == NULL) {
   24482           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info599");
   24483           0 :                                 talloc_free(ret); return NULL;
   24484             :                         }
   24485           0 :                         if (in == Py_None) {
   24486           0 :                                 ret->info599 = NULL;
   24487             :                         } else {
   24488           0 :                                 ret->info599 = NULL;
   24489           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo599_Type, in, talloc_free(ret); return NULL;);
   24490           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24491           0 :                                         PyErr_NoMemory();
   24492           0 :                                         talloc_free(ret); return NULL;
   24493             :                                 }
   24494           0 :                                 ret->info599 = (struct srvsvc_NetSrvInfo599 *)pytalloc_get_ptr(in);
   24495             :                         }
   24496           0 :                         break;
   24497             : 
   24498           0 :                 case 1005:
   24499           0 :                         if (in == NULL) {
   24500           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1005");
   24501           0 :                                 talloc_free(ret); return NULL;
   24502             :                         }
   24503           0 :                         if (in == Py_None) {
   24504           0 :                                 ret->info1005 = NULL;
   24505             :                         } else {
   24506           0 :                                 ret->info1005 = NULL;
   24507           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1005_Type, in, talloc_free(ret); return NULL;);
   24508           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24509           0 :                                         PyErr_NoMemory();
   24510           0 :                                         talloc_free(ret); return NULL;
   24511             :                                 }
   24512           0 :                                 ret->info1005 = (struct srvsvc_NetSrvInfo1005 *)pytalloc_get_ptr(in);
   24513             :                         }
   24514           0 :                         break;
   24515             : 
   24516           0 :                 case 1010:
   24517           0 :                         if (in == NULL) {
   24518           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1010");
   24519           0 :                                 talloc_free(ret); return NULL;
   24520             :                         }
   24521           0 :                         if (in == Py_None) {
   24522           0 :                                 ret->info1010 = NULL;
   24523             :                         } else {
   24524           0 :                                 ret->info1010 = NULL;
   24525           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1010_Type, in, talloc_free(ret); return NULL;);
   24526           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24527           0 :                                         PyErr_NoMemory();
   24528           0 :                                         talloc_free(ret); return NULL;
   24529             :                                 }
   24530           0 :                                 ret->info1010 = (struct srvsvc_NetSrvInfo1010 *)pytalloc_get_ptr(in);
   24531             :                         }
   24532           0 :                         break;
   24533             : 
   24534           0 :                 case 1016:
   24535           0 :                         if (in == NULL) {
   24536           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1016");
   24537           0 :                                 talloc_free(ret); return NULL;
   24538             :                         }
   24539           0 :                         if (in == Py_None) {
   24540           0 :                                 ret->info1016 = NULL;
   24541             :                         } else {
   24542           0 :                                 ret->info1016 = NULL;
   24543           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1016_Type, in, talloc_free(ret); return NULL;);
   24544           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24545           0 :                                         PyErr_NoMemory();
   24546           0 :                                         talloc_free(ret); return NULL;
   24547             :                                 }
   24548           0 :                                 ret->info1016 = (struct srvsvc_NetSrvInfo1016 *)pytalloc_get_ptr(in);
   24549             :                         }
   24550           0 :                         break;
   24551             : 
   24552           0 :                 case 1017:
   24553           0 :                         if (in == NULL) {
   24554           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1017");
   24555           0 :                                 talloc_free(ret); return NULL;
   24556             :                         }
   24557           0 :                         if (in == Py_None) {
   24558           0 :                                 ret->info1017 = NULL;
   24559             :                         } else {
   24560           0 :                                 ret->info1017 = NULL;
   24561           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1017_Type, in, talloc_free(ret); return NULL;);
   24562           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24563           0 :                                         PyErr_NoMemory();
   24564           0 :                                         talloc_free(ret); return NULL;
   24565             :                                 }
   24566           0 :                                 ret->info1017 = (struct srvsvc_NetSrvInfo1017 *)pytalloc_get_ptr(in);
   24567             :                         }
   24568           0 :                         break;
   24569             : 
   24570           0 :                 case 1018:
   24571           0 :                         if (in == NULL) {
   24572           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1018");
   24573           0 :                                 talloc_free(ret); return NULL;
   24574             :                         }
   24575           0 :                         if (in == Py_None) {
   24576           0 :                                 ret->info1018 = NULL;
   24577             :                         } else {
   24578           0 :                                 ret->info1018 = NULL;
   24579           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1018_Type, in, talloc_free(ret); return NULL;);
   24580           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24581           0 :                                         PyErr_NoMemory();
   24582           0 :                                         talloc_free(ret); return NULL;
   24583             :                                 }
   24584           0 :                                 ret->info1018 = (struct srvsvc_NetSrvInfo1018 *)pytalloc_get_ptr(in);
   24585             :                         }
   24586           0 :                         break;
   24587             : 
   24588           0 :                 case 1107:
   24589           0 :                         if (in == NULL) {
   24590           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1107");
   24591           0 :                                 talloc_free(ret); return NULL;
   24592             :                         }
   24593           0 :                         if (in == Py_None) {
   24594           0 :                                 ret->info1107 = NULL;
   24595             :                         } else {
   24596           0 :                                 ret->info1107 = NULL;
   24597           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1107_Type, in, talloc_free(ret); return NULL;);
   24598           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24599           0 :                                         PyErr_NoMemory();
   24600           0 :                                         talloc_free(ret); return NULL;
   24601             :                                 }
   24602           0 :                                 ret->info1107 = (struct srvsvc_NetSrvInfo1107 *)pytalloc_get_ptr(in);
   24603             :                         }
   24604           0 :                         break;
   24605             : 
   24606           0 :                 case 1501:
   24607           0 :                         if (in == NULL) {
   24608           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1501");
   24609           0 :                                 talloc_free(ret); return NULL;
   24610             :                         }
   24611           0 :                         if (in == Py_None) {
   24612           0 :                                 ret->info1501 = NULL;
   24613             :                         } else {
   24614           0 :                                 ret->info1501 = NULL;
   24615           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1501_Type, in, talloc_free(ret); return NULL;);
   24616           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24617           0 :                                         PyErr_NoMemory();
   24618           0 :                                         talloc_free(ret); return NULL;
   24619             :                                 }
   24620           0 :                                 ret->info1501 = (struct srvsvc_NetSrvInfo1501 *)pytalloc_get_ptr(in);
   24621             :                         }
   24622           0 :                         break;
   24623             : 
   24624           0 :                 case 1502:
   24625           0 :                         if (in == NULL) {
   24626           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1502");
   24627           0 :                                 talloc_free(ret); return NULL;
   24628             :                         }
   24629           0 :                         if (in == Py_None) {
   24630           0 :                                 ret->info1502 = NULL;
   24631             :                         } else {
   24632           0 :                                 ret->info1502 = NULL;
   24633           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1502_Type, in, talloc_free(ret); return NULL;);
   24634           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24635           0 :                                         PyErr_NoMemory();
   24636           0 :                                         talloc_free(ret); return NULL;
   24637             :                                 }
   24638           0 :                                 ret->info1502 = (struct srvsvc_NetSrvInfo1502 *)pytalloc_get_ptr(in);
   24639             :                         }
   24640           0 :                         break;
   24641             : 
   24642           0 :                 case 1503:
   24643           0 :                         if (in == NULL) {
   24644           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1503");
   24645           0 :                                 talloc_free(ret); return NULL;
   24646             :                         }
   24647           0 :                         if (in == Py_None) {
   24648           0 :                                 ret->info1503 = NULL;
   24649             :                         } else {
   24650           0 :                                 ret->info1503 = NULL;
   24651           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1503_Type, in, talloc_free(ret); return NULL;);
   24652           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24653           0 :                                         PyErr_NoMemory();
   24654           0 :                                         talloc_free(ret); return NULL;
   24655             :                                 }
   24656           0 :                                 ret->info1503 = (struct srvsvc_NetSrvInfo1503 *)pytalloc_get_ptr(in);
   24657             :                         }
   24658           0 :                         break;
   24659             : 
   24660           0 :                 case 1506:
   24661           0 :                         if (in == NULL) {
   24662           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1506");
   24663           0 :                                 talloc_free(ret); return NULL;
   24664             :                         }
   24665           0 :                         if (in == Py_None) {
   24666           0 :                                 ret->info1506 = NULL;
   24667             :                         } else {
   24668           0 :                                 ret->info1506 = NULL;
   24669           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1506_Type, in, talloc_free(ret); return NULL;);
   24670           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24671           0 :                                         PyErr_NoMemory();
   24672           0 :                                         talloc_free(ret); return NULL;
   24673             :                                 }
   24674           0 :                                 ret->info1506 = (struct srvsvc_NetSrvInfo1506 *)pytalloc_get_ptr(in);
   24675             :                         }
   24676           0 :                         break;
   24677             : 
   24678           0 :                 case 1509:
   24679           0 :                         if (in == NULL) {
   24680           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1509");
   24681           0 :                                 talloc_free(ret); return NULL;
   24682             :                         }
   24683           0 :                         if (in == Py_None) {
   24684           0 :                                 ret->info1509 = NULL;
   24685             :                         } else {
   24686           0 :                                 ret->info1509 = NULL;
   24687           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1509_Type, in, talloc_free(ret); return NULL;);
   24688           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24689           0 :                                         PyErr_NoMemory();
   24690           0 :                                         talloc_free(ret); return NULL;
   24691             :                                 }
   24692           0 :                                 ret->info1509 = (struct srvsvc_NetSrvInfo1509 *)pytalloc_get_ptr(in);
   24693             :                         }
   24694           0 :                         break;
   24695             : 
   24696           0 :                 case 1510:
   24697           0 :                         if (in == NULL) {
   24698           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1510");
   24699           0 :                                 talloc_free(ret); return NULL;
   24700             :                         }
   24701           0 :                         if (in == Py_None) {
   24702           0 :                                 ret->info1510 = NULL;
   24703             :                         } else {
   24704           0 :                                 ret->info1510 = NULL;
   24705           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1510_Type, in, talloc_free(ret); return NULL;);
   24706           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24707           0 :                                         PyErr_NoMemory();
   24708           0 :                                         talloc_free(ret); return NULL;
   24709             :                                 }
   24710           0 :                                 ret->info1510 = (struct srvsvc_NetSrvInfo1510 *)pytalloc_get_ptr(in);
   24711             :                         }
   24712           0 :                         break;
   24713             : 
   24714           0 :                 case 1511:
   24715           0 :                         if (in == NULL) {
   24716           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1511");
   24717           0 :                                 talloc_free(ret); return NULL;
   24718             :                         }
   24719           0 :                         if (in == Py_None) {
   24720           0 :                                 ret->info1511 = NULL;
   24721             :                         } else {
   24722           0 :                                 ret->info1511 = NULL;
   24723           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1511_Type, in, talloc_free(ret); return NULL;);
   24724           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24725           0 :                                         PyErr_NoMemory();
   24726           0 :                                         talloc_free(ret); return NULL;
   24727             :                                 }
   24728           0 :                                 ret->info1511 = (struct srvsvc_NetSrvInfo1511 *)pytalloc_get_ptr(in);
   24729             :                         }
   24730           0 :                         break;
   24731             : 
   24732           0 :                 case 1512:
   24733           0 :                         if (in == NULL) {
   24734           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1512");
   24735           0 :                                 talloc_free(ret); return NULL;
   24736             :                         }
   24737           0 :                         if (in == Py_None) {
   24738           0 :                                 ret->info1512 = NULL;
   24739             :                         } else {
   24740           0 :                                 ret->info1512 = NULL;
   24741           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1512_Type, in, talloc_free(ret); return NULL;);
   24742           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24743           0 :                                         PyErr_NoMemory();
   24744           0 :                                         talloc_free(ret); return NULL;
   24745             :                                 }
   24746           0 :                                 ret->info1512 = (struct srvsvc_NetSrvInfo1512 *)pytalloc_get_ptr(in);
   24747             :                         }
   24748           0 :                         break;
   24749             : 
   24750           0 :                 case 1513:
   24751           0 :                         if (in == NULL) {
   24752           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1513");
   24753           0 :                                 talloc_free(ret); return NULL;
   24754             :                         }
   24755           0 :                         if (in == Py_None) {
   24756           0 :                                 ret->info1513 = NULL;
   24757             :                         } else {
   24758           0 :                                 ret->info1513 = NULL;
   24759           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1513_Type, in, talloc_free(ret); return NULL;);
   24760           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24761           0 :                                         PyErr_NoMemory();
   24762           0 :                                         talloc_free(ret); return NULL;
   24763             :                                 }
   24764           0 :                                 ret->info1513 = (struct srvsvc_NetSrvInfo1513 *)pytalloc_get_ptr(in);
   24765             :                         }
   24766           0 :                         break;
   24767             : 
   24768           0 :                 case 1514:
   24769           0 :                         if (in == NULL) {
   24770           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1514");
   24771           0 :                                 talloc_free(ret); return NULL;
   24772             :                         }
   24773           0 :                         if (in == Py_None) {
   24774           0 :                                 ret->info1514 = NULL;
   24775             :                         } else {
   24776           0 :                                 ret->info1514 = NULL;
   24777           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1514_Type, in, talloc_free(ret); return NULL;);
   24778           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24779           0 :                                         PyErr_NoMemory();
   24780           0 :                                         talloc_free(ret); return NULL;
   24781             :                                 }
   24782           0 :                                 ret->info1514 = (struct srvsvc_NetSrvInfo1514 *)pytalloc_get_ptr(in);
   24783             :                         }
   24784           0 :                         break;
   24785             : 
   24786           0 :                 case 1515:
   24787           0 :                         if (in == NULL) {
   24788           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1515");
   24789           0 :                                 talloc_free(ret); return NULL;
   24790             :                         }
   24791           0 :                         if (in == Py_None) {
   24792           0 :                                 ret->info1515 = NULL;
   24793             :                         } else {
   24794           0 :                                 ret->info1515 = NULL;
   24795           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1515_Type, in, talloc_free(ret); return NULL;);
   24796           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24797           0 :                                         PyErr_NoMemory();
   24798           0 :                                         talloc_free(ret); return NULL;
   24799             :                                 }
   24800           0 :                                 ret->info1515 = (struct srvsvc_NetSrvInfo1515 *)pytalloc_get_ptr(in);
   24801             :                         }
   24802           0 :                         break;
   24803             : 
   24804           0 :                 case 1516:
   24805           0 :                         if (in == NULL) {
   24806           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1516");
   24807           0 :                                 talloc_free(ret); return NULL;
   24808             :                         }
   24809           0 :                         if (in == Py_None) {
   24810           0 :                                 ret->info1516 = NULL;
   24811             :                         } else {
   24812           0 :                                 ret->info1516 = NULL;
   24813           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1516_Type, in, talloc_free(ret); return NULL;);
   24814           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24815           0 :                                         PyErr_NoMemory();
   24816           0 :                                         talloc_free(ret); return NULL;
   24817             :                                 }
   24818           0 :                                 ret->info1516 = (struct srvsvc_NetSrvInfo1516 *)pytalloc_get_ptr(in);
   24819             :                         }
   24820           0 :                         break;
   24821             : 
   24822           0 :                 case 1518:
   24823           0 :                         if (in == NULL) {
   24824           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1518");
   24825           0 :                                 talloc_free(ret); return NULL;
   24826             :                         }
   24827           0 :                         if (in == Py_None) {
   24828           0 :                                 ret->info1518 = NULL;
   24829             :                         } else {
   24830           0 :                                 ret->info1518 = NULL;
   24831           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1518_Type, in, talloc_free(ret); return NULL;);
   24832           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24833           0 :                                         PyErr_NoMemory();
   24834           0 :                                         talloc_free(ret); return NULL;
   24835             :                                 }
   24836           0 :                                 ret->info1518 = (struct srvsvc_NetSrvInfo1518 *)pytalloc_get_ptr(in);
   24837             :                         }
   24838           0 :                         break;
   24839             : 
   24840           0 :                 case 1520:
   24841           0 :                         if (in == NULL) {
   24842           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1520");
   24843           0 :                                 talloc_free(ret); return NULL;
   24844             :                         }
   24845           0 :                         if (in == Py_None) {
   24846           0 :                                 ret->info1520 = NULL;
   24847             :                         } else {
   24848           0 :                                 ret->info1520 = NULL;
   24849           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1520_Type, in, talloc_free(ret); return NULL;);
   24850           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24851           0 :                                         PyErr_NoMemory();
   24852           0 :                                         talloc_free(ret); return NULL;
   24853             :                                 }
   24854           0 :                                 ret->info1520 = (struct srvsvc_NetSrvInfo1520 *)pytalloc_get_ptr(in);
   24855             :                         }
   24856           0 :                         break;
   24857             : 
   24858           0 :                 case 1521:
   24859           0 :                         if (in == NULL) {
   24860           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1521");
   24861           0 :                                 talloc_free(ret); return NULL;
   24862             :                         }
   24863           0 :                         if (in == Py_None) {
   24864           0 :                                 ret->info1521 = NULL;
   24865             :                         } else {
   24866           0 :                                 ret->info1521 = NULL;
   24867           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1521_Type, in, talloc_free(ret); return NULL;);
   24868           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24869           0 :                                         PyErr_NoMemory();
   24870           0 :                                         talloc_free(ret); return NULL;
   24871             :                                 }
   24872           0 :                                 ret->info1521 = (struct srvsvc_NetSrvInfo1521 *)pytalloc_get_ptr(in);
   24873             :                         }
   24874           0 :                         break;
   24875             : 
   24876           0 :                 case 1522:
   24877           0 :                         if (in == NULL) {
   24878           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1522");
   24879           0 :                                 talloc_free(ret); return NULL;
   24880             :                         }
   24881           0 :                         if (in == Py_None) {
   24882           0 :                                 ret->info1522 = NULL;
   24883             :                         } else {
   24884           0 :                                 ret->info1522 = NULL;
   24885           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1522_Type, in, talloc_free(ret); return NULL;);
   24886           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24887           0 :                                         PyErr_NoMemory();
   24888           0 :                                         talloc_free(ret); return NULL;
   24889             :                                 }
   24890           0 :                                 ret->info1522 = (struct srvsvc_NetSrvInfo1522 *)pytalloc_get_ptr(in);
   24891             :                         }
   24892           0 :                         break;
   24893             : 
   24894           0 :                 case 1523:
   24895           0 :                         if (in == NULL) {
   24896           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1523");
   24897           0 :                                 talloc_free(ret); return NULL;
   24898             :                         }
   24899           0 :                         if (in == Py_None) {
   24900           0 :                                 ret->info1523 = NULL;
   24901             :                         } else {
   24902           0 :                                 ret->info1523 = NULL;
   24903           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1523_Type, in, talloc_free(ret); return NULL;);
   24904           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24905           0 :                                         PyErr_NoMemory();
   24906           0 :                                         talloc_free(ret); return NULL;
   24907             :                                 }
   24908           0 :                                 ret->info1523 = (struct srvsvc_NetSrvInfo1523 *)pytalloc_get_ptr(in);
   24909             :                         }
   24910           0 :                         break;
   24911             : 
   24912           0 :                 case 1524:
   24913           0 :                         if (in == NULL) {
   24914           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1524");
   24915           0 :                                 talloc_free(ret); return NULL;
   24916             :                         }
   24917           0 :                         if (in == Py_None) {
   24918           0 :                                 ret->info1524 = NULL;
   24919             :                         } else {
   24920           0 :                                 ret->info1524 = NULL;
   24921           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1524_Type, in, talloc_free(ret); return NULL;);
   24922           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24923           0 :                                         PyErr_NoMemory();
   24924           0 :                                         talloc_free(ret); return NULL;
   24925             :                                 }
   24926           0 :                                 ret->info1524 = (struct srvsvc_NetSrvInfo1524 *)pytalloc_get_ptr(in);
   24927             :                         }
   24928           0 :                         break;
   24929             : 
   24930           0 :                 case 1525:
   24931           0 :                         if (in == NULL) {
   24932           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1525");
   24933           0 :                                 talloc_free(ret); return NULL;
   24934             :                         }
   24935           0 :                         if (in == Py_None) {
   24936           0 :                                 ret->info1525 = NULL;
   24937             :                         } else {
   24938           0 :                                 ret->info1525 = NULL;
   24939           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1525_Type, in, talloc_free(ret); return NULL;);
   24940           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24941           0 :                                         PyErr_NoMemory();
   24942           0 :                                         talloc_free(ret); return NULL;
   24943             :                                 }
   24944           0 :                                 ret->info1525 = (struct srvsvc_NetSrvInfo1525 *)pytalloc_get_ptr(in);
   24945             :                         }
   24946           0 :                         break;
   24947             : 
   24948           0 :                 case 1528:
   24949           0 :                         if (in == NULL) {
   24950           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1528");
   24951           0 :                                 talloc_free(ret); return NULL;
   24952             :                         }
   24953           0 :                         if (in == Py_None) {
   24954           0 :                                 ret->info1528 = NULL;
   24955             :                         } else {
   24956           0 :                                 ret->info1528 = NULL;
   24957           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1528_Type, in, talloc_free(ret); return NULL;);
   24958           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24959           0 :                                         PyErr_NoMemory();
   24960           0 :                                         talloc_free(ret); return NULL;
   24961             :                                 }
   24962           0 :                                 ret->info1528 = (struct srvsvc_NetSrvInfo1528 *)pytalloc_get_ptr(in);
   24963             :                         }
   24964           0 :                         break;
   24965             : 
   24966           0 :                 case 1529:
   24967           0 :                         if (in == NULL) {
   24968           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1529");
   24969           0 :                                 talloc_free(ret); return NULL;
   24970             :                         }
   24971           0 :                         if (in == Py_None) {
   24972           0 :                                 ret->info1529 = NULL;
   24973             :                         } else {
   24974           0 :                                 ret->info1529 = NULL;
   24975           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1529_Type, in, talloc_free(ret); return NULL;);
   24976           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24977           0 :                                         PyErr_NoMemory();
   24978           0 :                                         talloc_free(ret); return NULL;
   24979             :                                 }
   24980           0 :                                 ret->info1529 = (struct srvsvc_NetSrvInfo1529 *)pytalloc_get_ptr(in);
   24981             :                         }
   24982           0 :                         break;
   24983             : 
   24984           0 :                 case 1530:
   24985           0 :                         if (in == NULL) {
   24986           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1530");
   24987           0 :                                 talloc_free(ret); return NULL;
   24988             :                         }
   24989           0 :                         if (in == Py_None) {
   24990           0 :                                 ret->info1530 = NULL;
   24991             :                         } else {
   24992           0 :                                 ret->info1530 = NULL;
   24993           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1530_Type, in, talloc_free(ret); return NULL;);
   24994           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24995           0 :                                         PyErr_NoMemory();
   24996           0 :                                         talloc_free(ret); return NULL;
   24997             :                                 }
   24998           0 :                                 ret->info1530 = (struct srvsvc_NetSrvInfo1530 *)pytalloc_get_ptr(in);
   24999             :                         }
   25000           0 :                         break;
   25001             : 
   25002           0 :                 case 1533:
   25003           0 :                         if (in == NULL) {
   25004           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1533");
   25005           0 :                                 talloc_free(ret); return NULL;
   25006             :                         }
   25007           0 :                         if (in == Py_None) {
   25008           0 :                                 ret->info1533 = NULL;
   25009             :                         } else {
   25010           0 :                                 ret->info1533 = NULL;
   25011           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1533_Type, in, talloc_free(ret); return NULL;);
   25012           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25013           0 :                                         PyErr_NoMemory();
   25014           0 :                                         talloc_free(ret); return NULL;
   25015             :                                 }
   25016           0 :                                 ret->info1533 = (struct srvsvc_NetSrvInfo1533 *)pytalloc_get_ptr(in);
   25017             :                         }
   25018           0 :                         break;
   25019             : 
   25020           0 :                 case 1534:
   25021           0 :                         if (in == NULL) {
   25022           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1534");
   25023           0 :                                 talloc_free(ret); return NULL;
   25024             :                         }
   25025           0 :                         if (in == Py_None) {
   25026           0 :                                 ret->info1534 = NULL;
   25027             :                         } else {
   25028           0 :                                 ret->info1534 = NULL;
   25029           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1534_Type, in, talloc_free(ret); return NULL;);
   25030           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25031           0 :                                         PyErr_NoMemory();
   25032           0 :                                         talloc_free(ret); return NULL;
   25033             :                                 }
   25034           0 :                                 ret->info1534 = (struct srvsvc_NetSrvInfo1534 *)pytalloc_get_ptr(in);
   25035             :                         }
   25036           0 :                         break;
   25037             : 
   25038           0 :                 case 1535:
   25039           0 :                         if (in == NULL) {
   25040           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1535");
   25041           0 :                                 talloc_free(ret); return NULL;
   25042             :                         }
   25043           0 :                         if (in == Py_None) {
   25044           0 :                                 ret->info1535 = NULL;
   25045             :                         } else {
   25046           0 :                                 ret->info1535 = NULL;
   25047           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1535_Type, in, talloc_free(ret); return NULL;);
   25048           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25049           0 :                                         PyErr_NoMemory();
   25050           0 :                                         talloc_free(ret); return NULL;
   25051             :                                 }
   25052           0 :                                 ret->info1535 = (struct srvsvc_NetSrvInfo1535 *)pytalloc_get_ptr(in);
   25053             :                         }
   25054           0 :                         break;
   25055             : 
   25056           0 :                 case 1536:
   25057           0 :                         if (in == NULL) {
   25058           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1536");
   25059           0 :                                 talloc_free(ret); return NULL;
   25060             :                         }
   25061           0 :                         if (in == Py_None) {
   25062           0 :                                 ret->info1536 = NULL;
   25063             :                         } else {
   25064           0 :                                 ret->info1536 = NULL;
   25065           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1536_Type, in, talloc_free(ret); return NULL;);
   25066           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25067           0 :                                         PyErr_NoMemory();
   25068           0 :                                         talloc_free(ret); return NULL;
   25069             :                                 }
   25070           0 :                                 ret->info1536 = (struct srvsvc_NetSrvInfo1536 *)pytalloc_get_ptr(in);
   25071             :                         }
   25072           0 :                         break;
   25073             : 
   25074           0 :                 case 1537:
   25075           0 :                         if (in == NULL) {
   25076           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1537");
   25077           0 :                                 talloc_free(ret); return NULL;
   25078             :                         }
   25079           0 :                         if (in == Py_None) {
   25080           0 :                                 ret->info1537 = NULL;
   25081             :                         } else {
   25082           0 :                                 ret->info1537 = NULL;
   25083           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1537_Type, in, talloc_free(ret); return NULL;);
   25084           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25085           0 :                                         PyErr_NoMemory();
   25086           0 :                                         talloc_free(ret); return NULL;
   25087             :                                 }
   25088           0 :                                 ret->info1537 = (struct srvsvc_NetSrvInfo1537 *)pytalloc_get_ptr(in);
   25089             :                         }
   25090           0 :                         break;
   25091             : 
   25092           0 :                 case 1538:
   25093           0 :                         if (in == NULL) {
   25094           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1538");
   25095           0 :                                 talloc_free(ret); return NULL;
   25096             :                         }
   25097           0 :                         if (in == Py_None) {
   25098           0 :                                 ret->info1538 = NULL;
   25099             :                         } else {
   25100           0 :                                 ret->info1538 = NULL;
   25101           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1538_Type, in, talloc_free(ret); return NULL;);
   25102           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25103           0 :                                         PyErr_NoMemory();
   25104           0 :                                         talloc_free(ret); return NULL;
   25105             :                                 }
   25106           0 :                                 ret->info1538 = (struct srvsvc_NetSrvInfo1538 *)pytalloc_get_ptr(in);
   25107             :                         }
   25108           0 :                         break;
   25109             : 
   25110           0 :                 case 1539:
   25111           0 :                         if (in == NULL) {
   25112           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1539");
   25113           0 :                                 talloc_free(ret); return NULL;
   25114             :                         }
   25115           0 :                         if (in == Py_None) {
   25116           0 :                                 ret->info1539 = NULL;
   25117             :                         } else {
   25118           0 :                                 ret->info1539 = NULL;
   25119           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1539_Type, in, talloc_free(ret); return NULL;);
   25120           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25121           0 :                                         PyErr_NoMemory();
   25122           0 :                                         talloc_free(ret); return NULL;
   25123             :                                 }
   25124           0 :                                 ret->info1539 = (struct srvsvc_NetSrvInfo1539 *)pytalloc_get_ptr(in);
   25125             :                         }
   25126           0 :                         break;
   25127             : 
   25128           0 :                 case 1540:
   25129           0 :                         if (in == NULL) {
   25130           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1540");
   25131           0 :                                 talloc_free(ret); return NULL;
   25132             :                         }
   25133           0 :                         if (in == Py_None) {
   25134           0 :                                 ret->info1540 = NULL;
   25135             :                         } else {
   25136           0 :                                 ret->info1540 = NULL;
   25137           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1540_Type, in, talloc_free(ret); return NULL;);
   25138           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25139           0 :                                         PyErr_NoMemory();
   25140           0 :                                         talloc_free(ret); return NULL;
   25141             :                                 }
   25142           0 :                                 ret->info1540 = (struct srvsvc_NetSrvInfo1540 *)pytalloc_get_ptr(in);
   25143             :                         }
   25144           0 :                         break;
   25145             : 
   25146           0 :                 case 1541:
   25147           0 :                         if (in == NULL) {
   25148           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1541");
   25149           0 :                                 talloc_free(ret); return NULL;
   25150             :                         }
   25151           0 :                         if (in == Py_None) {
   25152           0 :                                 ret->info1541 = NULL;
   25153             :                         } else {
   25154           0 :                                 ret->info1541 = NULL;
   25155           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1541_Type, in, talloc_free(ret); return NULL;);
   25156           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25157           0 :                                         PyErr_NoMemory();
   25158           0 :                                         talloc_free(ret); return NULL;
   25159             :                                 }
   25160           0 :                                 ret->info1541 = (struct srvsvc_NetSrvInfo1541 *)pytalloc_get_ptr(in);
   25161             :                         }
   25162           0 :                         break;
   25163             : 
   25164           0 :                 case 1542:
   25165           0 :                         if (in == NULL) {
   25166           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1542");
   25167           0 :                                 talloc_free(ret); return NULL;
   25168             :                         }
   25169           0 :                         if (in == Py_None) {
   25170           0 :                                 ret->info1542 = NULL;
   25171             :                         } else {
   25172           0 :                                 ret->info1542 = NULL;
   25173           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1542_Type, in, talloc_free(ret); return NULL;);
   25174           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25175           0 :                                         PyErr_NoMemory();
   25176           0 :                                         talloc_free(ret); return NULL;
   25177             :                                 }
   25178           0 :                                 ret->info1542 = (struct srvsvc_NetSrvInfo1542 *)pytalloc_get_ptr(in);
   25179             :                         }
   25180           0 :                         break;
   25181             : 
   25182           0 :                 case 1543:
   25183           0 :                         if (in == NULL) {
   25184           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1543");
   25185           0 :                                 talloc_free(ret); return NULL;
   25186             :                         }
   25187           0 :                         if (in == Py_None) {
   25188           0 :                                 ret->info1543 = NULL;
   25189             :                         } else {
   25190           0 :                                 ret->info1543 = NULL;
   25191           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1543_Type, in, talloc_free(ret); return NULL;);
   25192           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25193           0 :                                         PyErr_NoMemory();
   25194           0 :                                         talloc_free(ret); return NULL;
   25195             :                                 }
   25196           0 :                                 ret->info1543 = (struct srvsvc_NetSrvInfo1543 *)pytalloc_get_ptr(in);
   25197             :                         }
   25198           0 :                         break;
   25199             : 
   25200           0 :                 case 1544:
   25201           0 :                         if (in == NULL) {
   25202           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1544");
   25203           0 :                                 talloc_free(ret); return NULL;
   25204             :                         }
   25205           0 :                         if (in == Py_None) {
   25206           0 :                                 ret->info1544 = NULL;
   25207             :                         } else {
   25208           0 :                                 ret->info1544 = NULL;
   25209           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1544_Type, in, talloc_free(ret); return NULL;);
   25210           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25211           0 :                                         PyErr_NoMemory();
   25212           0 :                                         talloc_free(ret); return NULL;
   25213             :                                 }
   25214           0 :                                 ret->info1544 = (struct srvsvc_NetSrvInfo1544 *)pytalloc_get_ptr(in);
   25215             :                         }
   25216           0 :                         break;
   25217             : 
   25218           0 :                 case 1545:
   25219           0 :                         if (in == NULL) {
   25220           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1545");
   25221           0 :                                 talloc_free(ret); return NULL;
   25222             :                         }
   25223           0 :                         if (in == Py_None) {
   25224           0 :                                 ret->info1545 = NULL;
   25225             :                         } else {
   25226           0 :                                 ret->info1545 = NULL;
   25227           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1545_Type, in, talloc_free(ret); return NULL;);
   25228           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25229           0 :                                         PyErr_NoMemory();
   25230           0 :                                         talloc_free(ret); return NULL;
   25231             :                                 }
   25232           0 :                                 ret->info1545 = (struct srvsvc_NetSrvInfo1545 *)pytalloc_get_ptr(in);
   25233             :                         }
   25234           0 :                         break;
   25235             : 
   25236           0 :                 case 1546:
   25237           0 :                         if (in == NULL) {
   25238           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1546");
   25239           0 :                                 talloc_free(ret); return NULL;
   25240             :                         }
   25241           0 :                         if (in == Py_None) {
   25242           0 :                                 ret->info1546 = NULL;
   25243             :                         } else {
   25244           0 :                                 ret->info1546 = NULL;
   25245           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1546_Type, in, talloc_free(ret); return NULL;);
   25246           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25247           0 :                                         PyErr_NoMemory();
   25248           0 :                                         talloc_free(ret); return NULL;
   25249             :                                 }
   25250           0 :                                 ret->info1546 = (struct srvsvc_NetSrvInfo1546 *)pytalloc_get_ptr(in);
   25251             :                         }
   25252           0 :                         break;
   25253             : 
   25254           0 :                 case 1547:
   25255           0 :                         if (in == NULL) {
   25256           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1547");
   25257           0 :                                 talloc_free(ret); return NULL;
   25258             :                         }
   25259           0 :                         if (in == Py_None) {
   25260           0 :                                 ret->info1547 = NULL;
   25261             :                         } else {
   25262           0 :                                 ret->info1547 = NULL;
   25263           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1547_Type, in, talloc_free(ret); return NULL;);
   25264           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25265           0 :                                         PyErr_NoMemory();
   25266           0 :                                         talloc_free(ret); return NULL;
   25267             :                                 }
   25268           0 :                                 ret->info1547 = (struct srvsvc_NetSrvInfo1547 *)pytalloc_get_ptr(in);
   25269             :                         }
   25270           0 :                         break;
   25271             : 
   25272           0 :                 case 1548:
   25273           0 :                         if (in == NULL) {
   25274           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1548");
   25275           0 :                                 talloc_free(ret); return NULL;
   25276             :                         }
   25277           0 :                         if (in == Py_None) {
   25278           0 :                                 ret->info1548 = NULL;
   25279             :                         } else {
   25280           0 :                                 ret->info1548 = NULL;
   25281           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1548_Type, in, talloc_free(ret); return NULL;);
   25282           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25283           0 :                                         PyErr_NoMemory();
   25284           0 :                                         talloc_free(ret); return NULL;
   25285             :                                 }
   25286           0 :                                 ret->info1548 = (struct srvsvc_NetSrvInfo1548 *)pytalloc_get_ptr(in);
   25287             :                         }
   25288           0 :                         break;
   25289             : 
   25290           0 :                 case 1549:
   25291           0 :                         if (in == NULL) {
   25292           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1549");
   25293           0 :                                 talloc_free(ret); return NULL;
   25294             :                         }
   25295           0 :                         if (in == Py_None) {
   25296           0 :                                 ret->info1549 = NULL;
   25297             :                         } else {
   25298           0 :                                 ret->info1549 = NULL;
   25299           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1549_Type, in, talloc_free(ret); return NULL;);
   25300           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25301           0 :                                         PyErr_NoMemory();
   25302           0 :                                         talloc_free(ret); return NULL;
   25303             :                                 }
   25304           0 :                                 ret->info1549 = (struct srvsvc_NetSrvInfo1549 *)pytalloc_get_ptr(in);
   25305             :                         }
   25306           0 :                         break;
   25307             : 
   25308           0 :                 case 1550:
   25309           0 :                         if (in == NULL) {
   25310           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1550");
   25311           0 :                                 talloc_free(ret); return NULL;
   25312             :                         }
   25313           0 :                         if (in == Py_None) {
   25314           0 :                                 ret->info1550 = NULL;
   25315             :                         } else {
   25316           0 :                                 ret->info1550 = NULL;
   25317           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1550_Type, in, talloc_free(ret); return NULL;);
   25318           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25319           0 :                                         PyErr_NoMemory();
   25320           0 :                                         talloc_free(ret); return NULL;
   25321             :                                 }
   25322           0 :                                 ret->info1550 = (struct srvsvc_NetSrvInfo1550 *)pytalloc_get_ptr(in);
   25323             :                         }
   25324           0 :                         break;
   25325             : 
   25326           0 :                 case 1552:
   25327           0 :                         if (in == NULL) {
   25328           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1552");
   25329           0 :                                 talloc_free(ret); return NULL;
   25330             :                         }
   25331           0 :                         if (in == Py_None) {
   25332           0 :                                 ret->info1552 = NULL;
   25333             :                         } else {
   25334           0 :                                 ret->info1552 = NULL;
   25335           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1552_Type, in, talloc_free(ret); return NULL;);
   25336           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25337           0 :                                         PyErr_NoMemory();
   25338           0 :                                         talloc_free(ret); return NULL;
   25339             :                                 }
   25340           0 :                                 ret->info1552 = (struct srvsvc_NetSrvInfo1552 *)pytalloc_get_ptr(in);
   25341             :                         }
   25342           0 :                         break;
   25343             : 
   25344           0 :                 case 1553:
   25345           0 :                         if (in == NULL) {
   25346           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1553");
   25347           0 :                                 talloc_free(ret); return NULL;
   25348             :                         }
   25349           0 :                         if (in == Py_None) {
   25350           0 :                                 ret->info1553 = NULL;
   25351             :                         } else {
   25352           0 :                                 ret->info1553 = NULL;
   25353           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1553_Type, in, talloc_free(ret); return NULL;);
   25354           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25355           0 :                                         PyErr_NoMemory();
   25356           0 :                                         talloc_free(ret); return NULL;
   25357             :                                 }
   25358           0 :                                 ret->info1553 = (struct srvsvc_NetSrvInfo1553 *)pytalloc_get_ptr(in);
   25359             :                         }
   25360           0 :                         break;
   25361             : 
   25362           0 :                 case 1554:
   25363           0 :                         if (in == NULL) {
   25364           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1554");
   25365           0 :                                 talloc_free(ret); return NULL;
   25366             :                         }
   25367           0 :                         if (in == Py_None) {
   25368           0 :                                 ret->info1554 = NULL;
   25369             :                         } else {
   25370           0 :                                 ret->info1554 = NULL;
   25371           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1554_Type, in, talloc_free(ret); return NULL;);
   25372           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25373           0 :                                         PyErr_NoMemory();
   25374           0 :                                         talloc_free(ret); return NULL;
   25375             :                                 }
   25376           0 :                                 ret->info1554 = (struct srvsvc_NetSrvInfo1554 *)pytalloc_get_ptr(in);
   25377             :                         }
   25378           0 :                         break;
   25379             : 
   25380           0 :                 case 1555:
   25381           0 :                         if (in == NULL) {
   25382           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1555");
   25383           0 :                                 talloc_free(ret); return NULL;
   25384             :                         }
   25385           0 :                         if (in == Py_None) {
   25386           0 :                                 ret->info1555 = NULL;
   25387             :                         } else {
   25388           0 :                                 ret->info1555 = NULL;
   25389           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1555_Type, in, talloc_free(ret); return NULL;);
   25390           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25391           0 :                                         PyErr_NoMemory();
   25392           0 :                                         talloc_free(ret); return NULL;
   25393             :                                 }
   25394           0 :                                 ret->info1555 = (struct srvsvc_NetSrvInfo1555 *)pytalloc_get_ptr(in);
   25395             :                         }
   25396           0 :                         break;
   25397             : 
   25398           0 :                 case 1556:
   25399           0 :                         if (in == NULL) {
   25400           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1556");
   25401           0 :                                 talloc_free(ret); return NULL;
   25402             :                         }
   25403           0 :                         if (in == Py_None) {
   25404           0 :                                 ret->info1556 = NULL;
   25405             :                         } else {
   25406           0 :                                 ret->info1556 = NULL;
   25407           0 :                                 PY_CHECK_TYPE(&srvsvc_NetSrvInfo1556_Type, in, talloc_free(ret); return NULL;);
   25408           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25409           0 :                                         PyErr_NoMemory();
   25410           0 :                                         talloc_free(ret); return NULL;
   25411             :                                 }
   25412           0 :                                 ret->info1556 = (struct srvsvc_NetSrvInfo1556 *)pytalloc_get_ptr(in);
   25413             :                         }
   25414           0 :                         break;
   25415             : 
   25416           0 :                 default:
   25417           0 :                         break;
   25418             : 
   25419             :         }
   25420             : 
   25421           0 :         return ret;
   25422             : }
   25423             : 
   25424           1 : static PyObject *py_srvsvc_NetSrvInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25425             : {
   25426           1 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   25427           1 :         PyObject *mem_ctx_obj = NULL;
   25428           1 :         TALLOC_CTX *mem_ctx = NULL;
   25429           1 :         int level = 0;
   25430           1 :         PyObject *in_obj = NULL;
   25431           1 :         union srvsvc_NetSrvInfo *in = NULL;
   25432             : 
   25433           1 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   25434             :                 discard_const_p(char *, kwnames),
   25435             :                 &mem_ctx_obj,
   25436             :                 &level,
   25437             :                 &in_obj)) {
   25438           0 :                 return NULL;
   25439             :         }
   25440           1 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   25441           1 :         if (mem_ctx == NULL) {
   25442           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   25443           0 :                 return NULL;
   25444             :         }
   25445           1 :         in = (union srvsvc_NetSrvInfo *)pytalloc_get_ptr(in_obj);
   25446           1 :         if (in == NULL) {
   25447           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union srvsvc_NetSrvInfo!");
   25448           0 :                 return NULL;
   25449             :         }
   25450             : 
   25451           1 :         return py_import_srvsvc_NetSrvInfo(mem_ctx, level, in);
   25452             : }
   25453             : 
   25454           0 : static PyObject *py_srvsvc_NetSrvInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25455             : {
   25456           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   25457           0 :         PyObject *mem_ctx_obj = NULL;
   25458           0 :         TALLOC_CTX *mem_ctx = NULL;
   25459           0 :         int level = 0;
   25460           0 :         PyObject *in = NULL;
   25461           0 :         union srvsvc_NetSrvInfo *out = NULL;
   25462             : 
   25463           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   25464             :                 discard_const_p(char *, kwnames),
   25465             :                 &mem_ctx_obj,
   25466             :                 &level,
   25467             :                 &in)) {
   25468           0 :                 return NULL;
   25469             :         }
   25470           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   25471           0 :         if (mem_ctx == NULL) {
   25472           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   25473           0 :                 return NULL;
   25474             :         }
   25475             : 
   25476           0 :         out = py_export_srvsvc_NetSrvInfo(mem_ctx, level, in);
   25477           0 :         if (out == NULL) {
   25478           0 :                 return NULL;
   25479             :         }
   25480             : 
   25481           0 :         return pytalloc_GenericObject_reference(out);
   25482             : }
   25483             : 
   25484             : static PyMethodDef py_srvsvc_NetSrvInfo_methods[] = {
   25485             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSrvInfo_import),
   25486             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   25487             :                 "T.__import__(mem_ctx, level, in) => ret." },
   25488             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSrvInfo_export),
   25489             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   25490             :                 "T.__export__(mem_ctx, level, in) => ret." },
   25491             :         { NULL, NULL, 0, NULL }
   25492             : };
   25493             : 
   25494           0 : static PyObject *py_srvsvc_NetSrvInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25495             : {
   25496           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   25497           0 :         return NULL;
   25498             : }
   25499             : 
   25500             : 
   25501             : static PyTypeObject srvsvc_NetSrvInfo_Type = {
   25502             :         PyVarObject_HEAD_INIT(NULL, 0)
   25503             :         .tp_name = "srvsvc.NetSrvInfo",
   25504             :         .tp_getset = NULL,
   25505             :         .tp_methods = py_srvsvc_NetSrvInfo_methods,
   25506             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   25507             :         .tp_new = py_srvsvc_NetSrvInfo_new,
   25508             : };
   25509             : 
   25510             : 
   25511           0 : static PyObject *py_srvsvc_NetDiskInfo0_get___disk_offset(PyObject *obj, void *closure)
   25512             : {
   25513           0 :         struct srvsvc_NetDiskInfo0 *object = (struct srvsvc_NetDiskInfo0 *)pytalloc_get_ptr(obj);
   25514             :         PyObject *py___disk_offset;
   25515           0 :         py___disk_offset = PyLong_FromUnsignedLongLong((uint32_t)object->__disk_offset);
   25516           0 :         return py___disk_offset;
   25517             : }
   25518             : 
   25519           0 : static int py_srvsvc_NetDiskInfo0_set___disk_offset(PyObject *py_obj, PyObject *value, void *closure)
   25520             : {
   25521           0 :         struct srvsvc_NetDiskInfo0 *object = (struct srvsvc_NetDiskInfo0 *)pytalloc_get_ptr(py_obj);
   25522           0 :         if (value == NULL) {
   25523           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__disk_offset");
   25524           0 :                 return -1;
   25525             :         }
   25526             :         {
   25527           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__disk_offset));
   25528           0 :                 if (PyLong_Check(value)) {
   25529             :                         unsigned long long test_var;
   25530           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25531           0 :                         if (PyErr_Occurred() != NULL) {
   25532           0 :                                 return -1;
   25533             :                         }
   25534           0 :                         if (test_var > uint_max) {
   25535           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25536             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25537           0 :                                 return -1;
   25538             :                         }
   25539           0 :                         object->__disk_offset = test_var;
   25540             :                 } else {
   25541           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25542             :                           PyLong_Type.tp_name);
   25543           0 :                         return -1;
   25544             :                 }
   25545             :         }
   25546           0 :         return 0;
   25547             : }
   25548             : 
   25549           0 : static PyObject *py_srvsvc_NetDiskInfo0_get___disk_length(PyObject *obj, void *closure)
   25550             : {
   25551           0 :         struct srvsvc_NetDiskInfo0 *object = (struct srvsvc_NetDiskInfo0 *)pytalloc_get_ptr(obj);
   25552             :         PyObject *py___disk_length;
   25553           0 :         py___disk_length = PyLong_FromUnsignedLongLong((uint32_t)object->__disk_length);
   25554           0 :         return py___disk_length;
   25555             : }
   25556             : 
   25557           0 : static int py_srvsvc_NetDiskInfo0_set___disk_length(PyObject *py_obj, PyObject *value, void *closure)
   25558             : {
   25559           0 :         struct srvsvc_NetDiskInfo0 *object = (struct srvsvc_NetDiskInfo0 *)pytalloc_get_ptr(py_obj);
   25560           0 :         if (value == NULL) {
   25561           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__disk_length");
   25562           0 :                 return -1;
   25563             :         }
   25564             :         {
   25565           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__disk_length));
   25566           0 :                 if (PyLong_Check(value)) {
   25567             :                         unsigned long long test_var;
   25568           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25569           0 :                         if (PyErr_Occurred() != NULL) {
   25570           0 :                                 return -1;
   25571             :                         }
   25572           0 :                         if (test_var > uint_max) {
   25573           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25574             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25575           0 :                                 return -1;
   25576             :                         }
   25577           0 :                         object->__disk_length = test_var;
   25578             :                 } else {
   25579           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25580             :                           PyLong_Type.tp_name);
   25581           0 :                         return -1;
   25582             :                 }
   25583             :         }
   25584           0 :         return 0;
   25585             : }
   25586             : 
   25587           0 : static PyObject *py_srvsvc_NetDiskInfo0_get_disk(PyObject *obj, void *closure)
   25588             : {
   25589           0 :         struct srvsvc_NetDiskInfo0 *object = (struct srvsvc_NetDiskInfo0 *)pytalloc_get_ptr(obj);
   25590             :         PyObject *py_disk;
   25591           0 :         if (object->disk == NULL) {
   25592           0 :                 py_disk = Py_None;
   25593           0 :                 Py_INCREF(py_disk);
   25594             :         } else {
   25595           0 :                 py_disk = PyUnicode_Decode(object->disk, strlen(object->disk), "utf-8", "ignore");
   25596             :         }
   25597           0 :         return py_disk;
   25598             : }
   25599             : 
   25600           0 : static int py_srvsvc_NetDiskInfo0_set_disk(PyObject *py_obj, PyObject *value, void *closure)
   25601             : {
   25602           0 :         struct srvsvc_NetDiskInfo0 *object = (struct srvsvc_NetDiskInfo0 *)pytalloc_get_ptr(py_obj);
   25603           0 :         if (value == NULL) {
   25604           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->disk");
   25605           0 :                 return -1;
   25606             :         }
   25607             :         {
   25608             :                 const char *test_str;
   25609             :                 const char *talloc_str;
   25610           0 :                 PyObject *unicode = NULL;
   25611           0 :                 if (PyUnicode_Check(value)) {
   25612           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   25613           0 :                         if (unicode == NULL) {
   25614           0 :                                 PyErr_NoMemory();
   25615           0 :                                 return -1;
   25616             :                         }
   25617           0 :                         test_str = PyBytes_AS_STRING(unicode);
   25618           0 :                 } else if (PyBytes_Check(value)) {
   25619           0 :                         test_str = PyBytes_AS_STRING(value);
   25620             :                 } else {
   25621           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   25622           0 :                         return -1;
   25623             :                 }
   25624           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   25625           0 :                 if (unicode != NULL) {
   25626           0 :                         Py_DECREF(unicode);
   25627             :                 }
   25628           0 :                 if (talloc_str == NULL) {
   25629           0 :                         PyErr_NoMemory();
   25630           0 :                         return -1;
   25631             :                 }
   25632           0 :                 object->disk = talloc_str;
   25633             :         }
   25634           0 :         return 0;
   25635             : }
   25636             : 
   25637             : static PyGetSetDef py_srvsvc_NetDiskInfo0_getsetters[] = {
   25638             :         {
   25639             :                 .name = discard_const_p(char, "__disk_offset"),
   25640             :                 .get = py_srvsvc_NetDiskInfo0_get___disk_offset,
   25641             :                 .set = py_srvsvc_NetDiskInfo0_set___disk_offset,
   25642             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25643             :         },
   25644             :         {
   25645             :                 .name = discard_const_p(char, "__disk_length"),
   25646             :                 .get = py_srvsvc_NetDiskInfo0_get___disk_length,
   25647             :                 .set = py_srvsvc_NetDiskInfo0_set___disk_length,
   25648             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25649             :         },
   25650             :         {
   25651             :                 .name = discard_const_p(char, "disk"),
   25652             :                 .get = py_srvsvc_NetDiskInfo0_get_disk,
   25653             :                 .set = py_srvsvc_NetDiskInfo0_set_disk,
   25654             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   25655             :         },
   25656             :         { .name = NULL }
   25657             : };
   25658             : 
   25659           0 : static PyObject *py_srvsvc_NetDiskInfo0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25660             : {
   25661           0 :         return pytalloc_new(struct srvsvc_NetDiskInfo0, type);
   25662             : }
   25663             : 
   25664             : 
   25665             : static PyTypeObject srvsvc_NetDiskInfo0_Type = {
   25666             :         PyVarObject_HEAD_INIT(NULL, 0)
   25667             :         .tp_name = "srvsvc.NetDiskInfo0",
   25668             :         .tp_getset = py_srvsvc_NetDiskInfo0_getsetters,
   25669             :         .tp_methods = NULL,
   25670             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   25671             :         .tp_new = py_srvsvc_NetDiskInfo0_new,
   25672             : };
   25673             : 
   25674             : 
   25675           0 : static PyObject *py_srvsvc_NetDiskInfo_get_count(PyObject *obj, void *closure)
   25676             : {
   25677           0 :         struct srvsvc_NetDiskInfo *object = (struct srvsvc_NetDiskInfo *)pytalloc_get_ptr(obj);
   25678             :         PyObject *py_count;
   25679           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
   25680           0 :         return py_count;
   25681             : }
   25682             : 
   25683           0 : static int py_srvsvc_NetDiskInfo_set_count(PyObject *py_obj, PyObject *value, void *closure)
   25684             : {
   25685           0 :         struct srvsvc_NetDiskInfo *object = (struct srvsvc_NetDiskInfo *)pytalloc_get_ptr(py_obj);
   25686           0 :         if (value == NULL) {
   25687           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   25688           0 :                 return -1;
   25689             :         }
   25690             :         {
   25691           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   25692           0 :                 if (PyLong_Check(value)) {
   25693             :                         unsigned long long test_var;
   25694           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25695           0 :                         if (PyErr_Occurred() != NULL) {
   25696           0 :                                 return -1;
   25697             :                         }
   25698           0 :                         if (test_var > uint_max) {
   25699           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25700             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25701           0 :                                 return -1;
   25702             :                         }
   25703           0 :                         object->count = test_var;
   25704             :                 } else {
   25705           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25706             :                           PyLong_Type.tp_name);
   25707           0 :                         return -1;
   25708             :                 }
   25709             :         }
   25710           0 :         return 0;
   25711             : }
   25712             : 
   25713           0 : static PyObject *py_srvsvc_NetDiskInfo_get_disks(PyObject *obj, void *closure)
   25714             : {
   25715           0 :         struct srvsvc_NetDiskInfo *object = (struct srvsvc_NetDiskInfo *)pytalloc_get_ptr(obj);
   25716             :         PyObject *py_disks;
   25717           0 :         if (object->disks == NULL) {
   25718           0 :                 Py_RETURN_NONE;
   25719             :         }
   25720           0 :         if (object->disks == NULL) {
   25721           0 :                 py_disks = Py_None;
   25722           0 :                 Py_INCREF(py_disks);
   25723             :         } else {
   25724           0 :                 py_disks = PyList_New(object->count);
   25725           0 :                 if (py_disks == NULL) {
   25726           0 :                         return NULL;
   25727             :                 }
   25728             :                 {
   25729             :                         int disks_cntr_1;
   25730           0 :                         for (disks_cntr_1 = 0; disks_cntr_1 < (object->count); disks_cntr_1++) {
   25731             :                                 PyObject *py_disks_1;
   25732           0 :                                 py_disks_1 = pytalloc_reference_ex(&srvsvc_NetDiskInfo0_Type, object->disks, &object->disks[disks_cntr_1]);
   25733           0 :                                 PyList_SetItem(py_disks, disks_cntr_1, py_disks_1);
   25734             :                         }
   25735             :                 }
   25736             :         }
   25737           0 :         return py_disks;
   25738             : }
   25739             : 
   25740           0 : static int py_srvsvc_NetDiskInfo_set_disks(PyObject *py_obj, PyObject *value, void *closure)
   25741             : {
   25742           0 :         struct srvsvc_NetDiskInfo *object = (struct srvsvc_NetDiskInfo *)pytalloc_get_ptr(py_obj);
   25743           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->disks));
   25744           0 :         if (value == NULL) {
   25745           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->disks");
   25746           0 :                 return -1;
   25747             :         }
   25748           0 :         if (value == Py_None) {
   25749           0 :                 object->disks = NULL;
   25750             :         } else {
   25751           0 :                 object->disks = NULL;
   25752           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   25753             :                 {
   25754             :                         int disks_cntr_1;
   25755           0 :                         object->disks = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->disks, PyList_GET_SIZE(value));
   25756           0 :                         if (!object->disks) { return -1;; }
   25757           0 :                         talloc_set_name_const(object->disks, "ARRAY: object->disks");
   25758           0 :                         for (disks_cntr_1 = 0; disks_cntr_1 < PyList_GET_SIZE(value); disks_cntr_1++) {
   25759           0 :                                 if (PyList_GET_ITEM(value, disks_cntr_1) == NULL) {
   25760           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->disks[disks_cntr_1]");
   25761           0 :                                         return -1;
   25762             :                                 }
   25763           0 :                                 PY_CHECK_TYPE(&srvsvc_NetDiskInfo0_Type, PyList_GET_ITEM(value, disks_cntr_1), return -1;);
   25764           0 :                                 if (talloc_reference(object->disks, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, disks_cntr_1))) == NULL) {
   25765           0 :                                         PyErr_NoMemory();
   25766           0 :                                         return -1;
   25767             :                                 }
   25768           0 :                                 object->disks[disks_cntr_1] = *(struct srvsvc_NetDiskInfo0 *)pytalloc_get_ptr(PyList_GET_ITEM(value, disks_cntr_1));
   25769             :                         }
   25770             :                 }
   25771             :         }
   25772           0 :         return 0;
   25773             : }
   25774             : 
   25775             : static PyGetSetDef py_srvsvc_NetDiskInfo_getsetters[] = {
   25776             :         {
   25777             :                 .name = discard_const_p(char, "count"),
   25778             :                 .get = py_srvsvc_NetDiskInfo_get_count,
   25779             :                 .set = py_srvsvc_NetDiskInfo_set_count,
   25780             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25781             :         },
   25782             :         {
   25783             :                 .name = discard_const_p(char, "disks"),
   25784             :                 .get = py_srvsvc_NetDiskInfo_get_disks,
   25785             :                 .set = py_srvsvc_NetDiskInfo_set_disks,
   25786             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetDiskInfo0")
   25787             :         },
   25788             :         { .name = NULL }
   25789             : };
   25790             : 
   25791           0 : static PyObject *py_srvsvc_NetDiskInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25792             : {
   25793           0 :         return pytalloc_new(struct srvsvc_NetDiskInfo, type);
   25794             : }
   25795             : 
   25796             : 
   25797             : static PyTypeObject srvsvc_NetDiskInfo_Type = {
   25798             :         PyVarObject_HEAD_INIT(NULL, 0)
   25799             :         .tp_name = "srvsvc.NetDiskInfo",
   25800             :         .tp_getset = py_srvsvc_NetDiskInfo_getsetters,
   25801             :         .tp_methods = NULL,
   25802             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   25803             :         .tp_new = py_srvsvc_NetDiskInfo_new,
   25804             : };
   25805             : 
   25806             : 
   25807           0 : static PyObject *py_srvsvc_Statistics_get_start(PyObject *obj, void *closure)
   25808             : {
   25809           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
   25810             :         PyObject *py_start;
   25811           0 :         py_start = PyLong_FromUnsignedLongLong((uint32_t)object->start);
   25812           0 :         return py_start;
   25813             : }
   25814             : 
   25815           0 : static int py_srvsvc_Statistics_set_start(PyObject *py_obj, PyObject *value, void *closure)
   25816             : {
   25817           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
   25818           0 :         if (value == NULL) {
   25819           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->start");
   25820           0 :                 return -1;
   25821             :         }
   25822             :         {
   25823           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->start));
   25824           0 :                 if (PyLong_Check(value)) {
   25825             :                         unsigned long long test_var;
   25826           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25827           0 :                         if (PyErr_Occurred() != NULL) {
   25828           0 :                                 return -1;
   25829             :                         }
   25830           0 :                         if (test_var > uint_max) {
   25831           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25832             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25833           0 :                                 return -1;
   25834             :                         }
   25835           0 :                         object->start = test_var;
   25836             :                 } else {
   25837           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25838             :                           PyLong_Type.tp_name);
   25839           0 :                         return -1;
   25840             :                 }
   25841             :         }
   25842           0 :         return 0;
   25843             : }
   25844             : 
   25845           0 : static PyObject *py_srvsvc_Statistics_get_fopens(PyObject *obj, void *closure)
   25846             : {
   25847           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
   25848             :         PyObject *py_fopens;
   25849           0 :         py_fopens = PyLong_FromUnsignedLongLong((uint32_t)object->fopens);
   25850           0 :         return py_fopens;
   25851             : }
   25852             : 
   25853           0 : static int py_srvsvc_Statistics_set_fopens(PyObject *py_obj, PyObject *value, void *closure)
   25854             : {
   25855           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
   25856           0 :         if (value == NULL) {
   25857           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fopens");
   25858           0 :                 return -1;
   25859             :         }
   25860             :         {
   25861           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fopens));
   25862           0 :                 if (PyLong_Check(value)) {
   25863             :                         unsigned long long test_var;
   25864           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25865           0 :                         if (PyErr_Occurred() != NULL) {
   25866           0 :                                 return -1;
   25867             :                         }
   25868           0 :                         if (test_var > uint_max) {
   25869           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25870             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25871           0 :                                 return -1;
   25872             :                         }
   25873           0 :                         object->fopens = test_var;
   25874             :                 } else {
   25875           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25876             :                           PyLong_Type.tp_name);
   25877           0 :                         return -1;
   25878             :                 }
   25879             :         }
   25880           0 :         return 0;
   25881             : }
   25882             : 
   25883           0 : static PyObject *py_srvsvc_Statistics_get_devopens(PyObject *obj, void *closure)
   25884             : {
   25885           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
   25886             :         PyObject *py_devopens;
   25887           0 :         py_devopens = PyLong_FromUnsignedLongLong((uint32_t)object->devopens);
   25888           0 :         return py_devopens;
   25889             : }
   25890             : 
   25891           0 : static int py_srvsvc_Statistics_set_devopens(PyObject *py_obj, PyObject *value, void *closure)
   25892             : {
   25893           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
   25894           0 :         if (value == NULL) {
   25895           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->devopens");
   25896           0 :                 return -1;
   25897             :         }
   25898             :         {
   25899           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->devopens));
   25900           0 :                 if (PyLong_Check(value)) {
   25901             :                         unsigned long long test_var;
   25902           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25903           0 :                         if (PyErr_Occurred() != NULL) {
   25904           0 :                                 return -1;
   25905             :                         }
   25906           0 :                         if (test_var > uint_max) {
   25907           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25908             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25909           0 :                                 return -1;
   25910             :                         }
   25911           0 :                         object->devopens = test_var;
   25912             :                 } else {
   25913           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25914             :                           PyLong_Type.tp_name);
   25915           0 :                         return -1;
   25916             :                 }
   25917             :         }
   25918           0 :         return 0;
   25919             : }
   25920             : 
   25921           0 : static PyObject *py_srvsvc_Statistics_get_jobsqueued(PyObject *obj, void *closure)
   25922             : {
   25923           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
   25924             :         PyObject *py_jobsqueued;
   25925           0 :         py_jobsqueued = PyLong_FromUnsignedLongLong((uint32_t)object->jobsqueued);
   25926           0 :         return py_jobsqueued;
   25927             : }
   25928             : 
   25929           0 : static int py_srvsvc_Statistics_set_jobsqueued(PyObject *py_obj, PyObject *value, void *closure)
   25930             : {
   25931           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
   25932           0 :         if (value == NULL) {
   25933           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->jobsqueued");
   25934           0 :                 return -1;
   25935             :         }
   25936             :         {
   25937           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->jobsqueued));
   25938           0 :                 if (PyLong_Check(value)) {
   25939             :                         unsigned long long test_var;
   25940           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25941           0 :                         if (PyErr_Occurred() != NULL) {
   25942           0 :                                 return -1;
   25943             :                         }
   25944           0 :                         if (test_var > uint_max) {
   25945           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25946             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25947           0 :                                 return -1;
   25948             :                         }
   25949           0 :                         object->jobsqueued = test_var;
   25950             :                 } else {
   25951           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25952             :                           PyLong_Type.tp_name);
   25953           0 :                         return -1;
   25954             :                 }
   25955             :         }
   25956           0 :         return 0;
   25957             : }
   25958             : 
   25959           0 : static PyObject *py_srvsvc_Statistics_get_sopens(PyObject *obj, void *closure)
   25960             : {
   25961           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
   25962             :         PyObject *py_sopens;
   25963           0 :         py_sopens = PyLong_FromUnsignedLongLong((uint32_t)object->sopens);
   25964           0 :         return py_sopens;
   25965             : }
   25966             : 
   25967           0 : static int py_srvsvc_Statistics_set_sopens(PyObject *py_obj, PyObject *value, void *closure)
   25968             : {
   25969           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
   25970           0 :         if (value == NULL) {
   25971           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sopens");
   25972           0 :                 return -1;
   25973             :         }
   25974             :         {
   25975           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sopens));
   25976           0 :                 if (PyLong_Check(value)) {
   25977             :                         unsigned long long test_var;
   25978           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25979           0 :                         if (PyErr_Occurred() != NULL) {
   25980           0 :                                 return -1;
   25981             :                         }
   25982           0 :                         if (test_var > uint_max) {
   25983           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25984             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25985           0 :                                 return -1;
   25986             :                         }
   25987           0 :                         object->sopens = test_var;
   25988             :                 } else {
   25989           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25990             :                           PyLong_Type.tp_name);
   25991           0 :                         return -1;
   25992             :                 }
   25993             :         }
   25994           0 :         return 0;
   25995             : }
   25996             : 
   25997           0 : static PyObject *py_srvsvc_Statistics_get_stimeouts(PyObject *obj, void *closure)
   25998             : {
   25999           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
   26000             :         PyObject *py_stimeouts;
   26001           0 :         py_stimeouts = PyLong_FromUnsignedLongLong((uint32_t)object->stimeouts);
   26002           0 :         return py_stimeouts;
   26003             : }
   26004             : 
   26005           0 : static int py_srvsvc_Statistics_set_stimeouts(PyObject *py_obj, PyObject *value, void *closure)
   26006             : {
   26007           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
   26008           0 :         if (value == NULL) {
   26009           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->stimeouts");
   26010           0 :                 return -1;
   26011             :         }
   26012             :         {
   26013           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->stimeouts));
   26014           0 :                 if (PyLong_Check(value)) {
   26015             :                         unsigned long long test_var;
   26016           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26017           0 :                         if (PyErr_Occurred() != NULL) {
   26018           0 :                                 return -1;
   26019             :                         }
   26020           0 :                         if (test_var > uint_max) {
   26021           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26022             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26023           0 :                                 return -1;
   26024             :                         }
   26025           0 :                         object->stimeouts = test_var;
   26026             :                 } else {
   26027           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26028             :                           PyLong_Type.tp_name);
   26029           0 :                         return -1;
   26030             :                 }
   26031             :         }
   26032           0 :         return 0;
   26033             : }
   26034             : 
   26035           0 : static PyObject *py_srvsvc_Statistics_get_serrorout(PyObject *obj, void *closure)
   26036             : {
   26037           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
   26038             :         PyObject *py_serrorout;
   26039           0 :         py_serrorout = PyLong_FromUnsignedLongLong((uint32_t)object->serrorout);
   26040           0 :         return py_serrorout;
   26041             : }
   26042             : 
   26043           0 : static int py_srvsvc_Statistics_set_serrorout(PyObject *py_obj, PyObject *value, void *closure)
   26044             : {
   26045           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
   26046           0 :         if (value == NULL) {
   26047           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->serrorout");
   26048           0 :                 return -1;
   26049             :         }
   26050             :         {
   26051           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->serrorout));
   26052           0 :                 if (PyLong_Check(value)) {
   26053             :                         unsigned long long test_var;
   26054           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26055           0 :                         if (PyErr_Occurred() != NULL) {
   26056           0 :                                 return -1;
   26057             :                         }
   26058           0 :                         if (test_var > uint_max) {
   26059           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26060             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26061           0 :                                 return -1;
   26062             :                         }
   26063           0 :                         object->serrorout = test_var;
   26064             :                 } else {
   26065           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26066             :                           PyLong_Type.tp_name);
   26067           0 :                         return -1;
   26068             :                 }
   26069             :         }
   26070           0 :         return 0;
   26071             : }
   26072             : 
   26073           0 : static PyObject *py_srvsvc_Statistics_get_pwerrors(PyObject *obj, void *closure)
   26074             : {
   26075           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
   26076             :         PyObject *py_pwerrors;
   26077           0 :         py_pwerrors = PyLong_FromUnsignedLongLong((uint32_t)object->pwerrors);
   26078           0 :         return py_pwerrors;
   26079             : }
   26080             : 
   26081           0 : static int py_srvsvc_Statistics_set_pwerrors(PyObject *py_obj, PyObject *value, void *closure)
   26082             : {
   26083           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
   26084           0 :         if (value == NULL) {
   26085           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pwerrors");
   26086           0 :                 return -1;
   26087             :         }
   26088             :         {
   26089           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pwerrors));
   26090           0 :                 if (PyLong_Check(value)) {
   26091             :                         unsigned long long test_var;
   26092           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26093           0 :                         if (PyErr_Occurred() != NULL) {
   26094           0 :                                 return -1;
   26095             :                         }
   26096           0 :                         if (test_var > uint_max) {
   26097           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26098             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26099           0 :                                 return -1;
   26100             :                         }
   26101           0 :                         object->pwerrors = test_var;
   26102             :                 } else {
   26103           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26104             :                           PyLong_Type.tp_name);
   26105           0 :                         return -1;
   26106             :                 }
   26107             :         }
   26108           0 :         return 0;
   26109             : }
   26110             : 
   26111           0 : static PyObject *py_srvsvc_Statistics_get_permerrors(PyObject *obj, void *closure)
   26112             : {
   26113           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
   26114             :         PyObject *py_permerrors;
   26115           0 :         py_permerrors = PyLong_FromUnsignedLongLong((uint32_t)object->permerrors);
   26116           0 :         return py_permerrors;
   26117             : }
   26118             : 
   26119           0 : static int py_srvsvc_Statistics_set_permerrors(PyObject *py_obj, PyObject *value, void *closure)
   26120             : {
   26121           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
   26122           0 :         if (value == NULL) {
   26123           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->permerrors");
   26124           0 :                 return -1;
   26125             :         }
   26126             :         {
   26127           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->permerrors));
   26128           0 :                 if (PyLong_Check(value)) {
   26129             :                         unsigned long long test_var;
   26130           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26131           0 :                         if (PyErr_Occurred() != NULL) {
   26132           0 :                                 return -1;
   26133             :                         }
   26134           0 :                         if (test_var > uint_max) {
   26135           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26136             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26137           0 :                                 return -1;
   26138             :                         }
   26139           0 :                         object->permerrors = test_var;
   26140             :                 } else {
   26141           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26142             :                           PyLong_Type.tp_name);
   26143           0 :                         return -1;
   26144             :                 }
   26145             :         }
   26146           0 :         return 0;
   26147             : }
   26148             : 
   26149           0 : static PyObject *py_srvsvc_Statistics_get_syserrors(PyObject *obj, void *closure)
   26150             : {
   26151           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
   26152             :         PyObject *py_syserrors;
   26153           0 :         py_syserrors = PyLong_FromUnsignedLongLong((uint32_t)object->syserrors);
   26154           0 :         return py_syserrors;
   26155             : }
   26156             : 
   26157           0 : static int py_srvsvc_Statistics_set_syserrors(PyObject *py_obj, PyObject *value, void *closure)
   26158             : {
   26159           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
   26160           0 :         if (value == NULL) {
   26161           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->syserrors");
   26162           0 :                 return -1;
   26163             :         }
   26164             :         {
   26165           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->syserrors));
   26166           0 :                 if (PyLong_Check(value)) {
   26167             :                         unsigned long long test_var;
   26168           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26169           0 :                         if (PyErr_Occurred() != NULL) {
   26170           0 :                                 return -1;
   26171             :                         }
   26172           0 :                         if (test_var > uint_max) {
   26173           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26174             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26175           0 :                                 return -1;
   26176             :                         }
   26177           0 :                         object->syserrors = test_var;
   26178             :                 } else {
   26179           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26180             :                           PyLong_Type.tp_name);
   26181           0 :                         return -1;
   26182             :                 }
   26183             :         }
   26184           0 :         return 0;
   26185             : }
   26186             : 
   26187           0 : static PyObject *py_srvsvc_Statistics_get_bytessent_low(PyObject *obj, void *closure)
   26188             : {
   26189           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
   26190             :         PyObject *py_bytessent_low;
   26191           0 :         py_bytessent_low = PyLong_FromUnsignedLongLong((uint32_t)object->bytessent_low);
   26192           0 :         return py_bytessent_low;
   26193             : }
   26194             : 
   26195           0 : static int py_srvsvc_Statistics_set_bytessent_low(PyObject *py_obj, PyObject *value, void *closure)
   26196             : {
   26197           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
   26198           0 :         if (value == NULL) {
   26199           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->bytessent_low");
   26200           0 :                 return -1;
   26201             :         }
   26202             :         {
   26203           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bytessent_low));
   26204           0 :                 if (PyLong_Check(value)) {
   26205             :                         unsigned long long test_var;
   26206           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26207           0 :                         if (PyErr_Occurred() != NULL) {
   26208           0 :                                 return -1;
   26209             :                         }
   26210           0 :                         if (test_var > uint_max) {
   26211           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26212             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26213           0 :                                 return -1;
   26214             :                         }
   26215           0 :                         object->bytessent_low = test_var;
   26216             :                 } else {
   26217           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26218             :                           PyLong_Type.tp_name);
   26219           0 :                         return -1;
   26220             :                 }
   26221             :         }
   26222           0 :         return 0;
   26223             : }
   26224             : 
   26225           0 : static PyObject *py_srvsvc_Statistics_get_bytessent_high(PyObject *obj, void *closure)
   26226             : {
   26227           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
   26228             :         PyObject *py_bytessent_high;
   26229           0 :         py_bytessent_high = PyLong_FromUnsignedLongLong((uint32_t)object->bytessent_high);
   26230           0 :         return py_bytessent_high;
   26231             : }
   26232             : 
   26233           0 : static int py_srvsvc_Statistics_set_bytessent_high(PyObject *py_obj, PyObject *value, void *closure)
   26234             : {
   26235           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
   26236           0 :         if (value == NULL) {
   26237           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->bytessent_high");
   26238           0 :                 return -1;
   26239             :         }
   26240             :         {
   26241           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bytessent_high));
   26242           0 :                 if (PyLong_Check(value)) {
   26243             :                         unsigned long long test_var;
   26244           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26245           0 :                         if (PyErr_Occurred() != NULL) {
   26246           0 :                                 return -1;
   26247             :                         }
   26248           0 :                         if (test_var > uint_max) {
   26249           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26250             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26251           0 :                                 return -1;
   26252             :                         }
   26253           0 :                         object->bytessent_high = test_var;
   26254             :                 } else {
   26255           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26256             :                           PyLong_Type.tp_name);
   26257           0 :                         return -1;
   26258             :                 }
   26259             :         }
   26260           0 :         return 0;
   26261             : }
   26262             : 
   26263           0 : static PyObject *py_srvsvc_Statistics_get_bytesrcvd_low(PyObject *obj, void *closure)
   26264             : {
   26265           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
   26266             :         PyObject *py_bytesrcvd_low;
   26267           0 :         py_bytesrcvd_low = PyLong_FromUnsignedLongLong((uint32_t)object->bytesrcvd_low);
   26268           0 :         return py_bytesrcvd_low;
   26269             : }
   26270             : 
   26271           0 : static int py_srvsvc_Statistics_set_bytesrcvd_low(PyObject *py_obj, PyObject *value, void *closure)
   26272             : {
   26273           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
   26274           0 :         if (value == NULL) {
   26275           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->bytesrcvd_low");
   26276           0 :                 return -1;
   26277             :         }
   26278             :         {
   26279           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bytesrcvd_low));
   26280           0 :                 if (PyLong_Check(value)) {
   26281             :                         unsigned long long test_var;
   26282           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26283           0 :                         if (PyErr_Occurred() != NULL) {
   26284           0 :                                 return -1;
   26285             :                         }
   26286           0 :                         if (test_var > uint_max) {
   26287           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26288             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26289           0 :                                 return -1;
   26290             :                         }
   26291           0 :                         object->bytesrcvd_low = test_var;
   26292             :                 } else {
   26293           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26294             :                           PyLong_Type.tp_name);
   26295           0 :                         return -1;
   26296             :                 }
   26297             :         }
   26298           0 :         return 0;
   26299             : }
   26300             : 
   26301           0 : static PyObject *py_srvsvc_Statistics_get_bytesrcvd_high(PyObject *obj, void *closure)
   26302             : {
   26303           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
   26304             :         PyObject *py_bytesrcvd_high;
   26305           0 :         py_bytesrcvd_high = PyLong_FromUnsignedLongLong((uint32_t)object->bytesrcvd_high);
   26306           0 :         return py_bytesrcvd_high;
   26307             : }
   26308             : 
   26309           0 : static int py_srvsvc_Statistics_set_bytesrcvd_high(PyObject *py_obj, PyObject *value, void *closure)
   26310             : {
   26311           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
   26312           0 :         if (value == NULL) {
   26313           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->bytesrcvd_high");
   26314           0 :                 return -1;
   26315             :         }
   26316             :         {
   26317           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bytesrcvd_high));
   26318           0 :                 if (PyLong_Check(value)) {
   26319             :                         unsigned long long test_var;
   26320           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26321           0 :                         if (PyErr_Occurred() != NULL) {
   26322           0 :                                 return -1;
   26323             :                         }
   26324           0 :                         if (test_var > uint_max) {
   26325           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26326             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26327           0 :                                 return -1;
   26328             :                         }
   26329           0 :                         object->bytesrcvd_high = test_var;
   26330             :                 } else {
   26331           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26332             :                           PyLong_Type.tp_name);
   26333           0 :                         return -1;
   26334             :                 }
   26335             :         }
   26336           0 :         return 0;
   26337             : }
   26338             : 
   26339           0 : static PyObject *py_srvsvc_Statistics_get_avresponse(PyObject *obj, void *closure)
   26340             : {
   26341           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
   26342             :         PyObject *py_avresponse;
   26343           0 :         py_avresponse = PyLong_FromUnsignedLongLong((uint32_t)object->avresponse);
   26344           0 :         return py_avresponse;
   26345             : }
   26346             : 
   26347           0 : static int py_srvsvc_Statistics_set_avresponse(PyObject *py_obj, PyObject *value, void *closure)
   26348             : {
   26349           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
   26350           0 :         if (value == NULL) {
   26351           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->avresponse");
   26352           0 :                 return -1;
   26353             :         }
   26354             :         {
   26355           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->avresponse));
   26356           0 :                 if (PyLong_Check(value)) {
   26357             :                         unsigned long long test_var;
   26358           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26359           0 :                         if (PyErr_Occurred() != NULL) {
   26360           0 :                                 return -1;
   26361             :                         }
   26362           0 :                         if (test_var > uint_max) {
   26363           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26364             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26365           0 :                                 return -1;
   26366             :                         }
   26367           0 :                         object->avresponse = test_var;
   26368             :                 } else {
   26369           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26370             :                           PyLong_Type.tp_name);
   26371           0 :                         return -1;
   26372             :                 }
   26373             :         }
   26374           0 :         return 0;
   26375             : }
   26376             : 
   26377           0 : static PyObject *py_srvsvc_Statistics_get_reqbufneed(PyObject *obj, void *closure)
   26378             : {
   26379           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
   26380             :         PyObject *py_reqbufneed;
   26381           0 :         py_reqbufneed = PyLong_FromUnsignedLongLong((uint32_t)object->reqbufneed);
   26382           0 :         return py_reqbufneed;
   26383             : }
   26384             : 
   26385           0 : static int py_srvsvc_Statistics_set_reqbufneed(PyObject *py_obj, PyObject *value, void *closure)
   26386             : {
   26387           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
   26388           0 :         if (value == NULL) {
   26389           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reqbufneed");
   26390           0 :                 return -1;
   26391             :         }
   26392             :         {
   26393           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reqbufneed));
   26394           0 :                 if (PyLong_Check(value)) {
   26395             :                         unsigned long long test_var;
   26396           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26397           0 :                         if (PyErr_Occurred() != NULL) {
   26398           0 :                                 return -1;
   26399             :                         }
   26400           0 :                         if (test_var > uint_max) {
   26401           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26402             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26403           0 :                                 return -1;
   26404             :                         }
   26405           0 :                         object->reqbufneed = test_var;
   26406             :                 } else {
   26407           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26408             :                           PyLong_Type.tp_name);
   26409           0 :                         return -1;
   26410             :                 }
   26411             :         }
   26412           0 :         return 0;
   26413             : }
   26414             : 
   26415           0 : static PyObject *py_srvsvc_Statistics_get_bigbufneed(PyObject *obj, void *closure)
   26416             : {
   26417           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(obj);
   26418             :         PyObject *py_bigbufneed;
   26419           0 :         py_bigbufneed = PyLong_FromUnsignedLongLong((uint32_t)object->bigbufneed);
   26420           0 :         return py_bigbufneed;
   26421             : }
   26422             : 
   26423           0 : static int py_srvsvc_Statistics_set_bigbufneed(PyObject *py_obj, PyObject *value, void *closure)
   26424             : {
   26425           0 :         struct srvsvc_Statistics *object = (struct srvsvc_Statistics *)pytalloc_get_ptr(py_obj);
   26426           0 :         if (value == NULL) {
   26427           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->bigbufneed");
   26428           0 :                 return -1;
   26429             :         }
   26430             :         {
   26431           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bigbufneed));
   26432           0 :                 if (PyLong_Check(value)) {
   26433             :                         unsigned long long test_var;
   26434           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26435           0 :                         if (PyErr_Occurred() != NULL) {
   26436           0 :                                 return -1;
   26437             :                         }
   26438           0 :                         if (test_var > uint_max) {
   26439           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26440             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26441           0 :                                 return -1;
   26442             :                         }
   26443           0 :                         object->bigbufneed = test_var;
   26444             :                 } else {
   26445           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26446             :                           PyLong_Type.tp_name);
   26447           0 :                         return -1;
   26448             :                 }
   26449             :         }
   26450           0 :         return 0;
   26451             : }
   26452             : 
   26453             : static PyGetSetDef py_srvsvc_Statistics_getsetters[] = {
   26454             :         {
   26455             :                 .name = discard_const_p(char, "start"),
   26456             :                 .get = py_srvsvc_Statistics_get_start,
   26457             :                 .set = py_srvsvc_Statistics_set_start,
   26458             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26459             :         },
   26460             :         {
   26461             :                 .name = discard_const_p(char, "fopens"),
   26462             :                 .get = py_srvsvc_Statistics_get_fopens,
   26463             :                 .set = py_srvsvc_Statistics_set_fopens,
   26464             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26465             :         },
   26466             :         {
   26467             :                 .name = discard_const_p(char, "devopens"),
   26468             :                 .get = py_srvsvc_Statistics_get_devopens,
   26469             :                 .set = py_srvsvc_Statistics_set_devopens,
   26470             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26471             :         },
   26472             :         {
   26473             :                 .name = discard_const_p(char, "jobsqueued"),
   26474             :                 .get = py_srvsvc_Statistics_get_jobsqueued,
   26475             :                 .set = py_srvsvc_Statistics_set_jobsqueued,
   26476             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26477             :         },
   26478             :         {
   26479             :                 .name = discard_const_p(char, "sopens"),
   26480             :                 .get = py_srvsvc_Statistics_get_sopens,
   26481             :                 .set = py_srvsvc_Statistics_set_sopens,
   26482             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26483             :         },
   26484             :         {
   26485             :                 .name = discard_const_p(char, "stimeouts"),
   26486             :                 .get = py_srvsvc_Statistics_get_stimeouts,
   26487             :                 .set = py_srvsvc_Statistics_set_stimeouts,
   26488             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26489             :         },
   26490             :         {
   26491             :                 .name = discard_const_p(char, "serrorout"),
   26492             :                 .get = py_srvsvc_Statistics_get_serrorout,
   26493             :                 .set = py_srvsvc_Statistics_set_serrorout,
   26494             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26495             :         },
   26496             :         {
   26497             :                 .name = discard_const_p(char, "pwerrors"),
   26498             :                 .get = py_srvsvc_Statistics_get_pwerrors,
   26499             :                 .set = py_srvsvc_Statistics_set_pwerrors,
   26500             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26501             :         },
   26502             :         {
   26503             :                 .name = discard_const_p(char, "permerrors"),
   26504             :                 .get = py_srvsvc_Statistics_get_permerrors,
   26505             :                 .set = py_srvsvc_Statistics_set_permerrors,
   26506             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26507             :         },
   26508             :         {
   26509             :                 .name = discard_const_p(char, "syserrors"),
   26510             :                 .get = py_srvsvc_Statistics_get_syserrors,
   26511             :                 .set = py_srvsvc_Statistics_set_syserrors,
   26512             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26513             :         },
   26514             :         {
   26515             :                 .name = discard_const_p(char, "bytessent_low"),
   26516             :                 .get = py_srvsvc_Statistics_get_bytessent_low,
   26517             :                 .set = py_srvsvc_Statistics_set_bytessent_low,
   26518             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26519             :         },
   26520             :         {
   26521             :                 .name = discard_const_p(char, "bytessent_high"),
   26522             :                 .get = py_srvsvc_Statistics_get_bytessent_high,
   26523             :                 .set = py_srvsvc_Statistics_set_bytessent_high,
   26524             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26525             :         },
   26526             :         {
   26527             :                 .name = discard_const_p(char, "bytesrcvd_low"),
   26528             :                 .get = py_srvsvc_Statistics_get_bytesrcvd_low,
   26529             :                 .set = py_srvsvc_Statistics_set_bytesrcvd_low,
   26530             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26531             :         },
   26532             :         {
   26533             :                 .name = discard_const_p(char, "bytesrcvd_high"),
   26534             :                 .get = py_srvsvc_Statistics_get_bytesrcvd_high,
   26535             :                 .set = py_srvsvc_Statistics_set_bytesrcvd_high,
   26536             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26537             :         },
   26538             :         {
   26539             :                 .name = discard_const_p(char, "avresponse"),
   26540             :                 .get = py_srvsvc_Statistics_get_avresponse,
   26541             :                 .set = py_srvsvc_Statistics_set_avresponse,
   26542             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26543             :         },
   26544             :         {
   26545             :                 .name = discard_const_p(char, "reqbufneed"),
   26546             :                 .get = py_srvsvc_Statistics_get_reqbufneed,
   26547             :                 .set = py_srvsvc_Statistics_set_reqbufneed,
   26548             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26549             :         },
   26550             :         {
   26551             :                 .name = discard_const_p(char, "bigbufneed"),
   26552             :                 .get = py_srvsvc_Statistics_get_bigbufneed,
   26553             :                 .set = py_srvsvc_Statistics_set_bigbufneed,
   26554             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26555             :         },
   26556             :         { .name = NULL }
   26557             : };
   26558             : 
   26559           0 : static PyObject *py_srvsvc_Statistics_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   26560             : {
   26561           0 :         return pytalloc_new(struct srvsvc_Statistics, type);
   26562             : }
   26563             : 
   26564             : 
   26565             : static PyTypeObject srvsvc_Statistics_Type = {
   26566             :         PyVarObject_HEAD_INIT(NULL, 0)
   26567             :         .tp_name = "srvsvc.Statistics",
   26568             :         .tp_getset = py_srvsvc_Statistics_getsetters,
   26569             :         .tp_methods = NULL,
   26570             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   26571             :         .tp_new = py_srvsvc_Statistics_new,
   26572             : };
   26573             : 
   26574             : 
   26575           0 : static PyObject *py_srvsvc_NetTransportInfo0_get_vcs(PyObject *obj, void *closure)
   26576             : {
   26577           0 :         struct srvsvc_NetTransportInfo0 *object = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(obj);
   26578             :         PyObject *py_vcs;
   26579           0 :         py_vcs = PyLong_FromUnsignedLongLong((uint32_t)object->vcs);
   26580           0 :         return py_vcs;
   26581             : }
   26582             : 
   26583           0 : static int py_srvsvc_NetTransportInfo0_set_vcs(PyObject *py_obj, PyObject *value, void *closure)
   26584             : {
   26585           0 :         struct srvsvc_NetTransportInfo0 *object = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(py_obj);
   26586           0 :         if (value == NULL) {
   26587           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->vcs");
   26588           0 :                 return -1;
   26589             :         }
   26590             :         {
   26591           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->vcs));
   26592           0 :                 if (PyLong_Check(value)) {
   26593             :                         unsigned long long test_var;
   26594           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26595           0 :                         if (PyErr_Occurred() != NULL) {
   26596           0 :                                 return -1;
   26597             :                         }
   26598           0 :                         if (test_var > uint_max) {
   26599           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26600             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26601           0 :                                 return -1;
   26602             :                         }
   26603           0 :                         object->vcs = test_var;
   26604             :                 } else {
   26605           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26606             :                           PyLong_Type.tp_name);
   26607           0 :                         return -1;
   26608             :                 }
   26609             :         }
   26610           0 :         return 0;
   26611             : }
   26612             : 
   26613           0 : static PyObject *py_srvsvc_NetTransportInfo0_get_name(PyObject *obj, void *closure)
   26614             : {
   26615           0 :         struct srvsvc_NetTransportInfo0 *object = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(obj);
   26616             :         PyObject *py_name;
   26617           0 :         if (object->name == NULL) {
   26618           0 :                 Py_RETURN_NONE;
   26619             :         }
   26620           0 :         if (object->name == NULL) {
   26621           0 :                 py_name = Py_None;
   26622           0 :                 Py_INCREF(py_name);
   26623             :         } else {
   26624           0 :                 if (object->name == NULL) {
   26625           0 :                         py_name = Py_None;
   26626           0 :                         Py_INCREF(py_name);
   26627             :                 } else {
   26628           0 :                         py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
   26629             :                 }
   26630             :         }
   26631           0 :         return py_name;
   26632             : }
   26633             : 
   26634           0 : static int py_srvsvc_NetTransportInfo0_set_name(PyObject *py_obj, PyObject *value, void *closure)
   26635             : {
   26636           0 :         struct srvsvc_NetTransportInfo0 *object = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(py_obj);
   26637           0 :         if (value == NULL) {
   26638           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->name");
   26639           0 :                 return -1;
   26640             :         }
   26641           0 :         if (value == Py_None) {
   26642           0 :                 object->name = NULL;
   26643             :         } else {
   26644           0 :                 object->name = NULL;
   26645             :                 {
   26646             :                         const char *test_str;
   26647             :                         const char *talloc_str;
   26648           0 :                         PyObject *unicode = NULL;
   26649           0 :                         if (PyUnicode_Check(value)) {
   26650           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   26651           0 :                                 if (unicode == NULL) {
   26652           0 :                                         PyErr_NoMemory();
   26653           0 :                                         return -1;
   26654             :                                 }
   26655           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   26656           0 :                         } else if (PyBytes_Check(value)) {
   26657           0 :                                 test_str = PyBytes_AS_STRING(value);
   26658             :                         } else {
   26659           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   26660           0 :                                 return -1;
   26661             :                         }
   26662           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   26663           0 :                         if (unicode != NULL) {
   26664           0 :                                 Py_DECREF(unicode);
   26665             :                         }
   26666           0 :                         if (talloc_str == NULL) {
   26667           0 :                                 PyErr_NoMemory();
   26668           0 :                                 return -1;
   26669             :                         }
   26670           0 :                         object->name = talloc_str;
   26671             :                 }
   26672             :         }
   26673           0 :         return 0;
   26674             : }
   26675             : 
   26676           0 : static PyObject *py_srvsvc_NetTransportInfo0_get_addr(PyObject *obj, void *closure)
   26677             : {
   26678           0 :         struct srvsvc_NetTransportInfo0 *object = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(obj);
   26679             :         PyObject *py_addr;
   26680           0 :         if (object->addr == NULL) {
   26681           0 :                 Py_RETURN_NONE;
   26682             :         }
   26683           0 :         if (object->addr == NULL) {
   26684           0 :                 py_addr = Py_None;
   26685           0 :                 Py_INCREF(py_addr);
   26686             :         } else {
   26687           0 :                 py_addr = PyList_New(object->addr_len);
   26688           0 :                 if (py_addr == NULL) {
   26689           0 :                         return NULL;
   26690             :                 }
   26691             :                 {
   26692             :                         int addr_cntr_1;
   26693           0 :                         for (addr_cntr_1 = 0; addr_cntr_1 < (object->addr_len); addr_cntr_1++) {
   26694             :                                 PyObject *py_addr_1;
   26695           0 :                                 py_addr_1 = PyLong_FromLong((uint16_t)object->addr[addr_cntr_1]);
   26696           0 :                                 PyList_SetItem(py_addr, addr_cntr_1, py_addr_1);
   26697             :                         }
   26698             :                 }
   26699             :         }
   26700           0 :         return py_addr;
   26701             : }
   26702             : 
   26703           0 : static int py_srvsvc_NetTransportInfo0_set_addr(PyObject *py_obj, PyObject *value, void *closure)
   26704             : {
   26705           0 :         struct srvsvc_NetTransportInfo0 *object = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(py_obj);
   26706           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->addr));
   26707           0 :         if (value == NULL) {
   26708           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr");
   26709           0 :                 return -1;
   26710             :         }
   26711           0 :         if (value == Py_None) {
   26712           0 :                 object->addr = NULL;
   26713             :         } else {
   26714           0 :                 object->addr = NULL;
   26715           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   26716             :                 {
   26717             :                         int addr_cntr_1;
   26718           0 :                         object->addr = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->addr, PyList_GET_SIZE(value));
   26719           0 :                         if (!object->addr) { return -1;; }
   26720           0 :                         talloc_set_name_const(object->addr, "ARRAY: object->addr");
   26721           0 :                         for (addr_cntr_1 = 0; addr_cntr_1 < PyList_GET_SIZE(value); addr_cntr_1++) {
   26722           0 :                                 if (PyList_GET_ITEM(value, addr_cntr_1) == NULL) {
   26723           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr[addr_cntr_1]");
   26724           0 :                                         return -1;
   26725             :                                 }
   26726             :                                 {
   26727           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr[addr_cntr_1]));
   26728           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, addr_cntr_1))) {
   26729             :                                                 unsigned long long test_var;
   26730           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, addr_cntr_1));
   26731           0 :                                                 if (PyErr_Occurred() != NULL) {
   26732           0 :                                                         return -1;
   26733             :                                                 }
   26734           0 :                                                 if (test_var > uint_max) {
   26735           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26736             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   26737           0 :                                                         return -1;
   26738             :                                                 }
   26739           0 :                                                 object->addr[addr_cntr_1] = test_var;
   26740             :                                         } else {
   26741           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   26742             :                                                   PyLong_Type.tp_name);
   26743           0 :                                                 return -1;
   26744             :                                         }
   26745             :                                 }
   26746             :                         }
   26747             :                 }
   26748             :         }
   26749           0 :         return 0;
   26750             : }
   26751             : 
   26752           0 : static PyObject *py_srvsvc_NetTransportInfo0_get_addr_len(PyObject *obj, void *closure)
   26753             : {
   26754           0 :         struct srvsvc_NetTransportInfo0 *object = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(obj);
   26755             :         PyObject *py_addr_len;
   26756           0 :         py_addr_len = PyLong_FromUnsignedLongLong((uint32_t)object->addr_len);
   26757           0 :         return py_addr_len;
   26758             : }
   26759             : 
   26760           0 : static int py_srvsvc_NetTransportInfo0_set_addr_len(PyObject *py_obj, PyObject *value, void *closure)
   26761             : {
   26762           0 :         struct srvsvc_NetTransportInfo0 *object = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(py_obj);
   26763           0 :         if (value == NULL) {
   26764           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr_len");
   26765           0 :                 return -1;
   26766             :         }
   26767             :         {
   26768           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr_len));
   26769           0 :                 if (PyLong_Check(value)) {
   26770             :                         unsigned long long test_var;
   26771           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26772           0 :                         if (PyErr_Occurred() != NULL) {
   26773           0 :                                 return -1;
   26774             :                         }
   26775           0 :                         if (test_var > uint_max) {
   26776           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26777             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26778           0 :                                 return -1;
   26779             :                         }
   26780           0 :                         object->addr_len = test_var;
   26781             :                 } else {
   26782           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26783             :                           PyLong_Type.tp_name);
   26784           0 :                         return -1;
   26785             :                 }
   26786             :         }
   26787           0 :         return 0;
   26788             : }
   26789             : 
   26790           0 : static PyObject *py_srvsvc_NetTransportInfo0_get_net_addr(PyObject *obj, void *closure)
   26791             : {
   26792           0 :         struct srvsvc_NetTransportInfo0 *object = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(obj);
   26793             :         PyObject *py_net_addr;
   26794           0 :         if (object->net_addr == NULL) {
   26795           0 :                 Py_RETURN_NONE;
   26796             :         }
   26797           0 :         if (object->net_addr == NULL) {
   26798           0 :                 py_net_addr = Py_None;
   26799           0 :                 Py_INCREF(py_net_addr);
   26800             :         } else {
   26801           0 :                 if (object->net_addr == NULL) {
   26802           0 :                         py_net_addr = Py_None;
   26803           0 :                         Py_INCREF(py_net_addr);
   26804             :                 } else {
   26805           0 :                         py_net_addr = PyUnicode_Decode(object->net_addr, strlen(object->net_addr), "utf-8", "ignore");
   26806             :                 }
   26807             :         }
   26808           0 :         return py_net_addr;
   26809             : }
   26810             : 
   26811           0 : static int py_srvsvc_NetTransportInfo0_set_net_addr(PyObject *py_obj, PyObject *value, void *closure)
   26812             : {
   26813           0 :         struct srvsvc_NetTransportInfo0 *object = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(py_obj);
   26814           0 :         if (value == NULL) {
   26815           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->net_addr");
   26816           0 :                 return -1;
   26817             :         }
   26818           0 :         if (value == Py_None) {
   26819           0 :                 object->net_addr = NULL;
   26820             :         } else {
   26821           0 :                 object->net_addr = NULL;
   26822             :                 {
   26823             :                         const char *test_str;
   26824             :                         const char *talloc_str;
   26825           0 :                         PyObject *unicode = NULL;
   26826           0 :                         if (PyUnicode_Check(value)) {
   26827           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   26828           0 :                                 if (unicode == NULL) {
   26829           0 :                                         PyErr_NoMemory();
   26830           0 :                                         return -1;
   26831             :                                 }
   26832           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   26833           0 :                         } else if (PyBytes_Check(value)) {
   26834           0 :                                 test_str = PyBytes_AS_STRING(value);
   26835             :                         } else {
   26836           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   26837           0 :                                 return -1;
   26838             :                         }
   26839           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   26840           0 :                         if (unicode != NULL) {
   26841           0 :                                 Py_DECREF(unicode);
   26842             :                         }
   26843           0 :                         if (talloc_str == NULL) {
   26844           0 :                                 PyErr_NoMemory();
   26845           0 :                                 return -1;
   26846             :                         }
   26847           0 :                         object->net_addr = talloc_str;
   26848             :                 }
   26849             :         }
   26850           0 :         return 0;
   26851             : }
   26852             : 
   26853             : static PyGetSetDef py_srvsvc_NetTransportInfo0_getsetters[] = {
   26854             :         {
   26855             :                 .name = discard_const_p(char, "vcs"),
   26856             :                 .get = py_srvsvc_NetTransportInfo0_get_vcs,
   26857             :                 .set = py_srvsvc_NetTransportInfo0_set_vcs,
   26858             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26859             :         },
   26860             :         {
   26861             :                 .name = discard_const_p(char, "name"),
   26862             :                 .get = py_srvsvc_NetTransportInfo0_get_name,
   26863             :                 .set = py_srvsvc_NetTransportInfo0_set_name,
   26864             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   26865             :         },
   26866             :         {
   26867             :                 .name = discard_const_p(char, "addr"),
   26868             :                 .get = py_srvsvc_NetTransportInfo0_get_addr,
   26869             :                 .set = py_srvsvc_NetTransportInfo0_set_addr,
   26870             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   26871             :         },
   26872             :         {
   26873             :                 .name = discard_const_p(char, "addr_len"),
   26874             :                 .get = py_srvsvc_NetTransportInfo0_get_addr_len,
   26875             :                 .set = py_srvsvc_NetTransportInfo0_set_addr_len,
   26876             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26877             :         },
   26878             :         {
   26879             :                 .name = discard_const_p(char, "net_addr"),
   26880             :                 .get = py_srvsvc_NetTransportInfo0_get_net_addr,
   26881             :                 .set = py_srvsvc_NetTransportInfo0_set_net_addr,
   26882             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   26883             :         },
   26884             :         { .name = NULL }
   26885             : };
   26886             : 
   26887           0 : static PyObject *py_srvsvc_NetTransportInfo0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   26888             : {
   26889           0 :         return pytalloc_new(struct srvsvc_NetTransportInfo0, type);
   26890             : }
   26891             : 
   26892             : 
   26893             : static PyTypeObject srvsvc_NetTransportInfo0_Type = {
   26894             :         PyVarObject_HEAD_INIT(NULL, 0)
   26895             :         .tp_name = "srvsvc.NetTransportInfo0",
   26896             :         .tp_getset = py_srvsvc_NetTransportInfo0_getsetters,
   26897             :         .tp_methods = NULL,
   26898             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   26899             :         .tp_new = py_srvsvc_NetTransportInfo0_new,
   26900             : };
   26901             : 
   26902             : 
   26903           0 : static PyObject *py_srvsvc_NetTransportCtr0_get_count(PyObject *obj, void *closure)
   26904             : {
   26905           0 :         struct srvsvc_NetTransportCtr0 *object = (struct srvsvc_NetTransportCtr0 *)pytalloc_get_ptr(obj);
   26906             :         PyObject *py_count;
   26907           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
   26908           0 :         return py_count;
   26909             : }
   26910             : 
   26911           0 : static int py_srvsvc_NetTransportCtr0_set_count(PyObject *py_obj, PyObject *value, void *closure)
   26912             : {
   26913           0 :         struct srvsvc_NetTransportCtr0 *object = (struct srvsvc_NetTransportCtr0 *)pytalloc_get_ptr(py_obj);
   26914           0 :         if (value == NULL) {
   26915           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   26916           0 :                 return -1;
   26917             :         }
   26918             :         {
   26919           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   26920           0 :                 if (PyLong_Check(value)) {
   26921             :                         unsigned long long test_var;
   26922           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26923           0 :                         if (PyErr_Occurred() != NULL) {
   26924           0 :                                 return -1;
   26925             :                         }
   26926           0 :                         if (test_var > uint_max) {
   26927           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26928             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26929           0 :                                 return -1;
   26930             :                         }
   26931           0 :                         object->count = test_var;
   26932             :                 } else {
   26933           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26934             :                           PyLong_Type.tp_name);
   26935           0 :                         return -1;
   26936             :                 }
   26937             :         }
   26938           0 :         return 0;
   26939             : }
   26940             : 
   26941           0 : static PyObject *py_srvsvc_NetTransportCtr0_get_array(PyObject *obj, void *closure)
   26942             : {
   26943           0 :         struct srvsvc_NetTransportCtr0 *object = (struct srvsvc_NetTransportCtr0 *)pytalloc_get_ptr(obj);
   26944             :         PyObject *py_array;
   26945           0 :         if (object->array == NULL) {
   26946           0 :                 Py_RETURN_NONE;
   26947             :         }
   26948           0 :         if (object->array == NULL) {
   26949           0 :                 py_array = Py_None;
   26950           0 :                 Py_INCREF(py_array);
   26951             :         } else {
   26952           0 :                 py_array = PyList_New(object->count);
   26953           0 :                 if (py_array == NULL) {
   26954           0 :                         return NULL;
   26955             :                 }
   26956             :                 {
   26957             :                         int array_cntr_1;
   26958           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
   26959             :                                 PyObject *py_array_1;
   26960           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetTransportInfo0_Type, object->array, &object->array[array_cntr_1]);
   26961           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
   26962             :                         }
   26963             :                 }
   26964             :         }
   26965           0 :         return py_array;
   26966             : }
   26967             : 
   26968           0 : static int py_srvsvc_NetTransportCtr0_set_array(PyObject *py_obj, PyObject *value, void *closure)
   26969             : {
   26970           0 :         struct srvsvc_NetTransportCtr0 *object = (struct srvsvc_NetTransportCtr0 *)pytalloc_get_ptr(py_obj);
   26971           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
   26972           0 :         if (value == NULL) {
   26973           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
   26974           0 :                 return -1;
   26975             :         }
   26976           0 :         if (value == Py_None) {
   26977           0 :                 object->array = NULL;
   26978             :         } else {
   26979           0 :                 object->array = NULL;
   26980           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   26981             :                 {
   26982             :                         int array_cntr_1;
   26983           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   26984           0 :                         if (!object->array) { return -1;; }
   26985           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
   26986           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
   26987           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
   26988           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
   26989           0 :                                         return -1;
   26990             :                                 }
   26991           0 :                                 PY_CHECK_TYPE(&srvsvc_NetTransportInfo0_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
   26992           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
   26993           0 :                                         PyErr_NoMemory();
   26994           0 :                                         return -1;
   26995             :                                 }
   26996           0 :                                 object->array[array_cntr_1] = *(struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
   26997             :                         }
   26998             :                 }
   26999             :         }
   27000           0 :         return 0;
   27001             : }
   27002             : 
   27003             : static PyGetSetDef py_srvsvc_NetTransportCtr0_getsetters[] = {
   27004             :         {
   27005             :                 .name = discard_const_p(char, "count"),
   27006             :                 .get = py_srvsvc_NetTransportCtr0_get_count,
   27007             :                 .set = py_srvsvc_NetTransportCtr0_set_count,
   27008             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   27009             :         },
   27010             :         {
   27011             :                 .name = discard_const_p(char, "array"),
   27012             :                 .get = py_srvsvc_NetTransportCtr0_get_array,
   27013             :                 .set = py_srvsvc_NetTransportCtr0_set_array,
   27014             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetTransportInfo0")
   27015             :         },
   27016             :         { .name = NULL }
   27017             : };
   27018             : 
   27019           0 : static PyObject *py_srvsvc_NetTransportCtr0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   27020             : {
   27021           0 :         return pytalloc_new(struct srvsvc_NetTransportCtr0, type);
   27022             : }
   27023             : 
   27024             : 
   27025             : static PyTypeObject srvsvc_NetTransportCtr0_Type = {
   27026             :         PyVarObject_HEAD_INIT(NULL, 0)
   27027             :         .tp_name = "srvsvc.NetTransportCtr0",
   27028             :         .tp_getset = py_srvsvc_NetTransportCtr0_getsetters,
   27029             :         .tp_methods = NULL,
   27030             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   27031             :         .tp_new = py_srvsvc_NetTransportCtr0_new,
   27032             : };
   27033             : 
   27034             : 
   27035           0 : static PyObject *py_srvsvc_NetTransportInfo1_get_vcs(PyObject *obj, void *closure)
   27036             : {
   27037           0 :         struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(obj);
   27038             :         PyObject *py_vcs;
   27039           0 :         py_vcs = PyLong_FromUnsignedLongLong((uint32_t)object->vcs);
   27040           0 :         return py_vcs;
   27041             : }
   27042             : 
   27043           0 : static int py_srvsvc_NetTransportInfo1_set_vcs(PyObject *py_obj, PyObject *value, void *closure)
   27044             : {
   27045           0 :         struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(py_obj);
   27046           0 :         if (value == NULL) {
   27047           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->vcs");
   27048           0 :                 return -1;
   27049             :         }
   27050             :         {
   27051           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->vcs));
   27052           0 :                 if (PyLong_Check(value)) {
   27053             :                         unsigned long long test_var;
   27054           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27055           0 :                         if (PyErr_Occurred() != NULL) {
   27056           0 :                                 return -1;
   27057             :                         }
   27058           0 :                         if (test_var > uint_max) {
   27059           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27060             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27061           0 :                                 return -1;
   27062             :                         }
   27063           0 :                         object->vcs = test_var;
   27064             :                 } else {
   27065           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27066             :                           PyLong_Type.tp_name);
   27067           0 :                         return -1;
   27068             :                 }
   27069             :         }
   27070           0 :         return 0;
   27071             : }
   27072             : 
   27073           0 : static PyObject *py_srvsvc_NetTransportInfo1_get_name(PyObject *obj, void *closure)
   27074             : {
   27075           0 :         struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(obj);
   27076             :         PyObject *py_name;
   27077           0 :         if (object->name == NULL) {
   27078           0 :                 Py_RETURN_NONE;
   27079             :         }
   27080           0 :         if (object->name == NULL) {
   27081           0 :                 py_name = Py_None;
   27082           0 :                 Py_INCREF(py_name);
   27083             :         } else {
   27084           0 :                 if (object->name == NULL) {
   27085           0 :                         py_name = Py_None;
   27086           0 :                         Py_INCREF(py_name);
   27087             :                 } else {
   27088           0 :                         py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
   27089             :                 }
   27090             :         }
   27091           0 :         return py_name;
   27092             : }
   27093             : 
   27094           0 : static int py_srvsvc_NetTransportInfo1_set_name(PyObject *py_obj, PyObject *value, void *closure)
   27095             : {
   27096           0 :         struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(py_obj);
   27097           0 :         if (value == NULL) {
   27098           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->name");
   27099           0 :                 return -1;
   27100             :         }
   27101           0 :         if (value == Py_None) {
   27102           0 :                 object->name = NULL;
   27103             :         } else {
   27104           0 :                 object->name = NULL;
   27105             :                 {
   27106             :                         const char *test_str;
   27107             :                         const char *talloc_str;
   27108           0 :                         PyObject *unicode = NULL;
   27109           0 :                         if (PyUnicode_Check(value)) {
   27110           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   27111           0 :                                 if (unicode == NULL) {
   27112           0 :                                         PyErr_NoMemory();
   27113           0 :                                         return -1;
   27114             :                                 }
   27115           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   27116           0 :                         } else if (PyBytes_Check(value)) {
   27117           0 :                                 test_str = PyBytes_AS_STRING(value);
   27118             :                         } else {
   27119           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   27120           0 :                                 return -1;
   27121             :                         }
   27122           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   27123           0 :                         if (unicode != NULL) {
   27124           0 :                                 Py_DECREF(unicode);
   27125             :                         }
   27126           0 :                         if (talloc_str == NULL) {
   27127           0 :                                 PyErr_NoMemory();
   27128           0 :                                 return -1;
   27129             :                         }
   27130           0 :                         object->name = talloc_str;
   27131             :                 }
   27132             :         }
   27133           0 :         return 0;
   27134             : }
   27135             : 
   27136           0 : static PyObject *py_srvsvc_NetTransportInfo1_get_addr(PyObject *obj, void *closure)
   27137             : {
   27138           0 :         struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(obj);
   27139             :         PyObject *py_addr;
   27140           0 :         if (object->addr == NULL) {
   27141           0 :                 Py_RETURN_NONE;
   27142             :         }
   27143           0 :         if (object->addr == NULL) {
   27144           0 :                 py_addr = Py_None;
   27145           0 :                 Py_INCREF(py_addr);
   27146             :         } else {
   27147           0 :                 py_addr = PyList_New(object->addr_len);
   27148           0 :                 if (py_addr == NULL) {
   27149           0 :                         return NULL;
   27150             :                 }
   27151             :                 {
   27152             :                         int addr_cntr_1;
   27153           0 :                         for (addr_cntr_1 = 0; addr_cntr_1 < (object->addr_len); addr_cntr_1++) {
   27154             :                                 PyObject *py_addr_1;
   27155           0 :                                 py_addr_1 = PyLong_FromLong((uint16_t)object->addr[addr_cntr_1]);
   27156           0 :                                 PyList_SetItem(py_addr, addr_cntr_1, py_addr_1);
   27157             :                         }
   27158             :                 }
   27159             :         }
   27160           0 :         return py_addr;
   27161             : }
   27162             : 
   27163           0 : static int py_srvsvc_NetTransportInfo1_set_addr(PyObject *py_obj, PyObject *value, void *closure)
   27164             : {
   27165           0 :         struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(py_obj);
   27166           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->addr));
   27167           0 :         if (value == NULL) {
   27168           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr");
   27169           0 :                 return -1;
   27170             :         }
   27171           0 :         if (value == Py_None) {
   27172           0 :                 object->addr = NULL;
   27173             :         } else {
   27174           0 :                 object->addr = NULL;
   27175           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   27176             :                 {
   27177             :                         int addr_cntr_1;
   27178           0 :                         object->addr = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->addr, PyList_GET_SIZE(value));
   27179           0 :                         if (!object->addr) { return -1;; }
   27180           0 :                         talloc_set_name_const(object->addr, "ARRAY: object->addr");
   27181           0 :                         for (addr_cntr_1 = 0; addr_cntr_1 < PyList_GET_SIZE(value); addr_cntr_1++) {
   27182           0 :                                 if (PyList_GET_ITEM(value, addr_cntr_1) == NULL) {
   27183           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr[addr_cntr_1]");
   27184           0 :                                         return -1;
   27185             :                                 }
   27186             :                                 {
   27187           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr[addr_cntr_1]));
   27188           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, addr_cntr_1))) {
   27189             :                                                 unsigned long long test_var;
   27190           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, addr_cntr_1));
   27191           0 :                                                 if (PyErr_Occurred() != NULL) {
   27192           0 :                                                         return -1;
   27193             :                                                 }
   27194           0 :                                                 if (test_var > uint_max) {
   27195           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27196             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   27197           0 :                                                         return -1;
   27198             :                                                 }
   27199           0 :                                                 object->addr[addr_cntr_1] = test_var;
   27200             :                                         } else {
   27201           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   27202             :                                                   PyLong_Type.tp_name);
   27203           0 :                                                 return -1;
   27204             :                                         }
   27205             :                                 }
   27206             :                         }
   27207             :                 }
   27208             :         }
   27209           0 :         return 0;
   27210             : }
   27211             : 
   27212           0 : static PyObject *py_srvsvc_NetTransportInfo1_get_addr_len(PyObject *obj, void *closure)
   27213             : {
   27214           0 :         struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(obj);
   27215             :         PyObject *py_addr_len;
   27216           0 :         py_addr_len = PyLong_FromUnsignedLongLong((uint32_t)object->addr_len);
   27217           0 :         return py_addr_len;
   27218             : }
   27219             : 
   27220           0 : static int py_srvsvc_NetTransportInfo1_set_addr_len(PyObject *py_obj, PyObject *value, void *closure)
   27221             : {
   27222           0 :         struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(py_obj);
   27223           0 :         if (value == NULL) {
   27224           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr_len");
   27225           0 :                 return -1;
   27226             :         }
   27227             :         {
   27228           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr_len));
   27229           0 :                 if (PyLong_Check(value)) {
   27230             :                         unsigned long long test_var;
   27231           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27232           0 :                         if (PyErr_Occurred() != NULL) {
   27233           0 :                                 return -1;
   27234             :                         }
   27235           0 :                         if (test_var > uint_max) {
   27236           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27237             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27238           0 :                                 return -1;
   27239             :                         }
   27240           0 :                         object->addr_len = test_var;
   27241             :                 } else {
   27242           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27243             :                           PyLong_Type.tp_name);
   27244           0 :                         return -1;
   27245             :                 }
   27246             :         }
   27247           0 :         return 0;
   27248             : }
   27249             : 
   27250           0 : static PyObject *py_srvsvc_NetTransportInfo1_get_net_addr(PyObject *obj, void *closure)
   27251             : {
   27252           0 :         struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(obj);
   27253             :         PyObject *py_net_addr;
   27254           0 :         if (object->net_addr == NULL) {
   27255           0 :                 Py_RETURN_NONE;
   27256             :         }
   27257           0 :         if (object->net_addr == NULL) {
   27258           0 :                 py_net_addr = Py_None;
   27259           0 :                 Py_INCREF(py_net_addr);
   27260             :         } else {
   27261           0 :                 if (object->net_addr == NULL) {
   27262           0 :                         py_net_addr = Py_None;
   27263           0 :                         Py_INCREF(py_net_addr);
   27264             :                 } else {
   27265           0 :                         py_net_addr = PyUnicode_Decode(object->net_addr, strlen(object->net_addr), "utf-8", "ignore");
   27266             :                 }
   27267             :         }
   27268           0 :         return py_net_addr;
   27269             : }
   27270             : 
   27271           0 : static int py_srvsvc_NetTransportInfo1_set_net_addr(PyObject *py_obj, PyObject *value, void *closure)
   27272             : {
   27273           0 :         struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(py_obj);
   27274           0 :         if (value == NULL) {
   27275           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->net_addr");
   27276           0 :                 return -1;
   27277             :         }
   27278           0 :         if (value == Py_None) {
   27279           0 :                 object->net_addr = NULL;
   27280             :         } else {
   27281           0 :                 object->net_addr = NULL;
   27282             :                 {
   27283             :                         const char *test_str;
   27284             :                         const char *talloc_str;
   27285           0 :                         PyObject *unicode = NULL;
   27286           0 :                         if (PyUnicode_Check(value)) {
   27287           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   27288           0 :                                 if (unicode == NULL) {
   27289           0 :                                         PyErr_NoMemory();
   27290           0 :                                         return -1;
   27291             :                                 }
   27292           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   27293           0 :                         } else if (PyBytes_Check(value)) {
   27294           0 :                                 test_str = PyBytes_AS_STRING(value);
   27295             :                         } else {
   27296           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   27297           0 :                                 return -1;
   27298             :                         }
   27299           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   27300           0 :                         if (unicode != NULL) {
   27301           0 :                                 Py_DECREF(unicode);
   27302             :                         }
   27303           0 :                         if (talloc_str == NULL) {
   27304           0 :                                 PyErr_NoMemory();
   27305           0 :                                 return -1;
   27306             :                         }
   27307           0 :                         object->net_addr = talloc_str;
   27308             :                 }
   27309             :         }
   27310           0 :         return 0;
   27311             : }
   27312             : 
   27313           0 : static PyObject *py_srvsvc_NetTransportInfo1_get_domain(PyObject *obj, void *closure)
   27314             : {
   27315           0 :         struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(obj);
   27316             :         PyObject *py_domain;
   27317           0 :         if (object->domain == NULL) {
   27318           0 :                 Py_RETURN_NONE;
   27319             :         }
   27320           0 :         if (object->domain == NULL) {
   27321           0 :                 py_domain = Py_None;
   27322           0 :                 Py_INCREF(py_domain);
   27323             :         } else {
   27324           0 :                 if (object->domain == NULL) {
   27325           0 :                         py_domain = Py_None;
   27326           0 :                         Py_INCREF(py_domain);
   27327             :                 } else {
   27328           0 :                         py_domain = PyUnicode_Decode(object->domain, strlen(object->domain), "utf-8", "ignore");
   27329             :                 }
   27330             :         }
   27331           0 :         return py_domain;
   27332             : }
   27333             : 
   27334           0 : static int py_srvsvc_NetTransportInfo1_set_domain(PyObject *py_obj, PyObject *value, void *closure)
   27335             : {
   27336           0 :         struct srvsvc_NetTransportInfo1 *object = (struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(py_obj);
   27337           0 :         if (value == NULL) {
   27338           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain");
   27339           0 :                 return -1;
   27340             :         }
   27341           0 :         if (value == Py_None) {
   27342           0 :                 object->domain = NULL;
   27343             :         } else {
   27344           0 :                 object->domain = NULL;
   27345             :                 {
   27346             :                         const char *test_str;
   27347             :                         const char *talloc_str;
   27348           0 :                         PyObject *unicode = NULL;
   27349           0 :                         if (PyUnicode_Check(value)) {
   27350           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   27351           0 :                                 if (unicode == NULL) {
   27352           0 :                                         PyErr_NoMemory();
   27353           0 :                                         return -1;
   27354             :                                 }
   27355           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   27356           0 :                         } else if (PyBytes_Check(value)) {
   27357           0 :                                 test_str = PyBytes_AS_STRING(value);
   27358             :                         } else {
   27359           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   27360           0 :                                 return -1;
   27361             :                         }
   27362           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   27363           0 :                         if (unicode != NULL) {
   27364           0 :                                 Py_DECREF(unicode);
   27365             :                         }
   27366           0 :                         if (talloc_str == NULL) {
   27367           0 :                                 PyErr_NoMemory();
   27368           0 :                                 return -1;
   27369             :                         }
   27370           0 :                         object->domain = talloc_str;
   27371             :                 }
   27372             :         }
   27373           0 :         return 0;
   27374             : }
   27375             : 
   27376             : static PyGetSetDef py_srvsvc_NetTransportInfo1_getsetters[] = {
   27377             :         {
   27378             :                 .name = discard_const_p(char, "vcs"),
   27379             :                 .get = py_srvsvc_NetTransportInfo1_get_vcs,
   27380             :                 .set = py_srvsvc_NetTransportInfo1_set_vcs,
   27381             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   27382             :         },
   27383             :         {
   27384             :                 .name = discard_const_p(char, "name"),
   27385             :                 .get = py_srvsvc_NetTransportInfo1_get_name,
   27386             :                 .set = py_srvsvc_NetTransportInfo1_set_name,
   27387             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   27388             :         },
   27389             :         {
   27390             :                 .name = discard_const_p(char, "addr"),
   27391             :                 .get = py_srvsvc_NetTransportInfo1_get_addr,
   27392             :                 .set = py_srvsvc_NetTransportInfo1_set_addr,
   27393             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   27394             :         },
   27395             :         {
   27396             :                 .name = discard_const_p(char, "addr_len"),
   27397             :                 .get = py_srvsvc_NetTransportInfo1_get_addr_len,
   27398             :                 .set = py_srvsvc_NetTransportInfo1_set_addr_len,
   27399             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   27400             :         },
   27401             :         {
   27402             :                 .name = discard_const_p(char, "net_addr"),
   27403             :                 .get = py_srvsvc_NetTransportInfo1_get_net_addr,
   27404             :                 .set = py_srvsvc_NetTransportInfo1_set_net_addr,
   27405             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   27406             :         },
   27407             :         {
   27408             :                 .name = discard_const_p(char, "domain"),
   27409             :                 .get = py_srvsvc_NetTransportInfo1_get_domain,
   27410             :                 .set = py_srvsvc_NetTransportInfo1_set_domain,
   27411             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   27412             :         },
   27413             :         { .name = NULL }
   27414             : };
   27415             : 
   27416           0 : static PyObject *py_srvsvc_NetTransportInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   27417             : {
   27418           0 :         return pytalloc_new(struct srvsvc_NetTransportInfo1, type);
   27419             : }
   27420             : 
   27421             : 
   27422             : static PyTypeObject srvsvc_NetTransportInfo1_Type = {
   27423             :         PyVarObject_HEAD_INIT(NULL, 0)
   27424             :         .tp_name = "srvsvc.NetTransportInfo1",
   27425             :         .tp_getset = py_srvsvc_NetTransportInfo1_getsetters,
   27426             :         .tp_methods = NULL,
   27427             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   27428             :         .tp_new = py_srvsvc_NetTransportInfo1_new,
   27429             : };
   27430             : 
   27431             : 
   27432           0 : static PyObject *py_srvsvc_NetTransportCtr1_get_count(PyObject *obj, void *closure)
   27433             : {
   27434           0 :         struct srvsvc_NetTransportCtr1 *object = (struct srvsvc_NetTransportCtr1 *)pytalloc_get_ptr(obj);
   27435             :         PyObject *py_count;
   27436           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
   27437           0 :         return py_count;
   27438             : }
   27439             : 
   27440           0 : static int py_srvsvc_NetTransportCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
   27441             : {
   27442           0 :         struct srvsvc_NetTransportCtr1 *object = (struct srvsvc_NetTransportCtr1 *)pytalloc_get_ptr(py_obj);
   27443           0 :         if (value == NULL) {
   27444           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   27445           0 :                 return -1;
   27446             :         }
   27447             :         {
   27448           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   27449           0 :                 if (PyLong_Check(value)) {
   27450             :                         unsigned long long test_var;
   27451           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27452           0 :                         if (PyErr_Occurred() != NULL) {
   27453           0 :                                 return -1;
   27454             :                         }
   27455           0 :                         if (test_var > uint_max) {
   27456           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27457             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27458           0 :                                 return -1;
   27459             :                         }
   27460           0 :                         object->count = test_var;
   27461             :                 } else {
   27462           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27463             :                           PyLong_Type.tp_name);
   27464           0 :                         return -1;
   27465             :                 }
   27466             :         }
   27467           0 :         return 0;
   27468             : }
   27469             : 
   27470           0 : static PyObject *py_srvsvc_NetTransportCtr1_get_array(PyObject *obj, void *closure)
   27471             : {
   27472           0 :         struct srvsvc_NetTransportCtr1 *object = (struct srvsvc_NetTransportCtr1 *)pytalloc_get_ptr(obj);
   27473             :         PyObject *py_array;
   27474           0 :         if (object->array == NULL) {
   27475           0 :                 Py_RETURN_NONE;
   27476             :         }
   27477           0 :         if (object->array == NULL) {
   27478           0 :                 py_array = Py_None;
   27479           0 :                 Py_INCREF(py_array);
   27480             :         } else {
   27481           0 :                 py_array = PyList_New(object->count);
   27482           0 :                 if (py_array == NULL) {
   27483           0 :                         return NULL;
   27484             :                 }
   27485             :                 {
   27486             :                         int array_cntr_1;
   27487           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
   27488             :                                 PyObject *py_array_1;
   27489           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetTransportInfo1_Type, object->array, &object->array[array_cntr_1]);
   27490           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
   27491             :                         }
   27492             :                 }
   27493             :         }
   27494           0 :         return py_array;
   27495             : }
   27496             : 
   27497           0 : static int py_srvsvc_NetTransportCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
   27498             : {
   27499           0 :         struct srvsvc_NetTransportCtr1 *object = (struct srvsvc_NetTransportCtr1 *)pytalloc_get_ptr(py_obj);
   27500           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
   27501           0 :         if (value == NULL) {
   27502           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
   27503           0 :                 return -1;
   27504             :         }
   27505           0 :         if (value == Py_None) {
   27506           0 :                 object->array = NULL;
   27507             :         } else {
   27508           0 :                 object->array = NULL;
   27509           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   27510             :                 {
   27511             :                         int array_cntr_1;
   27512           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   27513           0 :                         if (!object->array) { return -1;; }
   27514           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
   27515           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
   27516           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
   27517           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
   27518           0 :                                         return -1;
   27519             :                                 }
   27520           0 :                                 PY_CHECK_TYPE(&srvsvc_NetTransportInfo1_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
   27521           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
   27522           0 :                                         PyErr_NoMemory();
   27523           0 :                                         return -1;
   27524             :                                 }
   27525           0 :                                 object->array[array_cntr_1] = *(struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
   27526             :                         }
   27527             :                 }
   27528             :         }
   27529           0 :         return 0;
   27530             : }
   27531             : 
   27532             : static PyGetSetDef py_srvsvc_NetTransportCtr1_getsetters[] = {
   27533             :         {
   27534             :                 .name = discard_const_p(char, "count"),
   27535             :                 .get = py_srvsvc_NetTransportCtr1_get_count,
   27536             :                 .set = py_srvsvc_NetTransportCtr1_set_count,
   27537             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   27538             :         },
   27539             :         {
   27540             :                 .name = discard_const_p(char, "array"),
   27541             :                 .get = py_srvsvc_NetTransportCtr1_get_array,
   27542             :                 .set = py_srvsvc_NetTransportCtr1_set_array,
   27543             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetTransportInfo1")
   27544             :         },
   27545             :         { .name = NULL }
   27546             : };
   27547             : 
   27548           0 : static PyObject *py_srvsvc_NetTransportCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   27549             : {
   27550           0 :         return pytalloc_new(struct srvsvc_NetTransportCtr1, type);
   27551             : }
   27552             : 
   27553             : 
   27554             : static PyTypeObject srvsvc_NetTransportCtr1_Type = {
   27555             :         PyVarObject_HEAD_INIT(NULL, 0)
   27556             :         .tp_name = "srvsvc.NetTransportCtr1",
   27557             :         .tp_getset = py_srvsvc_NetTransportCtr1_getsetters,
   27558             :         .tp_methods = NULL,
   27559             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   27560             :         .tp_new = py_srvsvc_NetTransportCtr1_new,
   27561             : };
   27562             : 
   27563             : 
   27564           0 : static PyObject *py_srvsvc_NetTransportInfo2_get_vcs(PyObject *obj, void *closure)
   27565             : {
   27566           0 :         struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(obj);
   27567             :         PyObject *py_vcs;
   27568           0 :         py_vcs = PyLong_FromUnsignedLongLong((uint32_t)object->vcs);
   27569           0 :         return py_vcs;
   27570             : }
   27571             : 
   27572           0 : static int py_srvsvc_NetTransportInfo2_set_vcs(PyObject *py_obj, PyObject *value, void *closure)
   27573             : {
   27574           0 :         struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(py_obj);
   27575           0 :         if (value == NULL) {
   27576           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->vcs");
   27577           0 :                 return -1;
   27578             :         }
   27579             :         {
   27580           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->vcs));
   27581           0 :                 if (PyLong_Check(value)) {
   27582             :                         unsigned long long test_var;
   27583           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27584           0 :                         if (PyErr_Occurred() != NULL) {
   27585           0 :                                 return -1;
   27586             :                         }
   27587           0 :                         if (test_var > uint_max) {
   27588           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27589             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27590           0 :                                 return -1;
   27591             :                         }
   27592           0 :                         object->vcs = test_var;
   27593             :                 } else {
   27594           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27595             :                           PyLong_Type.tp_name);
   27596           0 :                         return -1;
   27597             :                 }
   27598             :         }
   27599           0 :         return 0;
   27600             : }
   27601             : 
   27602           0 : static PyObject *py_srvsvc_NetTransportInfo2_get_name(PyObject *obj, void *closure)
   27603             : {
   27604           0 :         struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(obj);
   27605             :         PyObject *py_name;
   27606           0 :         if (object->name == NULL) {
   27607           0 :                 Py_RETURN_NONE;
   27608             :         }
   27609           0 :         if (object->name == NULL) {
   27610           0 :                 py_name = Py_None;
   27611           0 :                 Py_INCREF(py_name);
   27612             :         } else {
   27613           0 :                 if (object->name == NULL) {
   27614           0 :                         py_name = Py_None;
   27615           0 :                         Py_INCREF(py_name);
   27616             :                 } else {
   27617           0 :                         py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
   27618             :                 }
   27619             :         }
   27620           0 :         return py_name;
   27621             : }
   27622             : 
   27623           0 : static int py_srvsvc_NetTransportInfo2_set_name(PyObject *py_obj, PyObject *value, void *closure)
   27624             : {
   27625           0 :         struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(py_obj);
   27626           0 :         if (value == NULL) {
   27627           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->name");
   27628           0 :                 return -1;
   27629             :         }
   27630           0 :         if (value == Py_None) {
   27631           0 :                 object->name = NULL;
   27632             :         } else {
   27633           0 :                 object->name = NULL;
   27634             :                 {
   27635             :                         const char *test_str;
   27636             :                         const char *talloc_str;
   27637           0 :                         PyObject *unicode = NULL;
   27638           0 :                         if (PyUnicode_Check(value)) {
   27639           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   27640           0 :                                 if (unicode == NULL) {
   27641           0 :                                         PyErr_NoMemory();
   27642           0 :                                         return -1;
   27643             :                                 }
   27644           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   27645           0 :                         } else if (PyBytes_Check(value)) {
   27646           0 :                                 test_str = PyBytes_AS_STRING(value);
   27647             :                         } else {
   27648           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   27649           0 :                                 return -1;
   27650             :                         }
   27651           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   27652           0 :                         if (unicode != NULL) {
   27653           0 :                                 Py_DECREF(unicode);
   27654             :                         }
   27655           0 :                         if (talloc_str == NULL) {
   27656           0 :                                 PyErr_NoMemory();
   27657           0 :                                 return -1;
   27658             :                         }
   27659           0 :                         object->name = talloc_str;
   27660             :                 }
   27661             :         }
   27662           0 :         return 0;
   27663             : }
   27664             : 
   27665           0 : static PyObject *py_srvsvc_NetTransportInfo2_get_addr(PyObject *obj, void *closure)
   27666             : {
   27667           0 :         struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(obj);
   27668             :         PyObject *py_addr;
   27669           0 :         if (object->addr == NULL) {
   27670           0 :                 Py_RETURN_NONE;
   27671             :         }
   27672           0 :         if (object->addr == NULL) {
   27673           0 :                 py_addr = Py_None;
   27674           0 :                 Py_INCREF(py_addr);
   27675             :         } else {
   27676           0 :                 py_addr = PyList_New(object->addr_len);
   27677           0 :                 if (py_addr == NULL) {
   27678           0 :                         return NULL;
   27679             :                 }
   27680             :                 {
   27681             :                         int addr_cntr_1;
   27682           0 :                         for (addr_cntr_1 = 0; addr_cntr_1 < (object->addr_len); addr_cntr_1++) {
   27683             :                                 PyObject *py_addr_1;
   27684           0 :                                 py_addr_1 = PyLong_FromLong((uint16_t)object->addr[addr_cntr_1]);
   27685           0 :                                 PyList_SetItem(py_addr, addr_cntr_1, py_addr_1);
   27686             :                         }
   27687             :                 }
   27688             :         }
   27689           0 :         return py_addr;
   27690             : }
   27691             : 
   27692           0 : static int py_srvsvc_NetTransportInfo2_set_addr(PyObject *py_obj, PyObject *value, void *closure)
   27693             : {
   27694           0 :         struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(py_obj);
   27695           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->addr));
   27696           0 :         if (value == NULL) {
   27697           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr");
   27698           0 :                 return -1;
   27699             :         }
   27700           0 :         if (value == Py_None) {
   27701           0 :                 object->addr = NULL;
   27702             :         } else {
   27703           0 :                 object->addr = NULL;
   27704           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   27705             :                 {
   27706             :                         int addr_cntr_1;
   27707           0 :                         object->addr = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->addr, PyList_GET_SIZE(value));
   27708           0 :                         if (!object->addr) { return -1;; }
   27709           0 :                         talloc_set_name_const(object->addr, "ARRAY: object->addr");
   27710           0 :                         for (addr_cntr_1 = 0; addr_cntr_1 < PyList_GET_SIZE(value); addr_cntr_1++) {
   27711           0 :                                 if (PyList_GET_ITEM(value, addr_cntr_1) == NULL) {
   27712           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr[addr_cntr_1]");
   27713           0 :                                         return -1;
   27714             :                                 }
   27715             :                                 {
   27716           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr[addr_cntr_1]));
   27717           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, addr_cntr_1))) {
   27718             :                                                 unsigned long long test_var;
   27719           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, addr_cntr_1));
   27720           0 :                                                 if (PyErr_Occurred() != NULL) {
   27721           0 :                                                         return -1;
   27722             :                                                 }
   27723           0 :                                                 if (test_var > uint_max) {
   27724           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27725             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   27726           0 :                                                         return -1;
   27727             :                                                 }
   27728           0 :                                                 object->addr[addr_cntr_1] = test_var;
   27729             :                                         } else {
   27730           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   27731             :                                                   PyLong_Type.tp_name);
   27732           0 :                                                 return -1;
   27733             :                                         }
   27734             :                                 }
   27735             :                         }
   27736             :                 }
   27737             :         }
   27738           0 :         return 0;
   27739             : }
   27740             : 
   27741           0 : static PyObject *py_srvsvc_NetTransportInfo2_get_addr_len(PyObject *obj, void *closure)
   27742             : {
   27743           0 :         struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(obj);
   27744             :         PyObject *py_addr_len;
   27745           0 :         py_addr_len = PyLong_FromUnsignedLongLong((uint32_t)object->addr_len);
   27746           0 :         return py_addr_len;
   27747             : }
   27748             : 
   27749           0 : static int py_srvsvc_NetTransportInfo2_set_addr_len(PyObject *py_obj, PyObject *value, void *closure)
   27750             : {
   27751           0 :         struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(py_obj);
   27752           0 :         if (value == NULL) {
   27753           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr_len");
   27754           0 :                 return -1;
   27755             :         }
   27756             :         {
   27757           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr_len));
   27758           0 :                 if (PyLong_Check(value)) {
   27759             :                         unsigned long long test_var;
   27760           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27761           0 :                         if (PyErr_Occurred() != NULL) {
   27762           0 :                                 return -1;
   27763             :                         }
   27764           0 :                         if (test_var > uint_max) {
   27765           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27766             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27767           0 :                                 return -1;
   27768             :                         }
   27769           0 :                         object->addr_len = test_var;
   27770             :                 } else {
   27771           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27772             :                           PyLong_Type.tp_name);
   27773           0 :                         return -1;
   27774             :                 }
   27775             :         }
   27776           0 :         return 0;
   27777             : }
   27778             : 
   27779           0 : static PyObject *py_srvsvc_NetTransportInfo2_get_net_addr(PyObject *obj, void *closure)
   27780             : {
   27781           0 :         struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(obj);
   27782             :         PyObject *py_net_addr;
   27783           0 :         if (object->net_addr == NULL) {
   27784           0 :                 Py_RETURN_NONE;
   27785             :         }
   27786           0 :         if (object->net_addr == NULL) {
   27787           0 :                 py_net_addr = Py_None;
   27788           0 :                 Py_INCREF(py_net_addr);
   27789             :         } else {
   27790           0 :                 if (object->net_addr == NULL) {
   27791           0 :                         py_net_addr = Py_None;
   27792           0 :                         Py_INCREF(py_net_addr);
   27793             :                 } else {
   27794           0 :                         py_net_addr = PyUnicode_Decode(object->net_addr, strlen(object->net_addr), "utf-8", "ignore");
   27795             :                 }
   27796             :         }
   27797           0 :         return py_net_addr;
   27798             : }
   27799             : 
   27800           0 : static int py_srvsvc_NetTransportInfo2_set_net_addr(PyObject *py_obj, PyObject *value, void *closure)
   27801             : {
   27802           0 :         struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(py_obj);
   27803           0 :         if (value == NULL) {
   27804           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->net_addr");
   27805           0 :                 return -1;
   27806             :         }
   27807           0 :         if (value == Py_None) {
   27808           0 :                 object->net_addr = NULL;
   27809             :         } else {
   27810           0 :                 object->net_addr = NULL;
   27811             :                 {
   27812             :                         const char *test_str;
   27813             :                         const char *talloc_str;
   27814           0 :                         PyObject *unicode = NULL;
   27815           0 :                         if (PyUnicode_Check(value)) {
   27816           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   27817           0 :                                 if (unicode == NULL) {
   27818           0 :                                         PyErr_NoMemory();
   27819           0 :                                         return -1;
   27820             :                                 }
   27821           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   27822           0 :                         } else if (PyBytes_Check(value)) {
   27823           0 :                                 test_str = PyBytes_AS_STRING(value);
   27824             :                         } else {
   27825           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   27826           0 :                                 return -1;
   27827             :                         }
   27828           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   27829           0 :                         if (unicode != NULL) {
   27830           0 :                                 Py_DECREF(unicode);
   27831             :                         }
   27832           0 :                         if (talloc_str == NULL) {
   27833           0 :                                 PyErr_NoMemory();
   27834           0 :                                 return -1;
   27835             :                         }
   27836           0 :                         object->net_addr = talloc_str;
   27837             :                 }
   27838             :         }
   27839           0 :         return 0;
   27840             : }
   27841             : 
   27842           0 : static PyObject *py_srvsvc_NetTransportInfo2_get_domain(PyObject *obj, void *closure)
   27843             : {
   27844           0 :         struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(obj);
   27845             :         PyObject *py_domain;
   27846           0 :         if (object->domain == NULL) {
   27847           0 :                 Py_RETURN_NONE;
   27848             :         }
   27849           0 :         if (object->domain == NULL) {
   27850           0 :                 py_domain = Py_None;
   27851           0 :                 Py_INCREF(py_domain);
   27852             :         } else {
   27853           0 :                 if (object->domain == NULL) {
   27854           0 :                         py_domain = Py_None;
   27855           0 :                         Py_INCREF(py_domain);
   27856             :                 } else {
   27857           0 :                         py_domain = PyUnicode_Decode(object->domain, strlen(object->domain), "utf-8", "ignore");
   27858             :                 }
   27859             :         }
   27860           0 :         return py_domain;
   27861             : }
   27862             : 
   27863           0 : static int py_srvsvc_NetTransportInfo2_set_domain(PyObject *py_obj, PyObject *value, void *closure)
   27864             : {
   27865           0 :         struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(py_obj);
   27866           0 :         if (value == NULL) {
   27867           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain");
   27868           0 :                 return -1;
   27869             :         }
   27870           0 :         if (value == Py_None) {
   27871           0 :                 object->domain = NULL;
   27872             :         } else {
   27873           0 :                 object->domain = NULL;
   27874             :                 {
   27875             :                         const char *test_str;
   27876             :                         const char *talloc_str;
   27877           0 :                         PyObject *unicode = NULL;
   27878           0 :                         if (PyUnicode_Check(value)) {
   27879           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   27880           0 :                                 if (unicode == NULL) {
   27881           0 :                                         PyErr_NoMemory();
   27882           0 :                                         return -1;
   27883             :                                 }
   27884           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   27885           0 :                         } else if (PyBytes_Check(value)) {
   27886           0 :                                 test_str = PyBytes_AS_STRING(value);
   27887             :                         } else {
   27888           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   27889           0 :                                 return -1;
   27890             :                         }
   27891           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   27892           0 :                         if (unicode != NULL) {
   27893           0 :                                 Py_DECREF(unicode);
   27894             :                         }
   27895           0 :                         if (talloc_str == NULL) {
   27896           0 :                                 PyErr_NoMemory();
   27897           0 :                                 return -1;
   27898             :                         }
   27899           0 :                         object->domain = talloc_str;
   27900             :                 }
   27901             :         }
   27902           0 :         return 0;
   27903             : }
   27904             : 
   27905           0 : static PyObject *py_srvsvc_NetTransportInfo2_get_unknown(PyObject *obj, void *closure)
   27906             : {
   27907           0 :         struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(obj);
   27908             :         PyObject *py_unknown;
   27909           0 :         py_unknown = PyLong_FromUnsignedLongLong((uint32_t)object->unknown);
   27910           0 :         return py_unknown;
   27911             : }
   27912             : 
   27913           0 : static int py_srvsvc_NetTransportInfo2_set_unknown(PyObject *py_obj, PyObject *value, void *closure)
   27914             : {
   27915           0 :         struct srvsvc_NetTransportInfo2 *object = (struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(py_obj);
   27916           0 :         if (value == NULL) {
   27917           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown");
   27918           0 :                 return -1;
   27919             :         }
   27920             :         {
   27921           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown));
   27922           0 :                 if (PyLong_Check(value)) {
   27923             :                         unsigned long long test_var;
   27924           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27925           0 :                         if (PyErr_Occurred() != NULL) {
   27926           0 :                                 return -1;
   27927             :                         }
   27928           0 :                         if (test_var > uint_max) {
   27929           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27930             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27931           0 :                                 return -1;
   27932             :                         }
   27933           0 :                         object->unknown = test_var;
   27934             :                 } else {
   27935           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27936             :                           PyLong_Type.tp_name);
   27937           0 :                         return -1;
   27938             :                 }
   27939             :         }
   27940           0 :         return 0;
   27941             : }
   27942             : 
   27943             : static PyGetSetDef py_srvsvc_NetTransportInfo2_getsetters[] = {
   27944             :         {
   27945             :                 .name = discard_const_p(char, "vcs"),
   27946             :                 .get = py_srvsvc_NetTransportInfo2_get_vcs,
   27947             :                 .set = py_srvsvc_NetTransportInfo2_set_vcs,
   27948             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   27949             :         },
   27950             :         {
   27951             :                 .name = discard_const_p(char, "name"),
   27952             :                 .get = py_srvsvc_NetTransportInfo2_get_name,
   27953             :                 .set = py_srvsvc_NetTransportInfo2_set_name,
   27954             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   27955             :         },
   27956             :         {
   27957             :                 .name = discard_const_p(char, "addr"),
   27958             :                 .get = py_srvsvc_NetTransportInfo2_get_addr,
   27959             :                 .set = py_srvsvc_NetTransportInfo2_set_addr,
   27960             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   27961             :         },
   27962             :         {
   27963             :                 .name = discard_const_p(char, "addr_len"),
   27964             :                 .get = py_srvsvc_NetTransportInfo2_get_addr_len,
   27965             :                 .set = py_srvsvc_NetTransportInfo2_set_addr_len,
   27966             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   27967             :         },
   27968             :         {
   27969             :                 .name = discard_const_p(char, "net_addr"),
   27970             :                 .get = py_srvsvc_NetTransportInfo2_get_net_addr,
   27971             :                 .set = py_srvsvc_NetTransportInfo2_set_net_addr,
   27972             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   27973             :         },
   27974             :         {
   27975             :                 .name = discard_const_p(char, "domain"),
   27976             :                 .get = py_srvsvc_NetTransportInfo2_get_domain,
   27977             :                 .set = py_srvsvc_NetTransportInfo2_set_domain,
   27978             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   27979             :         },
   27980             :         {
   27981             :                 .name = discard_const_p(char, "unknown"),
   27982             :                 .get = py_srvsvc_NetTransportInfo2_get_unknown,
   27983             :                 .set = py_srvsvc_NetTransportInfo2_set_unknown,
   27984             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   27985             :         },
   27986             :         { .name = NULL }
   27987             : };
   27988             : 
   27989           0 : static PyObject *py_srvsvc_NetTransportInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   27990             : {
   27991           0 :         return pytalloc_new(struct srvsvc_NetTransportInfo2, type);
   27992             : }
   27993             : 
   27994             : 
   27995             : static PyTypeObject srvsvc_NetTransportInfo2_Type = {
   27996             :         PyVarObject_HEAD_INIT(NULL, 0)
   27997             :         .tp_name = "srvsvc.NetTransportInfo2",
   27998             :         .tp_getset = py_srvsvc_NetTransportInfo2_getsetters,
   27999             :         .tp_methods = NULL,
   28000             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   28001             :         .tp_new = py_srvsvc_NetTransportInfo2_new,
   28002             : };
   28003             : 
   28004             : 
   28005           0 : static PyObject *py_srvsvc_NetTransportCtr2_get_count(PyObject *obj, void *closure)
   28006             : {
   28007           0 :         struct srvsvc_NetTransportCtr2 *object = (struct srvsvc_NetTransportCtr2 *)pytalloc_get_ptr(obj);
   28008             :         PyObject *py_count;
   28009           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
   28010           0 :         return py_count;
   28011             : }
   28012             : 
   28013           0 : static int py_srvsvc_NetTransportCtr2_set_count(PyObject *py_obj, PyObject *value, void *closure)
   28014             : {
   28015           0 :         struct srvsvc_NetTransportCtr2 *object = (struct srvsvc_NetTransportCtr2 *)pytalloc_get_ptr(py_obj);
   28016           0 :         if (value == NULL) {
   28017           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   28018           0 :                 return -1;
   28019             :         }
   28020             :         {
   28021           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   28022           0 :                 if (PyLong_Check(value)) {
   28023             :                         unsigned long long test_var;
   28024           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28025           0 :                         if (PyErr_Occurred() != NULL) {
   28026           0 :                                 return -1;
   28027             :                         }
   28028           0 :                         if (test_var > uint_max) {
   28029           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28030             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28031           0 :                                 return -1;
   28032             :                         }
   28033           0 :                         object->count = test_var;
   28034             :                 } else {
   28035           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28036             :                           PyLong_Type.tp_name);
   28037           0 :                         return -1;
   28038             :                 }
   28039             :         }
   28040           0 :         return 0;
   28041             : }
   28042             : 
   28043           0 : static PyObject *py_srvsvc_NetTransportCtr2_get_array(PyObject *obj, void *closure)
   28044             : {
   28045           0 :         struct srvsvc_NetTransportCtr2 *object = (struct srvsvc_NetTransportCtr2 *)pytalloc_get_ptr(obj);
   28046             :         PyObject *py_array;
   28047           0 :         if (object->array == NULL) {
   28048           0 :                 Py_RETURN_NONE;
   28049             :         }
   28050           0 :         if (object->array == NULL) {
   28051           0 :                 py_array = Py_None;
   28052           0 :                 Py_INCREF(py_array);
   28053             :         } else {
   28054           0 :                 py_array = PyList_New(object->count);
   28055           0 :                 if (py_array == NULL) {
   28056           0 :                         return NULL;
   28057             :                 }
   28058             :                 {
   28059             :                         int array_cntr_1;
   28060           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
   28061             :                                 PyObject *py_array_1;
   28062           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetTransportInfo2_Type, object->array, &object->array[array_cntr_1]);
   28063           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
   28064             :                         }
   28065             :                 }
   28066             :         }
   28067           0 :         return py_array;
   28068             : }
   28069             : 
   28070           0 : static int py_srvsvc_NetTransportCtr2_set_array(PyObject *py_obj, PyObject *value, void *closure)
   28071             : {
   28072           0 :         struct srvsvc_NetTransportCtr2 *object = (struct srvsvc_NetTransportCtr2 *)pytalloc_get_ptr(py_obj);
   28073           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
   28074           0 :         if (value == NULL) {
   28075           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
   28076           0 :                 return -1;
   28077             :         }
   28078           0 :         if (value == Py_None) {
   28079           0 :                 object->array = NULL;
   28080             :         } else {
   28081           0 :                 object->array = NULL;
   28082           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   28083             :                 {
   28084             :                         int array_cntr_1;
   28085           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   28086           0 :                         if (!object->array) { return -1;; }
   28087           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
   28088           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
   28089           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
   28090           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
   28091           0 :                                         return -1;
   28092             :                                 }
   28093           0 :                                 PY_CHECK_TYPE(&srvsvc_NetTransportInfo2_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
   28094           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
   28095           0 :                                         PyErr_NoMemory();
   28096           0 :                                         return -1;
   28097             :                                 }
   28098           0 :                                 object->array[array_cntr_1] = *(struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
   28099             :                         }
   28100             :                 }
   28101             :         }
   28102           0 :         return 0;
   28103             : }
   28104             : 
   28105             : static PyGetSetDef py_srvsvc_NetTransportCtr2_getsetters[] = {
   28106             :         {
   28107             :                 .name = discard_const_p(char, "count"),
   28108             :                 .get = py_srvsvc_NetTransportCtr2_get_count,
   28109             :                 .set = py_srvsvc_NetTransportCtr2_set_count,
   28110             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   28111             :         },
   28112             :         {
   28113             :                 .name = discard_const_p(char, "array"),
   28114             :                 .get = py_srvsvc_NetTransportCtr2_get_array,
   28115             :                 .set = py_srvsvc_NetTransportCtr2_set_array,
   28116             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetTransportInfo2")
   28117             :         },
   28118             :         { .name = NULL }
   28119             : };
   28120             : 
   28121           0 : static PyObject *py_srvsvc_NetTransportCtr2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   28122             : {
   28123           0 :         return pytalloc_new(struct srvsvc_NetTransportCtr2, type);
   28124             : }
   28125             : 
   28126             : 
   28127             : static PyTypeObject srvsvc_NetTransportCtr2_Type = {
   28128             :         PyVarObject_HEAD_INIT(NULL, 0)
   28129             :         .tp_name = "srvsvc.NetTransportCtr2",
   28130             :         .tp_getset = py_srvsvc_NetTransportCtr2_getsetters,
   28131             :         .tp_methods = NULL,
   28132             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   28133             :         .tp_new = py_srvsvc_NetTransportCtr2_new,
   28134             : };
   28135             : 
   28136             : 
   28137           0 : static PyObject *py_srvsvc_NetTransportInfo3_get_vcs(PyObject *obj, void *closure)
   28138             : {
   28139           0 :         struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(obj);
   28140             :         PyObject *py_vcs;
   28141           0 :         py_vcs = PyLong_FromUnsignedLongLong((uint32_t)object->vcs);
   28142           0 :         return py_vcs;
   28143             : }
   28144             : 
   28145           0 : static int py_srvsvc_NetTransportInfo3_set_vcs(PyObject *py_obj, PyObject *value, void *closure)
   28146             : {
   28147           0 :         struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(py_obj);
   28148           0 :         if (value == NULL) {
   28149           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->vcs");
   28150           0 :                 return -1;
   28151             :         }
   28152             :         {
   28153           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->vcs));
   28154           0 :                 if (PyLong_Check(value)) {
   28155             :                         unsigned long long test_var;
   28156           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28157           0 :                         if (PyErr_Occurred() != NULL) {
   28158           0 :                                 return -1;
   28159             :                         }
   28160           0 :                         if (test_var > uint_max) {
   28161           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28162             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28163           0 :                                 return -1;
   28164             :                         }
   28165           0 :                         object->vcs = test_var;
   28166             :                 } else {
   28167           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28168             :                           PyLong_Type.tp_name);
   28169           0 :                         return -1;
   28170             :                 }
   28171             :         }
   28172           0 :         return 0;
   28173             : }
   28174             : 
   28175           0 : static PyObject *py_srvsvc_NetTransportInfo3_get_name(PyObject *obj, void *closure)
   28176             : {
   28177           0 :         struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(obj);
   28178             :         PyObject *py_name;
   28179           0 :         if (object->name == NULL) {
   28180           0 :                 Py_RETURN_NONE;
   28181             :         }
   28182           0 :         if (object->name == NULL) {
   28183           0 :                 py_name = Py_None;
   28184           0 :                 Py_INCREF(py_name);
   28185             :         } else {
   28186           0 :                 if (object->name == NULL) {
   28187           0 :                         py_name = Py_None;
   28188           0 :                         Py_INCREF(py_name);
   28189             :                 } else {
   28190           0 :                         py_name = PyUnicode_Decode(object->name, strlen(object->name), "utf-8", "ignore");
   28191             :                 }
   28192             :         }
   28193           0 :         return py_name;
   28194             : }
   28195             : 
   28196           0 : static int py_srvsvc_NetTransportInfo3_set_name(PyObject *py_obj, PyObject *value, void *closure)
   28197             : {
   28198           0 :         struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(py_obj);
   28199           0 :         if (value == NULL) {
   28200           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->name");
   28201           0 :                 return -1;
   28202             :         }
   28203           0 :         if (value == Py_None) {
   28204           0 :                 object->name = NULL;
   28205             :         } else {
   28206           0 :                 object->name = NULL;
   28207             :                 {
   28208             :                         const char *test_str;
   28209             :                         const char *talloc_str;
   28210           0 :                         PyObject *unicode = NULL;
   28211           0 :                         if (PyUnicode_Check(value)) {
   28212           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   28213           0 :                                 if (unicode == NULL) {
   28214           0 :                                         PyErr_NoMemory();
   28215           0 :                                         return -1;
   28216             :                                 }
   28217           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   28218           0 :                         } else if (PyBytes_Check(value)) {
   28219           0 :                                 test_str = PyBytes_AS_STRING(value);
   28220             :                         } else {
   28221           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   28222           0 :                                 return -1;
   28223             :                         }
   28224           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   28225           0 :                         if (unicode != NULL) {
   28226           0 :                                 Py_DECREF(unicode);
   28227             :                         }
   28228           0 :                         if (talloc_str == NULL) {
   28229           0 :                                 PyErr_NoMemory();
   28230           0 :                                 return -1;
   28231             :                         }
   28232           0 :                         object->name = talloc_str;
   28233             :                 }
   28234             :         }
   28235           0 :         return 0;
   28236             : }
   28237             : 
   28238           0 : static PyObject *py_srvsvc_NetTransportInfo3_get_addr(PyObject *obj, void *closure)
   28239             : {
   28240           0 :         struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(obj);
   28241             :         PyObject *py_addr;
   28242           0 :         if (object->addr == NULL) {
   28243           0 :                 Py_RETURN_NONE;
   28244             :         }
   28245           0 :         if (object->addr == NULL) {
   28246           0 :                 py_addr = Py_None;
   28247           0 :                 Py_INCREF(py_addr);
   28248             :         } else {
   28249           0 :                 py_addr = PyList_New(object->addr_len);
   28250           0 :                 if (py_addr == NULL) {
   28251           0 :                         return NULL;
   28252             :                 }
   28253             :                 {
   28254             :                         int addr_cntr_1;
   28255           0 :                         for (addr_cntr_1 = 0; addr_cntr_1 < (object->addr_len); addr_cntr_1++) {
   28256             :                                 PyObject *py_addr_1;
   28257           0 :                                 py_addr_1 = PyLong_FromLong((uint16_t)object->addr[addr_cntr_1]);
   28258           0 :                                 PyList_SetItem(py_addr, addr_cntr_1, py_addr_1);
   28259             :                         }
   28260             :                 }
   28261             :         }
   28262           0 :         return py_addr;
   28263             : }
   28264             : 
   28265           0 : static int py_srvsvc_NetTransportInfo3_set_addr(PyObject *py_obj, PyObject *value, void *closure)
   28266             : {
   28267           0 :         struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(py_obj);
   28268           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->addr));
   28269           0 :         if (value == NULL) {
   28270           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr");
   28271           0 :                 return -1;
   28272             :         }
   28273           0 :         if (value == Py_None) {
   28274           0 :                 object->addr = NULL;
   28275             :         } else {
   28276           0 :                 object->addr = NULL;
   28277           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   28278             :                 {
   28279             :                         int addr_cntr_1;
   28280           0 :                         object->addr = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->addr, PyList_GET_SIZE(value));
   28281           0 :                         if (!object->addr) { return -1;; }
   28282           0 :                         talloc_set_name_const(object->addr, "ARRAY: object->addr");
   28283           0 :                         for (addr_cntr_1 = 0; addr_cntr_1 < PyList_GET_SIZE(value); addr_cntr_1++) {
   28284           0 :                                 if (PyList_GET_ITEM(value, addr_cntr_1) == NULL) {
   28285           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr[addr_cntr_1]");
   28286           0 :                                         return -1;
   28287             :                                 }
   28288             :                                 {
   28289           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr[addr_cntr_1]));
   28290           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, addr_cntr_1))) {
   28291             :                                                 unsigned long long test_var;
   28292           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, addr_cntr_1));
   28293           0 :                                                 if (PyErr_Occurred() != NULL) {
   28294           0 :                                                         return -1;
   28295             :                                                 }
   28296           0 :                                                 if (test_var > uint_max) {
   28297           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28298             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   28299           0 :                                                         return -1;
   28300             :                                                 }
   28301           0 :                                                 object->addr[addr_cntr_1] = test_var;
   28302             :                                         } else {
   28303           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   28304             :                                                   PyLong_Type.tp_name);
   28305           0 :                                                 return -1;
   28306             :                                         }
   28307             :                                 }
   28308             :                         }
   28309             :                 }
   28310             :         }
   28311           0 :         return 0;
   28312             : }
   28313             : 
   28314           0 : static PyObject *py_srvsvc_NetTransportInfo3_get_addr_len(PyObject *obj, void *closure)
   28315             : {
   28316           0 :         struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(obj);
   28317             :         PyObject *py_addr_len;
   28318           0 :         py_addr_len = PyLong_FromUnsignedLongLong((uint32_t)object->addr_len);
   28319           0 :         return py_addr_len;
   28320             : }
   28321             : 
   28322           0 : static int py_srvsvc_NetTransportInfo3_set_addr_len(PyObject *py_obj, PyObject *value, void *closure)
   28323             : {
   28324           0 :         struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(py_obj);
   28325           0 :         if (value == NULL) {
   28326           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr_len");
   28327           0 :                 return -1;
   28328             :         }
   28329             :         {
   28330           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr_len));
   28331           0 :                 if (PyLong_Check(value)) {
   28332             :                         unsigned long long test_var;
   28333           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28334           0 :                         if (PyErr_Occurred() != NULL) {
   28335           0 :                                 return -1;
   28336             :                         }
   28337           0 :                         if (test_var > uint_max) {
   28338           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28339             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28340           0 :                                 return -1;
   28341             :                         }
   28342           0 :                         object->addr_len = test_var;
   28343             :                 } else {
   28344           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28345             :                           PyLong_Type.tp_name);
   28346           0 :                         return -1;
   28347             :                 }
   28348             :         }
   28349           0 :         return 0;
   28350             : }
   28351             : 
   28352           0 : static PyObject *py_srvsvc_NetTransportInfo3_get_net_addr(PyObject *obj, void *closure)
   28353             : {
   28354           0 :         struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(obj);
   28355             :         PyObject *py_net_addr;
   28356           0 :         if (object->net_addr == NULL) {
   28357           0 :                 Py_RETURN_NONE;
   28358             :         }
   28359           0 :         if (object->net_addr == NULL) {
   28360           0 :                 py_net_addr = Py_None;
   28361           0 :                 Py_INCREF(py_net_addr);
   28362             :         } else {
   28363           0 :                 if (object->net_addr == NULL) {
   28364           0 :                         py_net_addr = Py_None;
   28365           0 :                         Py_INCREF(py_net_addr);
   28366             :                 } else {
   28367           0 :                         py_net_addr = PyUnicode_Decode(object->net_addr, strlen(object->net_addr), "utf-8", "ignore");
   28368             :                 }
   28369             :         }
   28370           0 :         return py_net_addr;
   28371             : }
   28372             : 
   28373           0 : static int py_srvsvc_NetTransportInfo3_set_net_addr(PyObject *py_obj, PyObject *value, void *closure)
   28374             : {
   28375           0 :         struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(py_obj);
   28376           0 :         if (value == NULL) {
   28377           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->net_addr");
   28378           0 :                 return -1;
   28379             :         }
   28380           0 :         if (value == Py_None) {
   28381           0 :                 object->net_addr = NULL;
   28382             :         } else {
   28383           0 :                 object->net_addr = NULL;
   28384             :                 {
   28385             :                         const char *test_str;
   28386             :                         const char *talloc_str;
   28387           0 :                         PyObject *unicode = NULL;
   28388           0 :                         if (PyUnicode_Check(value)) {
   28389           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   28390           0 :                                 if (unicode == NULL) {
   28391           0 :                                         PyErr_NoMemory();
   28392           0 :                                         return -1;
   28393             :                                 }
   28394           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   28395           0 :                         } else if (PyBytes_Check(value)) {
   28396           0 :                                 test_str = PyBytes_AS_STRING(value);
   28397             :                         } else {
   28398           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   28399           0 :                                 return -1;
   28400             :                         }
   28401           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   28402           0 :                         if (unicode != NULL) {
   28403           0 :                                 Py_DECREF(unicode);
   28404             :                         }
   28405           0 :                         if (talloc_str == NULL) {
   28406           0 :                                 PyErr_NoMemory();
   28407           0 :                                 return -1;
   28408             :                         }
   28409           0 :                         object->net_addr = talloc_str;
   28410             :                 }
   28411             :         }
   28412           0 :         return 0;
   28413             : }
   28414             : 
   28415           0 : static PyObject *py_srvsvc_NetTransportInfo3_get_domain(PyObject *obj, void *closure)
   28416             : {
   28417           0 :         struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(obj);
   28418             :         PyObject *py_domain;
   28419           0 :         if (object->domain == NULL) {
   28420           0 :                 Py_RETURN_NONE;
   28421             :         }
   28422           0 :         if (object->domain == NULL) {
   28423           0 :                 py_domain = Py_None;
   28424           0 :                 Py_INCREF(py_domain);
   28425             :         } else {
   28426           0 :                 if (object->domain == NULL) {
   28427           0 :                         py_domain = Py_None;
   28428           0 :                         Py_INCREF(py_domain);
   28429             :                 } else {
   28430           0 :                         py_domain = PyUnicode_Decode(object->domain, strlen(object->domain), "utf-8", "ignore");
   28431             :                 }
   28432             :         }
   28433           0 :         return py_domain;
   28434             : }
   28435             : 
   28436           0 : static int py_srvsvc_NetTransportInfo3_set_domain(PyObject *py_obj, PyObject *value, void *closure)
   28437             : {
   28438           0 :         struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(py_obj);
   28439           0 :         if (value == NULL) {
   28440           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain");
   28441           0 :                 return -1;
   28442             :         }
   28443           0 :         if (value == Py_None) {
   28444           0 :                 object->domain = NULL;
   28445             :         } else {
   28446           0 :                 object->domain = NULL;
   28447             :                 {
   28448             :                         const char *test_str;
   28449             :                         const char *talloc_str;
   28450           0 :                         PyObject *unicode = NULL;
   28451           0 :                         if (PyUnicode_Check(value)) {
   28452           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   28453           0 :                                 if (unicode == NULL) {
   28454           0 :                                         PyErr_NoMemory();
   28455           0 :                                         return -1;
   28456             :                                 }
   28457           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   28458           0 :                         } else if (PyBytes_Check(value)) {
   28459           0 :                                 test_str = PyBytes_AS_STRING(value);
   28460             :                         } else {
   28461           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   28462           0 :                                 return -1;
   28463             :                         }
   28464           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   28465           0 :                         if (unicode != NULL) {
   28466           0 :                                 Py_DECREF(unicode);
   28467             :                         }
   28468           0 :                         if (talloc_str == NULL) {
   28469           0 :                                 PyErr_NoMemory();
   28470           0 :                                 return -1;
   28471             :                         }
   28472           0 :                         object->domain = talloc_str;
   28473             :                 }
   28474             :         }
   28475           0 :         return 0;
   28476             : }
   28477             : 
   28478           0 : static PyObject *py_srvsvc_NetTransportInfo3_get_unknown1(PyObject *obj, void *closure)
   28479             : {
   28480           0 :         struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(obj);
   28481             :         PyObject *py_unknown1;
   28482           0 :         py_unknown1 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown1);
   28483           0 :         return py_unknown1;
   28484             : }
   28485             : 
   28486           0 : static int py_srvsvc_NetTransportInfo3_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   28487             : {
   28488           0 :         struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(py_obj);
   28489           0 :         if (value == NULL) {
   28490           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
   28491           0 :                 return -1;
   28492             :         }
   28493             :         {
   28494           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown1));
   28495           0 :                 if (PyLong_Check(value)) {
   28496             :                         unsigned long long test_var;
   28497           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28498           0 :                         if (PyErr_Occurred() != NULL) {
   28499           0 :                                 return -1;
   28500             :                         }
   28501           0 :                         if (test_var > uint_max) {
   28502           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28503             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28504           0 :                                 return -1;
   28505             :                         }
   28506           0 :                         object->unknown1 = test_var;
   28507             :                 } else {
   28508           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28509             :                           PyLong_Type.tp_name);
   28510           0 :                         return -1;
   28511             :                 }
   28512             :         }
   28513           0 :         return 0;
   28514             : }
   28515             : 
   28516           0 : static PyObject *py_srvsvc_NetTransportInfo3_get_unknown2(PyObject *obj, void *closure)
   28517             : {
   28518           0 :         struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(obj);
   28519             :         PyObject *py_unknown2;
   28520           0 :         py_unknown2 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown2);
   28521           0 :         return py_unknown2;
   28522             : }
   28523             : 
   28524           0 : static int py_srvsvc_NetTransportInfo3_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   28525             : {
   28526           0 :         struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(py_obj);
   28527           0 :         if (value == NULL) {
   28528           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
   28529           0 :                 return -1;
   28530             :         }
   28531             :         {
   28532           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown2));
   28533           0 :                 if (PyLong_Check(value)) {
   28534             :                         unsigned long long test_var;
   28535           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28536           0 :                         if (PyErr_Occurred() != NULL) {
   28537           0 :                                 return -1;
   28538             :                         }
   28539           0 :                         if (test_var > uint_max) {
   28540           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28541             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28542           0 :                                 return -1;
   28543             :                         }
   28544           0 :                         object->unknown2 = test_var;
   28545             :                 } else {
   28546           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28547             :                           PyLong_Type.tp_name);
   28548           0 :                         return -1;
   28549             :                 }
   28550             :         }
   28551           0 :         return 0;
   28552             : }
   28553             : 
   28554           0 : static PyObject *py_srvsvc_NetTransportInfo3_get_unknown3(PyObject *obj, void *closure)
   28555             : {
   28556           0 :         struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(obj);
   28557             :         PyObject *py_unknown3;
   28558           0 :         py_unknown3 = PyList_New(256);
   28559           0 :         if (py_unknown3 == NULL) {
   28560           0 :                 return NULL;
   28561             :         }
   28562             :         {
   28563             :                 int unknown3_cntr_0;
   28564           0 :                 for (unknown3_cntr_0 = 0; unknown3_cntr_0 < (256); unknown3_cntr_0++) {
   28565             :                         PyObject *py_unknown3_0;
   28566           0 :                         py_unknown3_0 = PyLong_FromLong((uint16_t)object->unknown3[unknown3_cntr_0]);
   28567           0 :                         PyList_SetItem(py_unknown3, unknown3_cntr_0, py_unknown3_0);
   28568             :                 }
   28569             :         }
   28570           0 :         return py_unknown3;
   28571             : }
   28572             : 
   28573           0 : static int py_srvsvc_NetTransportInfo3_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   28574             : {
   28575           0 :         struct srvsvc_NetTransportInfo3 *object = (struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(py_obj);
   28576           0 :         if (value == NULL) {
   28577           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
   28578           0 :                 return -1;
   28579             :         }
   28580           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   28581             :         {
   28582             :                 int unknown3_cntr_0;
   28583           0 :                 if (ARRAY_SIZE(object->unknown3) != PyList_GET_SIZE(value)) {
   28584           0 :                         PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->unknown3),  PyList_GET_SIZE(value));
   28585           0 :                         return -1;
   28586             :                 }
   28587           0 :                 for (unknown3_cntr_0 = 0; unknown3_cntr_0 < PyList_GET_SIZE(value); unknown3_cntr_0++) {
   28588           0 :                         if (PyList_GET_ITEM(value, unknown3_cntr_0) == NULL) {
   28589           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3[unknown3_cntr_0]");
   28590           0 :                                 return -1;
   28591             :                         }
   28592             :                         {
   28593           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown3[unknown3_cntr_0]));
   28594           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, unknown3_cntr_0))) {
   28595             :                                         unsigned long long test_var;
   28596           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, unknown3_cntr_0));
   28597           0 :                                         if (PyErr_Occurred() != NULL) {
   28598           0 :                                                 return -1;
   28599             :                                         }
   28600           0 :                                         if (test_var > uint_max) {
   28601           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28602             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   28603           0 :                                                 return -1;
   28604             :                                         }
   28605           0 :                                         object->unknown3[unknown3_cntr_0] = test_var;
   28606             :                                 } else {
   28607           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28608             :                                           PyLong_Type.tp_name);
   28609           0 :                                         return -1;
   28610             :                                 }
   28611             :                         }
   28612             :                 }
   28613             :         }
   28614           0 :         return 0;
   28615             : }
   28616             : 
   28617             : static PyGetSetDef py_srvsvc_NetTransportInfo3_getsetters[] = {
   28618             :         {
   28619             :                 .name = discard_const_p(char, "vcs"),
   28620             :                 .get = py_srvsvc_NetTransportInfo3_get_vcs,
   28621             :                 .set = py_srvsvc_NetTransportInfo3_set_vcs,
   28622             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   28623             :         },
   28624             :         {
   28625             :                 .name = discard_const_p(char, "name"),
   28626             :                 .get = py_srvsvc_NetTransportInfo3_get_name,
   28627             :                 .set = py_srvsvc_NetTransportInfo3_set_name,
   28628             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   28629             :         },
   28630             :         {
   28631             :                 .name = discard_const_p(char, "addr"),
   28632             :                 .get = py_srvsvc_NetTransportInfo3_get_addr,
   28633             :                 .set = py_srvsvc_NetTransportInfo3_set_addr,
   28634             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   28635             :         },
   28636             :         {
   28637             :                 .name = discard_const_p(char, "addr_len"),
   28638             :                 .get = py_srvsvc_NetTransportInfo3_get_addr_len,
   28639             :                 .set = py_srvsvc_NetTransportInfo3_set_addr_len,
   28640             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   28641             :         },
   28642             :         {
   28643             :                 .name = discard_const_p(char, "net_addr"),
   28644             :                 .get = py_srvsvc_NetTransportInfo3_get_net_addr,
   28645             :                 .set = py_srvsvc_NetTransportInfo3_set_net_addr,
   28646             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   28647             :         },
   28648             :         {
   28649             :                 .name = discard_const_p(char, "domain"),
   28650             :                 .get = py_srvsvc_NetTransportInfo3_get_domain,
   28651             :                 .set = py_srvsvc_NetTransportInfo3_set_domain,
   28652             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   28653             :         },
   28654             :         {
   28655             :                 .name = discard_const_p(char, "unknown1"),
   28656             :                 .get = py_srvsvc_NetTransportInfo3_get_unknown1,
   28657             :                 .set = py_srvsvc_NetTransportInfo3_set_unknown1,
   28658             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   28659             :         },
   28660             :         {
   28661             :                 .name = discard_const_p(char, "unknown2"),
   28662             :                 .get = py_srvsvc_NetTransportInfo3_get_unknown2,
   28663             :                 .set = py_srvsvc_NetTransportInfo3_set_unknown2,
   28664             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   28665             :         },
   28666             :         {
   28667             :                 .name = discard_const_p(char, "unknown3"),
   28668             :                 .get = py_srvsvc_NetTransportInfo3_get_unknown3,
   28669             :                 .set = py_srvsvc_NetTransportInfo3_set_unknown3,
   28670             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   28671             :         },
   28672             :         { .name = NULL }
   28673             : };
   28674             : 
   28675           0 : static PyObject *py_srvsvc_NetTransportInfo3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   28676             : {
   28677           0 :         return pytalloc_new(struct srvsvc_NetTransportInfo3, type);
   28678             : }
   28679             : 
   28680             : 
   28681             : static PyTypeObject srvsvc_NetTransportInfo3_Type = {
   28682             :         PyVarObject_HEAD_INIT(NULL, 0)
   28683             :         .tp_name = "srvsvc.NetTransportInfo3",
   28684             :         .tp_getset = py_srvsvc_NetTransportInfo3_getsetters,
   28685             :         .tp_methods = NULL,
   28686             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   28687             :         .tp_new = py_srvsvc_NetTransportInfo3_new,
   28688             : };
   28689             : 
   28690             : 
   28691           0 : static PyObject *py_srvsvc_NetTransportCtr3_get_count(PyObject *obj, void *closure)
   28692             : {
   28693           0 :         struct srvsvc_NetTransportCtr3 *object = (struct srvsvc_NetTransportCtr3 *)pytalloc_get_ptr(obj);
   28694             :         PyObject *py_count;
   28695           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
   28696           0 :         return py_count;
   28697             : }
   28698             : 
   28699           0 : static int py_srvsvc_NetTransportCtr3_set_count(PyObject *py_obj, PyObject *value, void *closure)
   28700             : {
   28701           0 :         struct srvsvc_NetTransportCtr3 *object = (struct srvsvc_NetTransportCtr3 *)pytalloc_get_ptr(py_obj);
   28702           0 :         if (value == NULL) {
   28703           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   28704           0 :                 return -1;
   28705             :         }
   28706             :         {
   28707           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   28708           0 :                 if (PyLong_Check(value)) {
   28709             :                         unsigned long long test_var;
   28710           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28711           0 :                         if (PyErr_Occurred() != NULL) {
   28712           0 :                                 return -1;
   28713             :                         }
   28714           0 :                         if (test_var > uint_max) {
   28715           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28716             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28717           0 :                                 return -1;
   28718             :                         }
   28719           0 :                         object->count = test_var;
   28720             :                 } else {
   28721           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28722             :                           PyLong_Type.tp_name);
   28723           0 :                         return -1;
   28724             :                 }
   28725             :         }
   28726           0 :         return 0;
   28727             : }
   28728             : 
   28729           0 : static PyObject *py_srvsvc_NetTransportCtr3_get_array(PyObject *obj, void *closure)
   28730             : {
   28731           0 :         struct srvsvc_NetTransportCtr3 *object = (struct srvsvc_NetTransportCtr3 *)pytalloc_get_ptr(obj);
   28732             :         PyObject *py_array;
   28733           0 :         if (object->array == NULL) {
   28734           0 :                 Py_RETURN_NONE;
   28735             :         }
   28736           0 :         if (object->array == NULL) {
   28737           0 :                 py_array = Py_None;
   28738           0 :                 Py_INCREF(py_array);
   28739             :         } else {
   28740           0 :                 py_array = PyList_New(object->count);
   28741           0 :                 if (py_array == NULL) {
   28742           0 :                         return NULL;
   28743             :                 }
   28744             :                 {
   28745             :                         int array_cntr_1;
   28746           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
   28747             :                                 PyObject *py_array_1;
   28748           0 :                                 py_array_1 = pytalloc_reference_ex(&srvsvc_NetTransportInfo3_Type, object->array, &object->array[array_cntr_1]);
   28749           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
   28750             :                         }
   28751             :                 }
   28752             :         }
   28753           0 :         return py_array;
   28754             : }
   28755             : 
   28756           0 : static int py_srvsvc_NetTransportCtr3_set_array(PyObject *py_obj, PyObject *value, void *closure)
   28757             : {
   28758           0 :         struct srvsvc_NetTransportCtr3 *object = (struct srvsvc_NetTransportCtr3 *)pytalloc_get_ptr(py_obj);
   28759           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
   28760           0 :         if (value == NULL) {
   28761           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
   28762           0 :                 return -1;
   28763             :         }
   28764           0 :         if (value == Py_None) {
   28765           0 :                 object->array = NULL;
   28766             :         } else {
   28767           0 :                 object->array = NULL;
   28768           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   28769             :                 {
   28770             :                         int array_cntr_1;
   28771           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   28772           0 :                         if (!object->array) { return -1;; }
   28773           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
   28774           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
   28775           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
   28776           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
   28777           0 :                                         return -1;
   28778             :                                 }
   28779           0 :                                 PY_CHECK_TYPE(&srvsvc_NetTransportInfo3_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
   28780           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
   28781           0 :                                         PyErr_NoMemory();
   28782           0 :                                         return -1;
   28783             :                                 }
   28784           0 :                                 object->array[array_cntr_1] = *(struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
   28785             :                         }
   28786             :                 }
   28787             :         }
   28788           0 :         return 0;
   28789             : }
   28790             : 
   28791             : static PyGetSetDef py_srvsvc_NetTransportCtr3_getsetters[] = {
   28792             :         {
   28793             :                 .name = discard_const_p(char, "count"),
   28794             :                 .get = py_srvsvc_NetTransportCtr3_get_count,
   28795             :                 .set = py_srvsvc_NetTransportCtr3_set_count,
   28796             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   28797             :         },
   28798             :         {
   28799             :                 .name = discard_const_p(char, "array"),
   28800             :                 .get = py_srvsvc_NetTransportCtr3_get_array,
   28801             :                 .set = py_srvsvc_NetTransportCtr3_set_array,
   28802             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetTransportInfo3")
   28803             :         },
   28804             :         { .name = NULL }
   28805             : };
   28806             : 
   28807           0 : static PyObject *py_srvsvc_NetTransportCtr3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   28808             : {
   28809           0 :         return pytalloc_new(struct srvsvc_NetTransportCtr3, type);
   28810             : }
   28811             : 
   28812             : 
   28813             : static PyTypeObject srvsvc_NetTransportCtr3_Type = {
   28814             :         PyVarObject_HEAD_INIT(NULL, 0)
   28815             :         .tp_name = "srvsvc.NetTransportCtr3",
   28816             :         .tp_getset = py_srvsvc_NetTransportCtr3_getsetters,
   28817             :         .tp_methods = NULL,
   28818             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   28819             :         .tp_new = py_srvsvc_NetTransportCtr3_new,
   28820             : };
   28821             : 
   28822           0 : static PyObject *py_import_srvsvc_NetTransportCtr(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetTransportCtr *in)
   28823             : {
   28824             :         PyObject *ret;
   28825             : 
   28826           0 :         switch (level) {
   28827           0 :                 case 0:
   28828           0 :                         if (in->ctr0 == NULL) {
   28829           0 :                                 ret = Py_None;
   28830           0 :                                 Py_INCREF(ret);
   28831             :                         } else {
   28832           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetTransportCtr0_Type, in->ctr0, in->ctr0);
   28833             :                         }
   28834           0 :                         return ret;
   28835             : 
   28836           0 :                 case 1:
   28837           0 :                         if (in->ctr1 == NULL) {
   28838           0 :                                 ret = Py_None;
   28839           0 :                                 Py_INCREF(ret);
   28840             :                         } else {
   28841           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetTransportCtr1_Type, in->ctr1, in->ctr1);
   28842             :                         }
   28843           0 :                         return ret;
   28844             : 
   28845           0 :                 case 2:
   28846           0 :                         if (in->ctr2 == NULL) {
   28847           0 :                                 ret = Py_None;
   28848           0 :                                 Py_INCREF(ret);
   28849             :                         } else {
   28850           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetTransportCtr2_Type, in->ctr2, in->ctr2);
   28851             :                         }
   28852           0 :                         return ret;
   28853             : 
   28854           0 :                 case 3:
   28855           0 :                         if (in->ctr3 == NULL) {
   28856           0 :                                 ret = Py_None;
   28857           0 :                                 Py_INCREF(ret);
   28858             :                         } else {
   28859           0 :                                 ret = pytalloc_reference_ex(&srvsvc_NetTransportCtr3_Type, in->ctr3, in->ctr3);
   28860             :                         }
   28861           0 :                         return ret;
   28862             : 
   28863           0 :                 default:
   28864           0 :                         ret = Py_None;
   28865           0 :                         Py_INCREF(ret);
   28866           0 :                         return ret;
   28867             : 
   28868             :         }
   28869             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   28870             :         return NULL;
   28871             : }
   28872             : 
   28873           0 : static union srvsvc_NetTransportCtr *py_export_srvsvc_NetTransportCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   28874             : {
   28875           0 :         union srvsvc_NetTransportCtr *ret = talloc_zero(mem_ctx, union srvsvc_NetTransportCtr);
   28876           0 :         switch (level) {
   28877           0 :                 case 0:
   28878           0 :                         if (in == NULL) {
   28879           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr0");
   28880           0 :                                 talloc_free(ret); return NULL;
   28881             :                         }
   28882           0 :                         if (in == Py_None) {
   28883           0 :                                 ret->ctr0 = NULL;
   28884             :                         } else {
   28885           0 :                                 ret->ctr0 = NULL;
   28886           0 :                                 PY_CHECK_TYPE(&srvsvc_NetTransportCtr0_Type, in, talloc_free(ret); return NULL;);
   28887           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   28888           0 :                                         PyErr_NoMemory();
   28889           0 :                                         talloc_free(ret); return NULL;
   28890             :                                 }
   28891           0 :                                 ret->ctr0 = (struct srvsvc_NetTransportCtr0 *)pytalloc_get_ptr(in);
   28892             :                         }
   28893           0 :                         break;
   28894             : 
   28895           0 :                 case 1:
   28896           0 :                         if (in == NULL) {
   28897           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
   28898           0 :                                 talloc_free(ret); return NULL;
   28899             :                         }
   28900           0 :                         if (in == Py_None) {
   28901           0 :                                 ret->ctr1 = NULL;
   28902             :                         } else {
   28903           0 :                                 ret->ctr1 = NULL;
   28904           0 :                                 PY_CHECK_TYPE(&srvsvc_NetTransportCtr1_Type, in, talloc_free(ret); return NULL;);
   28905           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   28906           0 :                                         PyErr_NoMemory();
   28907           0 :                                         talloc_free(ret); return NULL;
   28908             :                                 }
   28909           0 :                                 ret->ctr1 = (struct srvsvc_NetTransportCtr1 *)pytalloc_get_ptr(in);
   28910             :                         }
   28911           0 :                         break;
   28912             : 
   28913           0 :                 case 2:
   28914           0 :                         if (in == NULL) {
   28915           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr2");
   28916           0 :                                 talloc_free(ret); return NULL;
   28917             :                         }
   28918           0 :                         if (in == Py_None) {
   28919           0 :                                 ret->ctr2 = NULL;
   28920             :                         } else {
   28921           0 :                                 ret->ctr2 = NULL;
   28922           0 :                                 PY_CHECK_TYPE(&srvsvc_NetTransportCtr2_Type, in, talloc_free(ret); return NULL;);
   28923           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   28924           0 :                                         PyErr_NoMemory();
   28925           0 :                                         talloc_free(ret); return NULL;
   28926             :                                 }
   28927           0 :                                 ret->ctr2 = (struct srvsvc_NetTransportCtr2 *)pytalloc_get_ptr(in);
   28928             :                         }
   28929           0 :                         break;
   28930             : 
   28931           0 :                 case 3:
   28932           0 :                         if (in == NULL) {
   28933           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr3");
   28934           0 :                                 talloc_free(ret); return NULL;
   28935             :                         }
   28936           0 :                         if (in == Py_None) {
   28937           0 :                                 ret->ctr3 = NULL;
   28938             :                         } else {
   28939           0 :                                 ret->ctr3 = NULL;
   28940           0 :                                 PY_CHECK_TYPE(&srvsvc_NetTransportCtr3_Type, in, talloc_free(ret); return NULL;);
   28941           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   28942           0 :                                         PyErr_NoMemory();
   28943           0 :                                         talloc_free(ret); return NULL;
   28944             :                                 }
   28945           0 :                                 ret->ctr3 = (struct srvsvc_NetTransportCtr3 *)pytalloc_get_ptr(in);
   28946             :                         }
   28947           0 :                         break;
   28948             : 
   28949           0 :                 default:
   28950           0 :                         break;
   28951             : 
   28952             :         }
   28953             : 
   28954           0 :         return ret;
   28955             : }
   28956             : 
   28957           0 : static PyObject *py_srvsvc_NetTransportCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   28958             : {
   28959           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   28960           0 :         PyObject *mem_ctx_obj = NULL;
   28961           0 :         TALLOC_CTX *mem_ctx = NULL;
   28962           0 :         int level = 0;
   28963           0 :         PyObject *in_obj = NULL;
   28964           0 :         union srvsvc_NetTransportCtr *in = NULL;
   28965             : 
   28966           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   28967             :                 discard_const_p(char *, kwnames),
   28968             :                 &mem_ctx_obj,
   28969             :                 &level,
   28970             :                 &in_obj)) {
   28971           0 :                 return NULL;
   28972             :         }
   28973           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   28974           0 :         if (mem_ctx == NULL) {
   28975           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   28976           0 :                 return NULL;
   28977             :         }
   28978           0 :         in = (union srvsvc_NetTransportCtr *)pytalloc_get_ptr(in_obj);
   28979           0 :         if (in == NULL) {
   28980           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union srvsvc_NetTransportCtr!");
   28981           0 :                 return NULL;
   28982             :         }
   28983             : 
   28984           0 :         return py_import_srvsvc_NetTransportCtr(mem_ctx, level, in);
   28985             : }
   28986             : 
   28987           0 : static PyObject *py_srvsvc_NetTransportCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   28988             : {
   28989           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   28990           0 :         PyObject *mem_ctx_obj = NULL;
   28991           0 :         TALLOC_CTX *mem_ctx = NULL;
   28992           0 :         int level = 0;
   28993           0 :         PyObject *in = NULL;
   28994           0 :         union srvsvc_NetTransportCtr *out = NULL;
   28995             : 
   28996           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   28997             :                 discard_const_p(char *, kwnames),
   28998             :                 &mem_ctx_obj,
   28999             :                 &level,
   29000             :                 &in)) {
   29001           0 :                 return NULL;
   29002             :         }
   29003           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   29004           0 :         if (mem_ctx == NULL) {
   29005           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   29006           0 :                 return NULL;
   29007             :         }
   29008             : 
   29009           0 :         out = py_export_srvsvc_NetTransportCtr(mem_ctx, level, in);
   29010           0 :         if (out == NULL) {
   29011           0 :                 return NULL;
   29012             :         }
   29013             : 
   29014           0 :         return pytalloc_GenericObject_reference(out);
   29015             : }
   29016             : 
   29017             : static PyMethodDef py_srvsvc_NetTransportCtr_methods[] = {
   29018             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportCtr_import),
   29019             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   29020             :                 "T.__import__(mem_ctx, level, in) => ret." },
   29021             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportCtr_export),
   29022             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   29023             :                 "T.__export__(mem_ctx, level, in) => ret." },
   29024             :         { NULL, NULL, 0, NULL }
   29025             : };
   29026             : 
   29027           0 : static PyObject *py_srvsvc_NetTransportCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   29028             : {
   29029           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   29030           0 :         return NULL;
   29031             : }
   29032             : 
   29033             : 
   29034             : static PyTypeObject srvsvc_NetTransportCtr_Type = {
   29035             :         PyVarObject_HEAD_INIT(NULL, 0)
   29036             :         .tp_name = "srvsvc.NetTransportCtr",
   29037             :         .tp_getset = NULL,
   29038             :         .tp_methods = py_srvsvc_NetTransportCtr_methods,
   29039             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   29040             :         .tp_new = py_srvsvc_NetTransportCtr_new,
   29041             : };
   29042             : 
   29043             : 
   29044           0 : static PyObject *py_srvsvc_NetTransportInfoCtr_get_level(PyObject *obj, void *closure)
   29045             : {
   29046           0 :         struct srvsvc_NetTransportInfoCtr *object = (struct srvsvc_NetTransportInfoCtr *)pytalloc_get_ptr(obj);
   29047             :         PyObject *py_level;
   29048           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->level);
   29049           0 :         return py_level;
   29050             : }
   29051             : 
   29052           0 : static int py_srvsvc_NetTransportInfoCtr_set_level(PyObject *py_obj, PyObject *value, void *closure)
   29053             : {
   29054           0 :         struct srvsvc_NetTransportInfoCtr *object = (struct srvsvc_NetTransportInfoCtr *)pytalloc_get_ptr(py_obj);
   29055           0 :         if (value == NULL) {
   29056           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->level");
   29057           0 :                 return -1;
   29058             :         }
   29059             :         {
   29060           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
   29061           0 :                 if (PyLong_Check(value)) {
   29062             :                         unsigned long long test_var;
   29063           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29064           0 :                         if (PyErr_Occurred() != NULL) {
   29065           0 :                                 return -1;
   29066             :                         }
   29067           0 :                         if (test_var > uint_max) {
   29068           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29069             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29070           0 :                                 return -1;
   29071             :                         }
   29072           0 :                         object->level = test_var;
   29073             :                 } else {
   29074           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29075             :                           PyLong_Type.tp_name);
   29076           0 :                         return -1;
   29077             :                 }
   29078             :         }
   29079           0 :         return 0;
   29080             : }
   29081             : 
   29082           0 : static PyObject *py_srvsvc_NetTransportInfoCtr_get_ctr(PyObject *obj, void *closure)
   29083             : {
   29084           0 :         struct srvsvc_NetTransportInfoCtr *object = (struct srvsvc_NetTransportInfoCtr *)pytalloc_get_ptr(obj);
   29085             :         PyObject *py_ctr;
   29086           0 :         py_ctr = pyrpc_import_union(&srvsvc_NetTransportCtr_Type, pytalloc_get_mem_ctx(obj), object->level, &object->ctr, "union srvsvc_NetTransportCtr");
   29087           0 :         if (py_ctr == NULL) {
   29088           0 :                 return NULL;
   29089             :         }
   29090           0 :         return py_ctr;
   29091             : }
   29092             : 
   29093           0 : static int py_srvsvc_NetTransportInfoCtr_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
   29094             : {
   29095           0 :         struct srvsvc_NetTransportInfoCtr *object = (struct srvsvc_NetTransportInfoCtr *)pytalloc_get_ptr(py_obj);
   29096           0 :         if (value == NULL) {
   29097           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctr");
   29098           0 :                 return -1;
   29099             :         }
   29100             :         {
   29101             :                 union srvsvc_NetTransportCtr *ctr_switch_0;
   29102           0 :                 ctr_switch_0 = (union srvsvc_NetTransportCtr *)pyrpc_export_union(&srvsvc_NetTransportCtr_Type, pytalloc_get_mem_ctx(py_obj), object->level, value, "union srvsvc_NetTransportCtr");
   29103           0 :                 if (ctr_switch_0 == NULL) {
   29104           0 :                         return -1;
   29105             :                 }
   29106           0 :                 object->ctr = *ctr_switch_0;
   29107             :         }
   29108           0 :         return 0;
   29109             : }
   29110             : 
   29111             : static PyGetSetDef py_srvsvc_NetTransportInfoCtr_getsetters[] = {
   29112             :         {
   29113             :                 .name = discard_const_p(char, "level"),
   29114             :                 .get = py_srvsvc_NetTransportInfoCtr_get_level,
   29115             :                 .set = py_srvsvc_NetTransportInfoCtr_set_level,
   29116             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29117             :         },
   29118             :         {
   29119             :                 .name = discard_const_p(char, "ctr"),
   29120             :                 .get = py_srvsvc_NetTransportInfoCtr_get_ctr,
   29121             :                 .set = py_srvsvc_NetTransportInfoCtr_set_ctr,
   29122             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetTransportCtr")
   29123             :         },
   29124             :         { .name = NULL }
   29125             : };
   29126             : 
   29127           0 : static PyObject *py_srvsvc_NetTransportInfoCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   29128             : {
   29129           0 :         return pytalloc_new(struct srvsvc_NetTransportInfoCtr, type);
   29130             : }
   29131             : 
   29132             : 
   29133             : static PyTypeObject srvsvc_NetTransportInfoCtr_Type = {
   29134             :         PyVarObject_HEAD_INIT(NULL, 0)
   29135             :         .tp_name = "srvsvc.NetTransportInfoCtr",
   29136             :         .tp_getset = py_srvsvc_NetTransportInfoCtr_getsetters,
   29137             :         .tp_methods = NULL,
   29138             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   29139             :         .tp_new = py_srvsvc_NetTransportInfoCtr_new,
   29140             : };
   29141             : 
   29142             : 
   29143           0 : static PyObject *py_srvsvc_NetRemoteTODInfo_get_elapsed(PyObject *obj, void *closure)
   29144             : {
   29145           0 :         struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
   29146             :         PyObject *py_elapsed;
   29147           0 :         py_elapsed = PyLong_FromUnsignedLongLong((uint32_t)object->elapsed);
   29148           0 :         return py_elapsed;
   29149             : }
   29150             : 
   29151           0 : static int py_srvsvc_NetRemoteTODInfo_set_elapsed(PyObject *py_obj, PyObject *value, void *closure)
   29152             : {
   29153           0 :         struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
   29154           0 :         if (value == NULL) {
   29155           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->elapsed");
   29156           0 :                 return -1;
   29157             :         }
   29158             :         {
   29159           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->elapsed));
   29160           0 :                 if (PyLong_Check(value)) {
   29161             :                         unsigned long long test_var;
   29162           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29163           0 :                         if (PyErr_Occurred() != NULL) {
   29164           0 :                                 return -1;
   29165             :                         }
   29166           0 :                         if (test_var > uint_max) {
   29167           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29168             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29169           0 :                                 return -1;
   29170             :                         }
   29171           0 :                         object->elapsed = test_var;
   29172             :                 } else {
   29173           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29174             :                           PyLong_Type.tp_name);
   29175           0 :                         return -1;
   29176             :                 }
   29177             :         }
   29178           0 :         return 0;
   29179             : }
   29180             : 
   29181           0 : static PyObject *py_srvsvc_NetRemoteTODInfo_get_msecs(PyObject *obj, void *closure)
   29182             : {
   29183           0 :         struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
   29184             :         PyObject *py_msecs;
   29185           0 :         py_msecs = PyLong_FromUnsignedLongLong((uint32_t)object->msecs);
   29186           0 :         return py_msecs;
   29187             : }
   29188             : 
   29189           0 : static int py_srvsvc_NetRemoteTODInfo_set_msecs(PyObject *py_obj, PyObject *value, void *closure)
   29190             : {
   29191           0 :         struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
   29192           0 :         if (value == NULL) {
   29193           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->msecs");
   29194           0 :                 return -1;
   29195             :         }
   29196             :         {
   29197           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->msecs));
   29198           0 :                 if (PyLong_Check(value)) {
   29199             :                         unsigned long long test_var;
   29200           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29201           0 :                         if (PyErr_Occurred() != NULL) {
   29202           0 :                                 return -1;
   29203             :                         }
   29204           0 :                         if (test_var > uint_max) {
   29205           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29206             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29207           0 :                                 return -1;
   29208             :                         }
   29209           0 :                         object->msecs = test_var;
   29210             :                 } else {
   29211           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29212             :                           PyLong_Type.tp_name);
   29213           0 :                         return -1;
   29214             :                 }
   29215             :         }
   29216           0 :         return 0;
   29217             : }
   29218             : 
   29219           0 : static PyObject *py_srvsvc_NetRemoteTODInfo_get_hours(PyObject *obj, void *closure)
   29220             : {
   29221           0 :         struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
   29222             :         PyObject *py_hours;
   29223           0 :         py_hours = PyLong_FromUnsignedLongLong((uint32_t)object->hours);
   29224           0 :         return py_hours;
   29225             : }
   29226             : 
   29227           0 : static int py_srvsvc_NetRemoteTODInfo_set_hours(PyObject *py_obj, PyObject *value, void *closure)
   29228             : {
   29229           0 :         struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
   29230           0 :         if (value == NULL) {
   29231           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->hours");
   29232           0 :                 return -1;
   29233             :         }
   29234             :         {
   29235           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->hours));
   29236           0 :                 if (PyLong_Check(value)) {
   29237             :                         unsigned long long test_var;
   29238           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29239           0 :                         if (PyErr_Occurred() != NULL) {
   29240           0 :                                 return -1;
   29241             :                         }
   29242           0 :                         if (test_var > uint_max) {
   29243           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29244             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29245           0 :                                 return -1;
   29246             :                         }
   29247           0 :                         object->hours = test_var;
   29248             :                 } else {
   29249           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29250             :                           PyLong_Type.tp_name);
   29251           0 :                         return -1;
   29252             :                 }
   29253             :         }
   29254           0 :         return 0;
   29255             : }
   29256             : 
   29257           0 : static PyObject *py_srvsvc_NetRemoteTODInfo_get_mins(PyObject *obj, void *closure)
   29258             : {
   29259           0 :         struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
   29260             :         PyObject *py_mins;
   29261           0 :         py_mins = PyLong_FromUnsignedLongLong((uint32_t)object->mins);
   29262           0 :         return py_mins;
   29263             : }
   29264             : 
   29265           0 : static int py_srvsvc_NetRemoteTODInfo_set_mins(PyObject *py_obj, PyObject *value, void *closure)
   29266             : {
   29267           0 :         struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
   29268           0 :         if (value == NULL) {
   29269           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->mins");
   29270           0 :                 return -1;
   29271             :         }
   29272             :         {
   29273           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->mins));
   29274           0 :                 if (PyLong_Check(value)) {
   29275             :                         unsigned long long test_var;
   29276           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29277           0 :                         if (PyErr_Occurred() != NULL) {
   29278           0 :                                 return -1;
   29279             :                         }
   29280           0 :                         if (test_var > uint_max) {
   29281           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29282             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29283           0 :                                 return -1;
   29284             :                         }
   29285           0 :                         object->mins = test_var;
   29286             :                 } else {
   29287           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29288             :                           PyLong_Type.tp_name);
   29289           0 :                         return -1;
   29290             :                 }
   29291             :         }
   29292           0 :         return 0;
   29293             : }
   29294             : 
   29295           0 : static PyObject *py_srvsvc_NetRemoteTODInfo_get_secs(PyObject *obj, void *closure)
   29296             : {
   29297           0 :         struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
   29298             :         PyObject *py_secs;
   29299           0 :         py_secs = PyLong_FromUnsignedLongLong((uint32_t)object->secs);
   29300           0 :         return py_secs;
   29301             : }
   29302             : 
   29303           0 : static int py_srvsvc_NetRemoteTODInfo_set_secs(PyObject *py_obj, PyObject *value, void *closure)
   29304             : {
   29305           0 :         struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
   29306           0 :         if (value == NULL) {
   29307           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->secs");
   29308           0 :                 return -1;
   29309             :         }
   29310             :         {
   29311           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->secs));
   29312           0 :                 if (PyLong_Check(value)) {
   29313             :                         unsigned long long test_var;
   29314           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29315           0 :                         if (PyErr_Occurred() != NULL) {
   29316           0 :                                 return -1;
   29317             :                         }
   29318           0 :                         if (test_var > uint_max) {
   29319           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29320             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29321           0 :                                 return -1;
   29322             :                         }
   29323           0 :                         object->secs = test_var;
   29324             :                 } else {
   29325           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29326             :                           PyLong_Type.tp_name);
   29327           0 :                         return -1;
   29328             :                 }
   29329             :         }
   29330           0 :         return 0;
   29331             : }
   29332             : 
   29333           0 : static PyObject *py_srvsvc_NetRemoteTODInfo_get_hunds(PyObject *obj, void *closure)
   29334             : {
   29335           0 :         struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
   29336             :         PyObject *py_hunds;
   29337           0 :         py_hunds = PyLong_FromUnsignedLongLong((uint32_t)object->hunds);
   29338           0 :         return py_hunds;
   29339             : }
   29340             : 
   29341           0 : static int py_srvsvc_NetRemoteTODInfo_set_hunds(PyObject *py_obj, PyObject *value, void *closure)
   29342             : {
   29343           0 :         struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
   29344           0 :         if (value == NULL) {
   29345           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->hunds");
   29346           0 :                 return -1;
   29347             :         }
   29348             :         {
   29349           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->hunds));
   29350           0 :                 if (PyLong_Check(value)) {
   29351             :                         unsigned long long test_var;
   29352           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29353           0 :                         if (PyErr_Occurred() != NULL) {
   29354           0 :                                 return -1;
   29355             :                         }
   29356           0 :                         if (test_var > uint_max) {
   29357           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29358             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29359           0 :                                 return -1;
   29360             :                         }
   29361           0 :                         object->hunds = test_var;
   29362             :                 } else {
   29363           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29364             :                           PyLong_Type.tp_name);
   29365           0 :                         return -1;
   29366             :                 }
   29367             :         }
   29368           0 :         return 0;
   29369             : }
   29370             : 
   29371           0 : static PyObject *py_srvsvc_NetRemoteTODInfo_get_timezone(PyObject *obj, void *closure)
   29372             : {
   29373           0 :         struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
   29374             :         PyObject *py_timezone;
   29375           0 :         py_timezone = PyLong_FromLong(object->timezone);
   29376           0 :         return py_timezone;
   29377             : }
   29378             : 
   29379           0 : static int py_srvsvc_NetRemoteTODInfo_set_timezone(PyObject *py_obj, PyObject *value, void *closure)
   29380             : {
   29381           0 :         struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
   29382           0 :         if (value == NULL) {
   29383           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->timezone");
   29384           0 :                 return -1;
   29385             :         }
   29386             :         {
   29387           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->timezone));
   29388           0 :                 const long long int_min = -int_max - 1;
   29389           0 :                 if (PyLong_Check(value)) {
   29390             :                         long long test_var;
   29391           0 :                         test_var = PyLong_AsLongLong(value);
   29392           0 :                         if (PyErr_Occurred() != NULL) {
   29393           0 :                                 return -1;
   29394             :                         }
   29395           0 :                         if (test_var < int_min || test_var > int_max) {
   29396           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
   29397             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
   29398           0 :                                 return -1;
   29399             :                         }
   29400           0 :                         object->timezone = test_var;
   29401             :                 } else {
   29402           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29403             :                           PyLong_Type.tp_name);
   29404           0 :                         return -1;
   29405             :                 }
   29406             :         }
   29407           0 :         return 0;
   29408             : }
   29409             : 
   29410           0 : static PyObject *py_srvsvc_NetRemoteTODInfo_get_tinterval(PyObject *obj, void *closure)
   29411             : {
   29412           0 :         struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
   29413             :         PyObject *py_tinterval;
   29414           0 :         py_tinterval = PyLong_FromUnsignedLongLong((uint32_t)object->tinterval);
   29415           0 :         return py_tinterval;
   29416             : }
   29417             : 
   29418           0 : static int py_srvsvc_NetRemoteTODInfo_set_tinterval(PyObject *py_obj, PyObject *value, void *closure)
   29419             : {
   29420           0 :         struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
   29421           0 :         if (value == NULL) {
   29422           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->tinterval");
   29423           0 :                 return -1;
   29424             :         }
   29425             :         {
   29426           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->tinterval));
   29427           0 :                 if (PyLong_Check(value)) {
   29428             :                         unsigned long long test_var;
   29429           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29430           0 :                         if (PyErr_Occurred() != NULL) {
   29431           0 :                                 return -1;
   29432             :                         }
   29433           0 :                         if (test_var > uint_max) {
   29434           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29435             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29436           0 :                                 return -1;
   29437             :                         }
   29438           0 :                         object->tinterval = test_var;
   29439             :                 } else {
   29440           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29441             :                           PyLong_Type.tp_name);
   29442           0 :                         return -1;
   29443             :                 }
   29444             :         }
   29445           0 :         return 0;
   29446             : }
   29447             : 
   29448           0 : static PyObject *py_srvsvc_NetRemoteTODInfo_get_day(PyObject *obj, void *closure)
   29449             : {
   29450           0 :         struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
   29451             :         PyObject *py_day;
   29452           0 :         py_day = PyLong_FromUnsignedLongLong((uint32_t)object->day);
   29453           0 :         return py_day;
   29454             : }
   29455             : 
   29456           0 : static int py_srvsvc_NetRemoteTODInfo_set_day(PyObject *py_obj, PyObject *value, void *closure)
   29457             : {
   29458           0 :         struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
   29459           0 :         if (value == NULL) {
   29460           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->day");
   29461           0 :                 return -1;
   29462             :         }
   29463             :         {
   29464           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->day));
   29465           0 :                 if (PyLong_Check(value)) {
   29466             :                         unsigned long long test_var;
   29467           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29468           0 :                         if (PyErr_Occurred() != NULL) {
   29469           0 :                                 return -1;
   29470             :                         }
   29471           0 :                         if (test_var > uint_max) {
   29472           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29473             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29474           0 :                                 return -1;
   29475             :                         }
   29476           0 :                         object->day = test_var;
   29477             :                 } else {
   29478           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29479             :                           PyLong_Type.tp_name);
   29480           0 :                         return -1;
   29481             :                 }
   29482             :         }
   29483           0 :         return 0;
   29484             : }
   29485             : 
   29486           0 : static PyObject *py_srvsvc_NetRemoteTODInfo_get_month(PyObject *obj, void *closure)
   29487             : {
   29488           0 :         struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
   29489             :         PyObject *py_month;
   29490           0 :         py_month = PyLong_FromUnsignedLongLong((uint32_t)object->month);
   29491           0 :         return py_month;
   29492             : }
   29493             : 
   29494           0 : static int py_srvsvc_NetRemoteTODInfo_set_month(PyObject *py_obj, PyObject *value, void *closure)
   29495             : {
   29496           0 :         struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
   29497           0 :         if (value == NULL) {
   29498           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->month");
   29499           0 :                 return -1;
   29500             :         }
   29501             :         {
   29502           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->month));
   29503           0 :                 if (PyLong_Check(value)) {
   29504             :                         unsigned long long test_var;
   29505           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29506           0 :                         if (PyErr_Occurred() != NULL) {
   29507           0 :                                 return -1;
   29508             :                         }
   29509           0 :                         if (test_var > uint_max) {
   29510           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29511             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29512           0 :                                 return -1;
   29513             :                         }
   29514           0 :                         object->month = test_var;
   29515             :                 } else {
   29516           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29517             :                           PyLong_Type.tp_name);
   29518           0 :                         return -1;
   29519             :                 }
   29520             :         }
   29521           0 :         return 0;
   29522             : }
   29523             : 
   29524           0 : static PyObject *py_srvsvc_NetRemoteTODInfo_get_year(PyObject *obj, void *closure)
   29525             : {
   29526           0 :         struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
   29527             :         PyObject *py_year;
   29528           0 :         py_year = PyLong_FromUnsignedLongLong((uint32_t)object->year);
   29529           0 :         return py_year;
   29530             : }
   29531             : 
   29532           0 : static int py_srvsvc_NetRemoteTODInfo_set_year(PyObject *py_obj, PyObject *value, void *closure)
   29533             : {
   29534           0 :         struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
   29535           0 :         if (value == NULL) {
   29536           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->year");
   29537           0 :                 return -1;
   29538             :         }
   29539             :         {
   29540           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->year));
   29541           0 :                 if (PyLong_Check(value)) {
   29542             :                         unsigned long long test_var;
   29543           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29544           0 :                         if (PyErr_Occurred() != NULL) {
   29545           0 :                                 return -1;
   29546             :                         }
   29547           0 :                         if (test_var > uint_max) {
   29548           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29549             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29550           0 :                                 return -1;
   29551             :                         }
   29552           0 :                         object->year = test_var;
   29553             :                 } else {
   29554           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29555             :                           PyLong_Type.tp_name);
   29556           0 :                         return -1;
   29557             :                 }
   29558             :         }
   29559           0 :         return 0;
   29560             : }
   29561             : 
   29562           0 : static PyObject *py_srvsvc_NetRemoteTODInfo_get_weekday(PyObject *obj, void *closure)
   29563             : {
   29564           0 :         struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(obj);
   29565             :         PyObject *py_weekday;
   29566           0 :         py_weekday = PyLong_FromUnsignedLongLong((uint32_t)object->weekday);
   29567           0 :         return py_weekday;
   29568             : }
   29569             : 
   29570           0 : static int py_srvsvc_NetRemoteTODInfo_set_weekday(PyObject *py_obj, PyObject *value, void *closure)
   29571             : {
   29572           0 :         struct srvsvc_NetRemoteTODInfo *object = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(py_obj);
   29573           0 :         if (value == NULL) {
   29574           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->weekday");
   29575           0 :                 return -1;
   29576             :         }
   29577             :         {
   29578           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->weekday));
   29579           0 :                 if (PyLong_Check(value)) {
   29580             :                         unsigned long long test_var;
   29581           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29582           0 :                         if (PyErr_Occurred() != NULL) {
   29583           0 :                                 return -1;
   29584             :                         }
   29585           0 :                         if (test_var > uint_max) {
   29586           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29587             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29588           0 :                                 return -1;
   29589             :                         }
   29590           0 :                         object->weekday = test_var;
   29591             :                 } else {
   29592           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29593             :                           PyLong_Type.tp_name);
   29594           0 :                         return -1;
   29595             :                 }
   29596             :         }
   29597           0 :         return 0;
   29598             : }
   29599             : 
   29600             : static PyGetSetDef py_srvsvc_NetRemoteTODInfo_getsetters[] = {
   29601             :         {
   29602             :                 .name = discard_const_p(char, "elapsed"),
   29603             :                 .get = py_srvsvc_NetRemoteTODInfo_get_elapsed,
   29604             :                 .set = py_srvsvc_NetRemoteTODInfo_set_elapsed,
   29605             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29606             :         },
   29607             :         {
   29608             :                 .name = discard_const_p(char, "msecs"),
   29609             :                 .get = py_srvsvc_NetRemoteTODInfo_get_msecs,
   29610             :                 .set = py_srvsvc_NetRemoteTODInfo_set_msecs,
   29611             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29612             :         },
   29613             :         {
   29614             :                 .name = discard_const_p(char, "hours"),
   29615             :                 .get = py_srvsvc_NetRemoteTODInfo_get_hours,
   29616             :                 .set = py_srvsvc_NetRemoteTODInfo_set_hours,
   29617             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29618             :         },
   29619             :         {
   29620             :                 .name = discard_const_p(char, "mins"),
   29621             :                 .get = py_srvsvc_NetRemoteTODInfo_get_mins,
   29622             :                 .set = py_srvsvc_NetRemoteTODInfo_set_mins,
   29623             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29624             :         },
   29625             :         {
   29626             :                 .name = discard_const_p(char, "secs"),
   29627             :                 .get = py_srvsvc_NetRemoteTODInfo_get_secs,
   29628             :                 .set = py_srvsvc_NetRemoteTODInfo_set_secs,
   29629             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29630             :         },
   29631             :         {
   29632             :                 .name = discard_const_p(char, "hunds"),
   29633             :                 .get = py_srvsvc_NetRemoteTODInfo_get_hunds,
   29634             :                 .set = py_srvsvc_NetRemoteTODInfo_set_hunds,
   29635             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29636             :         },
   29637             :         {
   29638             :                 .name = discard_const_p(char, "timezone"),
   29639             :                 .get = py_srvsvc_NetRemoteTODInfo_get_timezone,
   29640             :                 .set = py_srvsvc_NetRemoteTODInfo_set_timezone,
   29641             :                 .doc = discard_const_p(char, "PIDL-generated element of base type int32")
   29642             :         },
   29643             :         {
   29644             :                 .name = discard_const_p(char, "tinterval"),
   29645             :                 .get = py_srvsvc_NetRemoteTODInfo_get_tinterval,
   29646             :                 .set = py_srvsvc_NetRemoteTODInfo_set_tinterval,
   29647             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29648             :         },
   29649             :         {
   29650             :                 .name = discard_const_p(char, "day"),
   29651             :                 .get = py_srvsvc_NetRemoteTODInfo_get_day,
   29652             :                 .set = py_srvsvc_NetRemoteTODInfo_set_day,
   29653             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29654             :         },
   29655             :         {
   29656             :                 .name = discard_const_p(char, "month"),
   29657             :                 .get = py_srvsvc_NetRemoteTODInfo_get_month,
   29658             :                 .set = py_srvsvc_NetRemoteTODInfo_set_month,
   29659             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29660             :         },
   29661             :         {
   29662             :                 .name = discard_const_p(char, "year"),
   29663             :                 .get = py_srvsvc_NetRemoteTODInfo_get_year,
   29664             :                 .set = py_srvsvc_NetRemoteTODInfo_set_year,
   29665             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29666             :         },
   29667             :         {
   29668             :                 .name = discard_const_p(char, "weekday"),
   29669             :                 .get = py_srvsvc_NetRemoteTODInfo_get_weekday,
   29670             :                 .set = py_srvsvc_NetRemoteTODInfo_set_weekday,
   29671             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29672             :         },
   29673             :         { .name = NULL }
   29674             : };
   29675             : 
   29676           0 : static PyObject *py_srvsvc_NetRemoteTODInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   29677             : {
   29678           0 :         return pytalloc_new(struct srvsvc_NetRemoteTODInfo, type);
   29679             : }
   29680             : 
   29681             : 
   29682             : static PyTypeObject srvsvc_NetRemoteTODInfo_Type = {
   29683             :         PyVarObject_HEAD_INIT(NULL, 0)
   29684             :         .tp_name = "srvsvc.NetRemoteTODInfo",
   29685             :         .tp_getset = py_srvsvc_NetRemoteTODInfo_getsetters,
   29686             :         .tp_methods = NULL,
   29687             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   29688             :         .tp_new = py_srvsvc_NetRemoteTODInfo_new,
   29689             : };
   29690             : 
   29691           0 : static PyObject *py_import_srvsvc_NetTransportInfo(TALLOC_CTX *mem_ctx, int level, union srvsvc_NetTransportInfo *in)
   29692             : {
   29693             :         PyObject *ret;
   29694             : 
   29695           0 :         switch (level) {
   29696           0 :                 case 0:
   29697           0 :                         ret = pytalloc_reference_ex(&srvsvc_NetTransportInfo0_Type, mem_ctx, &in->info0);
   29698           0 :                         return ret;
   29699             : 
   29700           0 :                 case 1:
   29701           0 :                         ret = pytalloc_reference_ex(&srvsvc_NetTransportInfo1_Type, mem_ctx, &in->info1);
   29702           0 :                         return ret;
   29703             : 
   29704           0 :                 case 2:
   29705           0 :                         ret = pytalloc_reference_ex(&srvsvc_NetTransportInfo2_Type, mem_ctx, &in->info2);
   29706           0 :                         return ret;
   29707             : 
   29708           0 :                 case 3:
   29709           0 :                         ret = pytalloc_reference_ex(&srvsvc_NetTransportInfo3_Type, mem_ctx, &in->info3);
   29710           0 :                         return ret;
   29711             : 
   29712             :         }
   29713           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   29714           0 :         return NULL;
   29715             : }
   29716             : 
   29717           0 : static union srvsvc_NetTransportInfo *py_export_srvsvc_NetTransportInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   29718             : {
   29719           0 :         union srvsvc_NetTransportInfo *ret = talloc_zero(mem_ctx, union srvsvc_NetTransportInfo);
   29720           0 :         switch (level) {
   29721           0 :                 case 0:
   29722           0 :                         if (in == NULL) {
   29723           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info0");
   29724           0 :                                 talloc_free(ret); return NULL;
   29725             :                         }
   29726           0 :                         PY_CHECK_TYPE(&srvsvc_NetTransportInfo0_Type, in, talloc_free(ret); return NULL;);
   29727           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   29728           0 :                                 PyErr_NoMemory();
   29729           0 :                                 talloc_free(ret); return NULL;
   29730             :                         }
   29731           0 :                         ret->info0 = *(struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(in);
   29732           0 :                         break;
   29733             : 
   29734           0 :                 case 1:
   29735           0 :                         if (in == NULL) {
   29736           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1");
   29737           0 :                                 talloc_free(ret); return NULL;
   29738             :                         }
   29739           0 :                         PY_CHECK_TYPE(&srvsvc_NetTransportInfo1_Type, in, talloc_free(ret); return NULL;);
   29740           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   29741           0 :                                 PyErr_NoMemory();
   29742           0 :                                 talloc_free(ret); return NULL;
   29743             :                         }
   29744           0 :                         ret->info1 = *(struct srvsvc_NetTransportInfo1 *)pytalloc_get_ptr(in);
   29745           0 :                         break;
   29746             : 
   29747           0 :                 case 2:
   29748           0 :                         if (in == NULL) {
   29749           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info2");
   29750           0 :                                 talloc_free(ret); return NULL;
   29751             :                         }
   29752           0 :                         PY_CHECK_TYPE(&srvsvc_NetTransportInfo2_Type, in, talloc_free(ret); return NULL;);
   29753           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   29754           0 :                                 PyErr_NoMemory();
   29755           0 :                                 talloc_free(ret); return NULL;
   29756             :                         }
   29757           0 :                         ret->info2 = *(struct srvsvc_NetTransportInfo2 *)pytalloc_get_ptr(in);
   29758           0 :                         break;
   29759             : 
   29760           0 :                 case 3:
   29761           0 :                         if (in == NULL) {
   29762           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info3");
   29763           0 :                                 talloc_free(ret); return NULL;
   29764             :                         }
   29765           0 :                         PY_CHECK_TYPE(&srvsvc_NetTransportInfo3_Type, in, talloc_free(ret); return NULL;);
   29766           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   29767           0 :                                 PyErr_NoMemory();
   29768           0 :                                 talloc_free(ret); return NULL;
   29769             :                         }
   29770           0 :                         ret->info3 = *(struct srvsvc_NetTransportInfo3 *)pytalloc_get_ptr(in);
   29771           0 :                         break;
   29772             : 
   29773           0 :                 default:
   29774           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   29775           0 :                         talloc_free(ret);
   29776           0 :                         ret = NULL;
   29777             :         }
   29778             : 
   29779           0 :         return ret;
   29780             : }
   29781             : 
   29782           0 : static PyObject *py_srvsvc_NetTransportInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   29783             : {
   29784           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   29785           0 :         PyObject *mem_ctx_obj = NULL;
   29786           0 :         TALLOC_CTX *mem_ctx = NULL;
   29787           0 :         int level = 0;
   29788           0 :         PyObject *in_obj = NULL;
   29789           0 :         union srvsvc_NetTransportInfo *in = NULL;
   29790             : 
   29791           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   29792             :                 discard_const_p(char *, kwnames),
   29793             :                 &mem_ctx_obj,
   29794             :                 &level,
   29795             :                 &in_obj)) {
   29796           0 :                 return NULL;
   29797             :         }
   29798           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   29799           0 :         if (mem_ctx == NULL) {
   29800           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   29801           0 :                 return NULL;
   29802             :         }
   29803           0 :         in = (union srvsvc_NetTransportInfo *)pytalloc_get_ptr(in_obj);
   29804           0 :         if (in == NULL) {
   29805           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union srvsvc_NetTransportInfo!");
   29806           0 :                 return NULL;
   29807             :         }
   29808             : 
   29809           0 :         return py_import_srvsvc_NetTransportInfo(mem_ctx, level, in);
   29810             : }
   29811             : 
   29812           0 : static PyObject *py_srvsvc_NetTransportInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   29813             : {
   29814           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   29815           0 :         PyObject *mem_ctx_obj = NULL;
   29816           0 :         TALLOC_CTX *mem_ctx = NULL;
   29817           0 :         int level = 0;
   29818           0 :         PyObject *in = NULL;
   29819           0 :         union srvsvc_NetTransportInfo *out = NULL;
   29820             : 
   29821           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   29822             :                 discard_const_p(char *, kwnames),
   29823             :                 &mem_ctx_obj,
   29824             :                 &level,
   29825             :                 &in)) {
   29826           0 :                 return NULL;
   29827             :         }
   29828           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   29829           0 :         if (mem_ctx == NULL) {
   29830           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   29831           0 :                 return NULL;
   29832             :         }
   29833             : 
   29834           0 :         out = py_export_srvsvc_NetTransportInfo(mem_ctx, level, in);
   29835           0 :         if (out == NULL) {
   29836           0 :                 return NULL;
   29837             :         }
   29838             : 
   29839           0 :         return pytalloc_GenericObject_reference(out);
   29840             : }
   29841             : 
   29842             : static PyMethodDef py_srvsvc_NetTransportInfo_methods[] = {
   29843             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportInfo_import),
   29844             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   29845             :                 "T.__import__(mem_ctx, level, in) => ret." },
   29846             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportInfo_export),
   29847             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   29848             :                 "T.__export__(mem_ctx, level, in) => ret." },
   29849             :         { NULL, NULL, 0, NULL }
   29850             : };
   29851             : 
   29852           0 : static PyObject *py_srvsvc_NetTransportInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   29853             : {
   29854           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   29855           0 :         return NULL;
   29856             : }
   29857             : 
   29858             : 
   29859             : static PyTypeObject srvsvc_NetTransportInfo_Type = {
   29860             :         PyVarObject_HEAD_INIT(NULL, 0)
   29861             :         .tp_name = "srvsvc.NetTransportInfo",
   29862             :         .tp_getset = NULL,
   29863             :         .tp_methods = py_srvsvc_NetTransportInfo_methods,
   29864             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   29865             :         .tp_new = py_srvsvc_NetTransportInfo_new,
   29866             : };
   29867             : 
   29868             : 
   29869             : 
   29870           0 : static PyObject *py_srvsvc_NetCharDevEnum_in_get_server_unc(PyObject *obj, void *closure)
   29871             : {
   29872           0 :         struct srvsvc_NetCharDevEnum *object = (struct srvsvc_NetCharDevEnum *)pytalloc_get_ptr(obj);
   29873             :         PyObject *py_server_unc;
   29874           0 :         if (object->in.server_unc == NULL) {
   29875           0 :                 Py_RETURN_NONE;
   29876             :         }
   29877           0 :         if (object->in.server_unc == NULL) {
   29878           0 :                 py_server_unc = Py_None;
   29879           0 :                 Py_INCREF(py_server_unc);
   29880             :         } else {
   29881           0 :                 if (object->in.server_unc == NULL) {
   29882           0 :                         py_server_unc = Py_None;
   29883           0 :                         Py_INCREF(py_server_unc);
   29884             :                 } else {
   29885           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   29886             :                 }
   29887             :         }
   29888           0 :         return py_server_unc;
   29889             : }
   29890             : 
   29891           0 : static int py_srvsvc_NetCharDevEnum_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   29892             : {
   29893           0 :         struct srvsvc_NetCharDevEnum *object = (struct srvsvc_NetCharDevEnum *)pytalloc_get_ptr(py_obj);
   29894           0 :         if (value == NULL) {
   29895           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   29896           0 :                 return -1;
   29897             :         }
   29898           0 :         if (value == Py_None) {
   29899           0 :                 object->in.server_unc = NULL;
   29900             :         } else {
   29901           0 :                 object->in.server_unc = NULL;
   29902             :                 {
   29903             :                         const char *test_str;
   29904             :                         const char *talloc_str;
   29905           0 :                         PyObject *unicode = NULL;
   29906           0 :                         if (PyUnicode_Check(value)) {
   29907           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   29908           0 :                                 if (unicode == NULL) {
   29909           0 :                                         PyErr_NoMemory();
   29910           0 :                                         return -1;
   29911             :                                 }
   29912           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   29913           0 :                         } else if (PyBytes_Check(value)) {
   29914           0 :                                 test_str = PyBytes_AS_STRING(value);
   29915             :                         } else {
   29916           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   29917           0 :                                 return -1;
   29918             :                         }
   29919           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   29920           0 :                         if (unicode != NULL) {
   29921           0 :                                 Py_DECREF(unicode);
   29922             :                         }
   29923           0 :                         if (talloc_str == NULL) {
   29924           0 :                                 PyErr_NoMemory();
   29925           0 :                                 return -1;
   29926             :                         }
   29927           0 :                         object->in.server_unc = talloc_str;
   29928             :                 }
   29929             :         }
   29930           0 :         return 0;
   29931             : }
   29932             : 
   29933           0 : static PyObject *py_srvsvc_NetCharDevEnum_in_get_info_ctr(PyObject *obj, void *closure)
   29934             : {
   29935           0 :         struct srvsvc_NetCharDevEnum *object = (struct srvsvc_NetCharDevEnum *)pytalloc_get_ptr(obj);
   29936             :         PyObject *py_info_ctr;
   29937           0 :         if (object->in.info_ctr == NULL) {
   29938           0 :                 Py_RETURN_NONE;
   29939             :         }
   29940           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetCharDevInfoCtr_Type, object->in.info_ctr, object->in.info_ctr);
   29941           0 :         return py_info_ctr;
   29942             : }
   29943             : 
   29944           0 : static int py_srvsvc_NetCharDevEnum_in_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   29945             : {
   29946           0 :         struct srvsvc_NetCharDevEnum *object = (struct srvsvc_NetCharDevEnum *)pytalloc_get_ptr(py_obj);
   29947           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info_ctr));
   29948           0 :         if (value == NULL) {
   29949           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.info_ctr");
   29950           0 :                 return -1;
   29951             :         }
   29952           0 :         object->in.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info_ctr);
   29953           0 :         if (object->in.info_ctr == NULL) {
   29954           0 :                 PyErr_NoMemory();
   29955           0 :                 return -1;
   29956             :         }
   29957           0 :         PY_CHECK_TYPE(&srvsvc_NetCharDevInfoCtr_Type, value, return -1;);
   29958           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   29959           0 :                 PyErr_NoMemory();
   29960           0 :                 return -1;
   29961             :         }
   29962           0 :         object->in.info_ctr = (struct srvsvc_NetCharDevInfoCtr *)pytalloc_get_ptr(value);
   29963           0 :         return 0;
   29964             : }
   29965             : 
   29966           0 : static PyObject *py_srvsvc_NetCharDevEnum_out_get_info_ctr(PyObject *obj, void *closure)
   29967             : {
   29968           0 :         struct srvsvc_NetCharDevEnum *object = (struct srvsvc_NetCharDevEnum *)pytalloc_get_ptr(obj);
   29969             :         PyObject *py_info_ctr;
   29970           0 :         if (object->out.info_ctr == NULL) {
   29971           0 :                 Py_RETURN_NONE;
   29972             :         }
   29973           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetCharDevInfoCtr_Type, object->out.info_ctr, object->out.info_ctr);
   29974           0 :         return py_info_ctr;
   29975             : }
   29976             : 
   29977           0 : static int py_srvsvc_NetCharDevEnum_out_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   29978             : {
   29979           0 :         struct srvsvc_NetCharDevEnum *object = (struct srvsvc_NetCharDevEnum *)pytalloc_get_ptr(py_obj);
   29980           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info_ctr));
   29981           0 :         if (value == NULL) {
   29982           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info_ctr");
   29983           0 :                 return -1;
   29984             :         }
   29985           0 :         object->out.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info_ctr);
   29986           0 :         if (object->out.info_ctr == NULL) {
   29987           0 :                 PyErr_NoMemory();
   29988           0 :                 return -1;
   29989             :         }
   29990           0 :         PY_CHECK_TYPE(&srvsvc_NetCharDevInfoCtr_Type, value, return -1;);
   29991           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   29992           0 :                 PyErr_NoMemory();
   29993           0 :                 return -1;
   29994             :         }
   29995           0 :         object->out.info_ctr = (struct srvsvc_NetCharDevInfoCtr *)pytalloc_get_ptr(value);
   29996           0 :         return 0;
   29997             : }
   29998             : 
   29999           0 : static PyObject *py_srvsvc_NetCharDevEnum_in_get_max_buffer(PyObject *obj, void *closure)
   30000             : {
   30001           0 :         struct srvsvc_NetCharDevEnum *object = (struct srvsvc_NetCharDevEnum *)pytalloc_get_ptr(obj);
   30002             :         PyObject *py_max_buffer;
   30003           0 :         py_max_buffer = PyLong_FromUnsignedLongLong((uint32_t)object->in.max_buffer);
   30004           0 :         return py_max_buffer;
   30005             : }
   30006             : 
   30007           0 : static int py_srvsvc_NetCharDevEnum_in_set_max_buffer(PyObject *py_obj, PyObject *value, void *closure)
   30008             : {
   30009           0 :         struct srvsvc_NetCharDevEnum *object = (struct srvsvc_NetCharDevEnum *)pytalloc_get_ptr(py_obj);
   30010           0 :         if (value == NULL) {
   30011           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.max_buffer");
   30012           0 :                 return -1;
   30013             :         }
   30014             :         {
   30015           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.max_buffer));
   30016           0 :                 if (PyLong_Check(value)) {
   30017             :                         unsigned long long test_var;
   30018           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   30019           0 :                         if (PyErr_Occurred() != NULL) {
   30020           0 :                                 return -1;
   30021             :                         }
   30022           0 :                         if (test_var > uint_max) {
   30023           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30024             :                                   PyLong_Type.tp_name, uint_max, test_var);
   30025           0 :                                 return -1;
   30026             :                         }
   30027           0 :                         object->in.max_buffer = test_var;
   30028             :                 } else {
   30029           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   30030             :                           PyLong_Type.tp_name);
   30031           0 :                         return -1;
   30032             :                 }
   30033             :         }
   30034           0 :         return 0;
   30035             : }
   30036             : 
   30037           0 : static PyObject *py_srvsvc_NetCharDevEnum_out_get_totalentries(PyObject *obj, void *closure)
   30038             : {
   30039           0 :         struct srvsvc_NetCharDevEnum *object = (struct srvsvc_NetCharDevEnum *)pytalloc_get_ptr(obj);
   30040             :         PyObject *py_totalentries;
   30041           0 :         if (object->out.totalentries == NULL) {
   30042           0 :                 Py_RETURN_NONE;
   30043             :         }
   30044           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)*object->out.totalentries);
   30045           0 :         return py_totalentries;
   30046             : }
   30047             : 
   30048           0 : static int py_srvsvc_NetCharDevEnum_out_set_totalentries(PyObject *py_obj, PyObject *value, void *closure)
   30049             : {
   30050           0 :         struct srvsvc_NetCharDevEnum *object = (struct srvsvc_NetCharDevEnum *)pytalloc_get_ptr(py_obj);
   30051           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.totalentries));
   30052           0 :         if (value == NULL) {
   30053           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.totalentries");
   30054           0 :                 return -1;
   30055             :         }
   30056           0 :         object->out.totalentries = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.totalentries);
   30057           0 :         if (object->out.totalentries == NULL) {
   30058           0 :                 PyErr_NoMemory();
   30059           0 :                 return -1;
   30060             :         }
   30061             :         {
   30062           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.totalentries));
   30063           0 :                 if (PyLong_Check(value)) {
   30064             :                         unsigned long long test_var;
   30065           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   30066           0 :                         if (PyErr_Occurred() != NULL) {
   30067           0 :                                 return -1;
   30068             :                         }
   30069           0 :                         if (test_var > uint_max) {
   30070           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30071             :                                   PyLong_Type.tp_name, uint_max, test_var);
   30072           0 :                                 return -1;
   30073             :                         }
   30074           0 :                         *object->out.totalentries = test_var;
   30075             :                 } else {
   30076           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   30077             :                           PyLong_Type.tp_name);
   30078           0 :                         return -1;
   30079             :                 }
   30080             :         }
   30081           0 :         return 0;
   30082             : }
   30083             : 
   30084           0 : static PyObject *py_srvsvc_NetCharDevEnum_in_get_resume_handle(PyObject *obj, void *closure)
   30085             : {
   30086           0 :         struct srvsvc_NetCharDevEnum *object = (struct srvsvc_NetCharDevEnum *)pytalloc_get_ptr(obj);
   30087             :         PyObject *py_resume_handle;
   30088           0 :         if (object->in.resume_handle == NULL) {
   30089           0 :                 Py_RETURN_NONE;
   30090             :         }
   30091           0 :         if (object->in.resume_handle == NULL) {
   30092           0 :                 py_resume_handle = Py_None;
   30093           0 :                 Py_INCREF(py_resume_handle);
   30094             :         } else {
   30095           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)*object->in.resume_handle);
   30096             :         }
   30097           0 :         return py_resume_handle;
   30098             : }
   30099             : 
   30100           0 : static int py_srvsvc_NetCharDevEnum_in_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   30101             : {
   30102           0 :         struct srvsvc_NetCharDevEnum *object = (struct srvsvc_NetCharDevEnum *)pytalloc_get_ptr(py_obj);
   30103           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.resume_handle));
   30104           0 :         if (value == NULL) {
   30105           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.resume_handle");
   30106           0 :                 return -1;
   30107             :         }
   30108           0 :         if (value == Py_None) {
   30109           0 :                 object->in.resume_handle = NULL;
   30110             :         } else {
   30111           0 :                 object->in.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.resume_handle);
   30112           0 :                 if (object->in.resume_handle == NULL) {
   30113           0 :                         PyErr_NoMemory();
   30114           0 :                         return -1;
   30115             :                 }
   30116             :                 {
   30117           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.resume_handle));
   30118           0 :                         if (PyLong_Check(value)) {
   30119             :                                 unsigned long long test_var;
   30120           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   30121           0 :                                 if (PyErr_Occurred() != NULL) {
   30122           0 :                                         return -1;
   30123             :                                 }
   30124           0 :                                 if (test_var > uint_max) {
   30125           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30126             :                                           PyLong_Type.tp_name, uint_max, test_var);
   30127           0 :                                         return -1;
   30128             :                                 }
   30129           0 :                                 *object->in.resume_handle = test_var;
   30130             :                         } else {
   30131           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   30132             :                                   PyLong_Type.tp_name);
   30133           0 :                                 return -1;
   30134             :                         }
   30135             :                 }
   30136             :         }
   30137           0 :         return 0;
   30138             : }
   30139             : 
   30140           0 : static PyObject *py_srvsvc_NetCharDevEnum_out_get_resume_handle(PyObject *obj, void *closure)
   30141             : {
   30142           0 :         struct srvsvc_NetCharDevEnum *object = (struct srvsvc_NetCharDevEnum *)pytalloc_get_ptr(obj);
   30143             :         PyObject *py_resume_handle;
   30144           0 :         if (object->out.resume_handle == NULL) {
   30145           0 :                 Py_RETURN_NONE;
   30146             :         }
   30147           0 :         if (object->out.resume_handle == NULL) {
   30148           0 :                 py_resume_handle = Py_None;
   30149           0 :                 Py_INCREF(py_resume_handle);
   30150             :         } else {
   30151           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)*object->out.resume_handle);
   30152             :         }
   30153           0 :         return py_resume_handle;
   30154             : }
   30155             : 
   30156           0 : static int py_srvsvc_NetCharDevEnum_out_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   30157             : {
   30158           0 :         struct srvsvc_NetCharDevEnum *object = (struct srvsvc_NetCharDevEnum *)pytalloc_get_ptr(py_obj);
   30159           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.resume_handle));
   30160           0 :         if (value == NULL) {
   30161           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.resume_handle");
   30162           0 :                 return -1;
   30163             :         }
   30164           0 :         if (value == Py_None) {
   30165           0 :                 object->out.resume_handle = NULL;
   30166             :         } else {
   30167           0 :                 object->out.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.resume_handle);
   30168           0 :                 if (object->out.resume_handle == NULL) {
   30169           0 :                         PyErr_NoMemory();
   30170           0 :                         return -1;
   30171             :                 }
   30172             :                 {
   30173           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.resume_handle));
   30174           0 :                         if (PyLong_Check(value)) {
   30175             :                                 unsigned long long test_var;
   30176           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   30177           0 :                                 if (PyErr_Occurred() != NULL) {
   30178           0 :                                         return -1;
   30179             :                                 }
   30180           0 :                                 if (test_var > uint_max) {
   30181           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30182             :                                           PyLong_Type.tp_name, uint_max, test_var);
   30183           0 :                                         return -1;
   30184             :                                 }
   30185           0 :                                 *object->out.resume_handle = test_var;
   30186             :                         } else {
   30187           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   30188             :                                   PyLong_Type.tp_name);
   30189           0 :                                 return -1;
   30190             :                         }
   30191             :                 }
   30192             :         }
   30193           0 :         return 0;
   30194             : }
   30195             : 
   30196           0 : static PyObject *py_srvsvc_NetCharDevEnum_get_result(PyObject *obj, void *closure)
   30197             : {
   30198           0 :         struct srvsvc_NetCharDevEnum *object = (struct srvsvc_NetCharDevEnum *)pytalloc_get_ptr(obj);
   30199             :         PyObject *py_result;
   30200           0 :         py_result = PyErr_FromWERROR(object->out.result);
   30201           0 :         return py_result;
   30202             : }
   30203             : 
   30204           0 : static int py_srvsvc_NetCharDevEnum_set_result(PyObject *py_obj, PyObject *value, void *closure)
   30205             : {
   30206           0 :         struct srvsvc_NetCharDevEnum *object = (struct srvsvc_NetCharDevEnum *)pytalloc_get_ptr(py_obj);
   30207           0 :         if (value == NULL) {
   30208           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   30209           0 :                 return -1;
   30210             :         }
   30211           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   30212           0 :         return 0;
   30213             : }
   30214             : 
   30215             : static PyGetSetDef py_srvsvc_NetCharDevEnum_getsetters[] = {
   30216             :         {
   30217             :                 .name = discard_const_p(char, "in_server_unc"),
   30218             :                 .get = py_srvsvc_NetCharDevEnum_in_get_server_unc,
   30219             :                 .set = py_srvsvc_NetCharDevEnum_in_set_server_unc,
   30220             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   30221             :         },
   30222             :         {
   30223             :                 .name = discard_const_p(char, "in_info_ctr"),
   30224             :                 .get = py_srvsvc_NetCharDevEnum_in_get_info_ctr,
   30225             :                 .set = py_srvsvc_NetCharDevEnum_in_set_info_ctr,
   30226             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetCharDevInfoCtr")
   30227             :         },
   30228             :         {
   30229             :                 .name = discard_const_p(char, "out_info_ctr"),
   30230             :                 .get = py_srvsvc_NetCharDevEnum_out_get_info_ctr,
   30231             :                 .set = py_srvsvc_NetCharDevEnum_out_set_info_ctr,
   30232             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetCharDevInfoCtr")
   30233             :         },
   30234             :         {
   30235             :                 .name = discard_const_p(char, "in_max_buffer"),
   30236             :                 .get = py_srvsvc_NetCharDevEnum_in_get_max_buffer,
   30237             :                 .set = py_srvsvc_NetCharDevEnum_in_set_max_buffer,
   30238             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   30239             :         },
   30240             :         {
   30241             :                 .name = discard_const_p(char, "out_totalentries"),
   30242             :                 .get = py_srvsvc_NetCharDevEnum_out_get_totalentries,
   30243             :                 .set = py_srvsvc_NetCharDevEnum_out_set_totalentries,
   30244             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   30245             :         },
   30246             :         {
   30247             :                 .name = discard_const_p(char, "in_resume_handle"),
   30248             :                 .get = py_srvsvc_NetCharDevEnum_in_get_resume_handle,
   30249             :                 .set = py_srvsvc_NetCharDevEnum_in_set_resume_handle,
   30250             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   30251             :         },
   30252             :         {
   30253             :                 .name = discard_const_p(char, "out_resume_handle"),
   30254             :                 .get = py_srvsvc_NetCharDevEnum_out_get_resume_handle,
   30255             :                 .set = py_srvsvc_NetCharDevEnum_out_set_resume_handle,
   30256             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   30257             :         },
   30258             :         {
   30259             :                 .name = discard_const_p(char, "result"),
   30260             :                 .get = py_srvsvc_NetCharDevEnum_get_result,
   30261             :                 .set = py_srvsvc_NetCharDevEnum_set_result,
   30262             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   30263             :         },
   30264             :         { .name = NULL }
   30265             : };
   30266             : 
   30267           0 : static PyObject *py_srvsvc_NetCharDevEnum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   30268             : {
   30269           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetCharDevEnum, type);
   30270           0 :         struct srvsvc_NetCharDevEnum *_self = (struct srvsvc_NetCharDevEnum *)pytalloc_get_ptr(self);
   30271           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   30272           0 :         _self->in.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetCharDevInfoCtr);
   30273           0 :         _self->out.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetCharDevInfoCtr);
   30274           0 :         _self->out.totalentries = talloc_zero(mem_ctx, uint32_t);
   30275           0 :         return self;
   30276             : }
   30277             : 
   30278           0 : static PyObject *py_srvsvc_NetCharDevEnum_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   30279             : {
   30280             : 
   30281             : 
   30282           0 :         return PyLong_FromLong(0);
   30283             : }
   30284             : 
   30285           0 : static PyObject *py_srvsvc_NetCharDevEnum_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   30286             : {
   30287           0 :         const struct ndr_interface_call *call = NULL;
   30288           0 :         struct srvsvc_NetCharDevEnum *object = (struct srvsvc_NetCharDevEnum *)pytalloc_get_ptr(py_obj);
   30289           0 :         PyObject *ret = NULL;
   30290           0 :         struct ndr_push *push = NULL;
   30291             :         DATA_BLOB blob;
   30292             :         enum ndr_err_code err;
   30293             : 
   30294           0 :         if (ndr_table_srvsvc.num_calls < 1) {
   30295           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevEnum_ndr_pack");
   30296           0 :                 return NULL;
   30297             :         }
   30298           0 :         call = &ndr_table_srvsvc.calls[0];
   30299             : 
   30300           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   30301           0 :         if (push == NULL) {
   30302           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   30303           0 :                 return NULL;
   30304             :         }
   30305             : 
   30306           0 :         push->flags |= ndr_push_flags;
   30307             : 
   30308           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   30309           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   30310           0 :                 TALLOC_FREE(push);
   30311           0 :                 PyErr_SetNdrError(err);
   30312           0 :                 return NULL;
   30313             :         }
   30314           0 :         blob = ndr_push_blob(push);
   30315           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   30316           0 :         TALLOC_FREE(push);
   30317           0 :         return ret;
   30318             : }
   30319             : 
   30320           0 : static PyObject *py_srvsvc_NetCharDevEnum_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   30321             : {
   30322           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   30323           0 :         PyObject *bigendian_obj = NULL;
   30324           0 :         PyObject *ndr64_obj = NULL;
   30325           0 :         uint32_t ndr_push_flags = 0;
   30326             : 
   30327           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   30328             :                 discard_const_p(char *, kwnames),
   30329             :                 &bigendian_obj,
   30330             :                 &ndr64_obj)) {
   30331           0 :                 return NULL;
   30332             :         }
   30333             : 
   30334           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   30335           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   30336             :         }
   30337           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   30338           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   30339             :         }
   30340             : 
   30341           0 :         return py_srvsvc_NetCharDevEnum_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   30342             : }
   30343             : 
   30344           0 : static PyObject *py_srvsvc_NetCharDevEnum_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   30345             : {
   30346           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   30347           0 :         PyObject *bigendian_obj = NULL;
   30348           0 :         PyObject *ndr64_obj = NULL;
   30349           0 :         uint32_t ndr_push_flags = 0;
   30350             : 
   30351           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   30352             :                 discard_const_p(char *, kwnames),
   30353             :                 &bigendian_obj,
   30354             :                 &ndr64_obj)) {
   30355           0 :                 return NULL;
   30356             :         }
   30357             : 
   30358           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   30359           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   30360             :         }
   30361           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   30362           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   30363             :         }
   30364             : 
   30365           0 :         return py_srvsvc_NetCharDevEnum_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   30366             : }
   30367             : 
   30368           0 : static PyObject *py_srvsvc_NetCharDevEnum_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   30369             : {
   30370           0 :         const struct ndr_interface_call *call = NULL;
   30371           0 :         struct srvsvc_NetCharDevEnum *object = (struct srvsvc_NetCharDevEnum *)pytalloc_get_ptr(py_obj);
   30372           0 :         struct ndr_pull *pull = NULL;
   30373             :         enum ndr_err_code err;
   30374             : 
   30375           0 :         if (ndr_table_srvsvc.num_calls < 1) {
   30376           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevEnum_ndr_unpack");
   30377           0 :                 return NULL;
   30378             :         }
   30379           0 :         call = &ndr_table_srvsvc.calls[0];
   30380             : 
   30381           0 :         pull = ndr_pull_init_blob(blob, object);
   30382           0 :         if (pull == NULL) {
   30383           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   30384           0 :                 return NULL;
   30385             :         }
   30386             : 
   30387           0 :         pull->flags |= ndr_pull_flags;
   30388             : 
   30389           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   30390           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   30391           0 :                 TALLOC_FREE(pull);
   30392           0 :                 PyErr_SetNdrError(err);
   30393           0 :                 return NULL;
   30394             :         }
   30395           0 :         if (!allow_remaining) {
   30396             :                 uint32_t highest_ofs;
   30397             : 
   30398           0 :                 if (pull->offset > pull->relative_highest_offset) {
   30399           0 :                         highest_ofs = pull->offset;
   30400             :                 } else {
   30401           0 :                         highest_ofs = pull->relative_highest_offset;
   30402             :                 }
   30403           0 :                 if (highest_ofs < pull->data_size) {
   30404           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   30405             :                                 "not all bytes consumed ofs[%u] size[%u]",
   30406             :                                 highest_ofs, pull->data_size);
   30407           0 :                         TALLOC_FREE(pull);
   30408           0 :                         PyErr_SetNdrError(err);
   30409           0 :                         return NULL;
   30410             :                 }
   30411             :         }
   30412             : 
   30413           0 :         TALLOC_FREE(pull);
   30414           0 :         Py_RETURN_NONE;
   30415             : }
   30416             : 
   30417           0 : static PyObject *py_srvsvc_NetCharDevEnum_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   30418             : {
   30419             :         DATA_BLOB blob;
   30420           0 :         Py_ssize_t blob_length = 0;
   30421           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   30422           0 :         PyObject *bigendian_obj = NULL;
   30423           0 :         PyObject *ndr64_obj = NULL;
   30424           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   30425           0 :         PyObject *allow_remaining_obj = NULL;
   30426           0 :         bool allow_remaining = false;
   30427             : 
   30428           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   30429             :                 discard_const_p(char *, kwnames),
   30430             :                 &blob.data, &blob_length,
   30431             :                 &bigendian_obj,
   30432             :                 &ndr64_obj,
   30433             :                 &allow_remaining_obj)) {
   30434           0 :                 return NULL;
   30435             :         }
   30436           0 :         blob.length = blob_length;
   30437             : 
   30438           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   30439           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   30440             :         }
   30441           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   30442           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   30443             :         }
   30444             : 
   30445           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   30446           0 :                 allow_remaining = true;
   30447             :         }
   30448             : 
   30449           0 :         return py_srvsvc_NetCharDevEnum_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   30450             : }
   30451             : 
   30452           0 : static PyObject *py_srvsvc_NetCharDevEnum_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   30453             : {
   30454             :         DATA_BLOB blob;
   30455           0 :         Py_ssize_t blob_length = 0;
   30456           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   30457           0 :         PyObject *bigendian_obj = NULL;
   30458           0 :         PyObject *ndr64_obj = NULL;
   30459           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   30460           0 :         PyObject *allow_remaining_obj = NULL;
   30461           0 :         bool allow_remaining = false;
   30462             : 
   30463           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   30464             :                 discard_const_p(char *, kwnames),
   30465             :                 &blob.data, &blob_length,
   30466             :                 &bigendian_obj,
   30467             :                 &ndr64_obj,
   30468             :                 &allow_remaining_obj)) {
   30469           0 :                 return NULL;
   30470             :         }
   30471           0 :         blob.length = blob_length;
   30472             : 
   30473           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   30474           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   30475             :         }
   30476           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   30477           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   30478             :         }
   30479             : 
   30480           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   30481           0 :                 allow_remaining = true;
   30482             :         }
   30483             : 
   30484           0 :         return py_srvsvc_NetCharDevEnum_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   30485             : }
   30486             : 
   30487           0 : static PyObject *py_srvsvc_NetCharDevEnum_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   30488             : {
   30489           0 :         const struct ndr_interface_call *call = NULL;
   30490           0 :         struct srvsvc_NetCharDevEnum *object = (struct srvsvc_NetCharDevEnum *)pytalloc_get_ptr(py_obj);
   30491             :         PyObject *ret;
   30492             :         char *retstr;
   30493             : 
   30494           0 :         if (ndr_table_srvsvc.num_calls < 1) {
   30495           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevEnum_ndr_print");
   30496           0 :                 return NULL;
   30497             :         }
   30498           0 :         call = &ndr_table_srvsvc.calls[0];
   30499             : 
   30500           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   30501           0 :         ret = PyUnicode_FromString(retstr);
   30502           0 :         TALLOC_FREE(retstr);
   30503             : 
   30504           0 :         return ret;
   30505             : }
   30506             : 
   30507           0 : static PyObject *py_srvsvc_NetCharDevEnum_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   30508             : {
   30509           0 :         return py_srvsvc_NetCharDevEnum_ndr_print(py_obj, "srvsvc_NetCharDevEnum_in", NDR_IN);
   30510             : }
   30511             : 
   30512           0 : static PyObject *py_srvsvc_NetCharDevEnum_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   30513             : {
   30514           0 :         return py_srvsvc_NetCharDevEnum_ndr_print(py_obj, "srvsvc_NetCharDevEnum_out", NDR_OUT);
   30515             : }
   30516             : 
   30517             : static PyMethodDef py_srvsvc_NetCharDevEnum_methods[] = {
   30518             :         { "opnum", (PyCFunction)py_srvsvc_NetCharDevEnum_ndr_opnum, METH_NOARGS|METH_CLASS,
   30519             :                 "srvsvc.NetCharDevEnum.opnum() -> 0 (0x00) " },
   30520             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevEnum_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   30521             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   30522             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevEnum_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   30523             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   30524             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevEnum_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   30525             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   30526             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevEnum_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   30527             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   30528             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetCharDevEnum_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   30529             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetCharDevEnum_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   30530             :         { NULL, NULL, 0, NULL }
   30531             : };
   30532             : 
   30533             : 
   30534             : static PyTypeObject srvsvc_NetCharDevEnum_Type = {
   30535             :         PyVarObject_HEAD_INIT(NULL, 0)
   30536             :         .tp_name = "srvsvc.NetCharDevEnum",
   30537             :         .tp_getset = py_srvsvc_NetCharDevEnum_getsetters,
   30538             :         .tp_methods = py_srvsvc_NetCharDevEnum_methods,
   30539             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   30540             :         .tp_new = py_srvsvc_NetCharDevEnum_new,
   30541             : };
   30542             : 
   30543           0 : static bool pack_py_srvsvc_NetCharDevEnum_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetCharDevEnum *r)
   30544             : {
   30545             :         PyObject *py_server_unc;
   30546             :         PyObject *py_info_ctr;
   30547             :         PyObject *py_max_buffer;
   30548             :         PyObject *py_resume_handle;
   30549           0 :         const char *kwnames[] = {
   30550             :                 "server_unc", "info_ctr", "max_buffer", "resume_handle", NULL
   30551             :         };
   30552             : 
   30553           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetCharDevEnum", discard_const_p(char *, kwnames), &py_server_unc, &py_info_ctr, &py_max_buffer, &py_resume_handle)) {
   30554           0 :                 return false;
   30555             :         }
   30556             : 
   30557           0 :         if (py_server_unc == NULL) {
   30558           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   30559           0 :                 return false;
   30560             :         }
   30561           0 :         if (py_server_unc == Py_None) {
   30562           0 :                 r->in.server_unc = NULL;
   30563             :         } else {
   30564           0 :                 r->in.server_unc = NULL;
   30565             :                 {
   30566             :                         const char *test_str;
   30567             :                         const char *talloc_str;
   30568           0 :                         PyObject *unicode = NULL;
   30569           0 :                         if (PyUnicode_Check(py_server_unc)) {
   30570           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   30571           0 :                                 if (unicode == NULL) {
   30572           0 :                                         PyErr_NoMemory();
   30573           0 :                                         return false;
   30574             :                                 }
   30575           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   30576           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   30577           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   30578             :                         } else {
   30579           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   30580           0 :                                 return false;
   30581             :                         }
   30582           0 :                         talloc_str = talloc_strdup(r, test_str);
   30583           0 :                         if (unicode != NULL) {
   30584           0 :                                 Py_DECREF(unicode);
   30585             :                         }
   30586           0 :                         if (talloc_str == NULL) {
   30587           0 :                                 PyErr_NoMemory();
   30588           0 :                                 return false;
   30589             :                         }
   30590           0 :                         r->in.server_unc = talloc_str;
   30591             :                 }
   30592             :         }
   30593           0 :         if (py_info_ctr == NULL) {
   30594           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info_ctr");
   30595           0 :                 return false;
   30596             :         }
   30597           0 :         r->in.info_ctr = talloc_ptrtype(r, r->in.info_ctr);
   30598           0 :         if (r->in.info_ctr == NULL) {
   30599           0 :                 PyErr_NoMemory();
   30600           0 :                 return false;
   30601             :         }
   30602           0 :         PY_CHECK_TYPE(&srvsvc_NetCharDevInfoCtr_Type, py_info_ctr, return false;);
   30603           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_info_ctr)) == NULL) {
   30604           0 :                 PyErr_NoMemory();
   30605           0 :                 return false;
   30606             :         }
   30607           0 :         r->in.info_ctr = (struct srvsvc_NetCharDevInfoCtr *)pytalloc_get_ptr(py_info_ctr);
   30608           0 :         if (py_max_buffer == NULL) {
   30609           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.max_buffer");
   30610           0 :                 return false;
   30611             :         }
   30612             :         {
   30613           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
   30614           0 :                 if (PyLong_Check(py_max_buffer)) {
   30615             :                         unsigned long long test_var;
   30616           0 :                         test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
   30617           0 :                         if (PyErr_Occurred() != NULL) {
   30618           0 :                                 return false;
   30619             :                         }
   30620           0 :                         if (test_var > uint_max) {
   30621           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30622             :                                   PyLong_Type.tp_name, uint_max, test_var);
   30623           0 :                                 return false;
   30624             :                         }
   30625           0 :                         r->in.max_buffer = test_var;
   30626             :                 } else {
   30627           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   30628             :                           PyLong_Type.tp_name);
   30629           0 :                         return false;
   30630             :                 }
   30631             :         }
   30632           0 :         if (py_resume_handle == NULL) {
   30633           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.resume_handle");
   30634           0 :                 return false;
   30635             :         }
   30636           0 :         if (py_resume_handle == Py_None) {
   30637           0 :                 r->in.resume_handle = NULL;
   30638             :         } else {
   30639           0 :                 r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
   30640           0 :                 if (r->in.resume_handle == NULL) {
   30641           0 :                         PyErr_NoMemory();
   30642           0 :                         return false;
   30643             :                 }
   30644             :                 {
   30645           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
   30646           0 :                         if (PyLong_Check(py_resume_handle)) {
   30647             :                                 unsigned long long test_var;
   30648           0 :                                 test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
   30649           0 :                                 if (PyErr_Occurred() != NULL) {
   30650           0 :                                         return false;
   30651             :                                 }
   30652           0 :                                 if (test_var > uint_max) {
   30653           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30654             :                                           PyLong_Type.tp_name, uint_max, test_var);
   30655           0 :                                         return false;
   30656             :                                 }
   30657           0 :                                 *r->in.resume_handle = test_var;
   30658             :                         } else {
   30659           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   30660             :                                   PyLong_Type.tp_name);
   30661           0 :                                 return false;
   30662             :                         }
   30663             :                 }
   30664             :         }
   30665           0 :         return true;
   30666             : }
   30667             : 
   30668           0 : static PyObject *unpack_py_srvsvc_NetCharDevEnum_args_out(struct srvsvc_NetCharDevEnum *r)
   30669             : {
   30670             :         PyObject *result;
   30671             :         PyObject *py_info_ctr;
   30672             :         PyObject *py_totalentries;
   30673             :         PyObject *py_resume_handle;
   30674           0 :         result = PyTuple_New(3);
   30675           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetCharDevInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
   30676           0 :         PyTuple_SetItem(result, 0, py_info_ctr);
   30677           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)*r->out.totalentries);
   30678           0 :         PyTuple_SetItem(result, 1, py_totalentries);
   30679           0 :         if (r->out.resume_handle == NULL) {
   30680           0 :                 py_resume_handle = Py_None;
   30681           0 :                 Py_INCREF(py_resume_handle);
   30682             :         } else {
   30683           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)*r->out.resume_handle);
   30684             :         }
   30685           0 :         PyTuple_SetItem(result, 2, py_resume_handle);
   30686           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   30687           0 :                 PyErr_SetWERROR(r->out.result);
   30688           0 :                 return NULL;
   30689             :         }
   30690             : 
   30691           0 :         return result;
   30692             : }
   30693             : 
   30694             : 
   30695           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_in_get_server_unc(PyObject *obj, void *closure)
   30696             : {
   30697           0 :         struct srvsvc_NetCharDevGetInfo *object = (struct srvsvc_NetCharDevGetInfo *)pytalloc_get_ptr(obj);
   30698             :         PyObject *py_server_unc;
   30699           0 :         if (object->in.server_unc == NULL) {
   30700           0 :                 Py_RETURN_NONE;
   30701             :         }
   30702           0 :         if (object->in.server_unc == NULL) {
   30703           0 :                 py_server_unc = Py_None;
   30704           0 :                 Py_INCREF(py_server_unc);
   30705             :         } else {
   30706           0 :                 if (object->in.server_unc == NULL) {
   30707           0 :                         py_server_unc = Py_None;
   30708           0 :                         Py_INCREF(py_server_unc);
   30709             :                 } else {
   30710           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   30711             :                 }
   30712             :         }
   30713           0 :         return py_server_unc;
   30714             : }
   30715             : 
   30716           0 : static int py_srvsvc_NetCharDevGetInfo_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   30717             : {
   30718           0 :         struct srvsvc_NetCharDevGetInfo *object = (struct srvsvc_NetCharDevGetInfo *)pytalloc_get_ptr(py_obj);
   30719           0 :         if (value == NULL) {
   30720           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   30721           0 :                 return -1;
   30722             :         }
   30723           0 :         if (value == Py_None) {
   30724           0 :                 object->in.server_unc = NULL;
   30725             :         } else {
   30726           0 :                 object->in.server_unc = NULL;
   30727             :                 {
   30728             :                         const char *test_str;
   30729             :                         const char *talloc_str;
   30730           0 :                         PyObject *unicode = NULL;
   30731           0 :                         if (PyUnicode_Check(value)) {
   30732           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   30733           0 :                                 if (unicode == NULL) {
   30734           0 :                                         PyErr_NoMemory();
   30735           0 :                                         return -1;
   30736             :                                 }
   30737           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   30738           0 :                         } else if (PyBytes_Check(value)) {
   30739           0 :                                 test_str = PyBytes_AS_STRING(value);
   30740             :                         } else {
   30741           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   30742           0 :                                 return -1;
   30743             :                         }
   30744           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   30745           0 :                         if (unicode != NULL) {
   30746           0 :                                 Py_DECREF(unicode);
   30747             :                         }
   30748           0 :                         if (talloc_str == NULL) {
   30749           0 :                                 PyErr_NoMemory();
   30750           0 :                                 return -1;
   30751             :                         }
   30752           0 :                         object->in.server_unc = talloc_str;
   30753             :                 }
   30754             :         }
   30755           0 :         return 0;
   30756             : }
   30757             : 
   30758           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_in_get_device_name(PyObject *obj, void *closure)
   30759             : {
   30760           0 :         struct srvsvc_NetCharDevGetInfo *object = (struct srvsvc_NetCharDevGetInfo *)pytalloc_get_ptr(obj);
   30761             :         PyObject *py_device_name;
   30762           0 :         if (object->in.device_name == NULL) {
   30763           0 :                 py_device_name = Py_None;
   30764           0 :                 Py_INCREF(py_device_name);
   30765             :         } else {
   30766           0 :                 py_device_name = PyUnicode_Decode(object->in.device_name, strlen(object->in.device_name), "utf-8", "ignore");
   30767             :         }
   30768           0 :         return py_device_name;
   30769             : }
   30770             : 
   30771           0 : static int py_srvsvc_NetCharDevGetInfo_in_set_device_name(PyObject *py_obj, PyObject *value, void *closure)
   30772             : {
   30773           0 :         struct srvsvc_NetCharDevGetInfo *object = (struct srvsvc_NetCharDevGetInfo *)pytalloc_get_ptr(py_obj);
   30774           0 :         if (value == NULL) {
   30775           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.device_name");
   30776           0 :                 return -1;
   30777             :         }
   30778             :         {
   30779             :                 const char *test_str;
   30780             :                 const char *talloc_str;
   30781           0 :                 PyObject *unicode = NULL;
   30782           0 :                 if (PyUnicode_Check(value)) {
   30783           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   30784           0 :                         if (unicode == NULL) {
   30785           0 :                                 PyErr_NoMemory();
   30786           0 :                                 return -1;
   30787             :                         }
   30788           0 :                         test_str = PyBytes_AS_STRING(unicode);
   30789           0 :                 } else if (PyBytes_Check(value)) {
   30790           0 :                         test_str = PyBytes_AS_STRING(value);
   30791             :                 } else {
   30792           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   30793           0 :                         return -1;
   30794             :                 }
   30795           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   30796           0 :                 if (unicode != NULL) {
   30797           0 :                         Py_DECREF(unicode);
   30798             :                 }
   30799           0 :                 if (talloc_str == NULL) {
   30800           0 :                         PyErr_NoMemory();
   30801           0 :                         return -1;
   30802             :                 }
   30803           0 :                 object->in.device_name = talloc_str;
   30804             :         }
   30805           0 :         return 0;
   30806             : }
   30807             : 
   30808           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_in_get_level(PyObject *obj, void *closure)
   30809             : {
   30810           0 :         struct srvsvc_NetCharDevGetInfo *object = (struct srvsvc_NetCharDevGetInfo *)pytalloc_get_ptr(obj);
   30811             :         PyObject *py_level;
   30812           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   30813           0 :         return py_level;
   30814             : }
   30815             : 
   30816           0 : static int py_srvsvc_NetCharDevGetInfo_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   30817             : {
   30818           0 :         struct srvsvc_NetCharDevGetInfo *object = (struct srvsvc_NetCharDevGetInfo *)pytalloc_get_ptr(py_obj);
   30819           0 :         if (value == NULL) {
   30820           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   30821           0 :                 return -1;
   30822             :         }
   30823             :         {
   30824           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   30825           0 :                 if (PyLong_Check(value)) {
   30826             :                         unsigned long long test_var;
   30827           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   30828           0 :                         if (PyErr_Occurred() != NULL) {
   30829           0 :                                 return -1;
   30830             :                         }
   30831           0 :                         if (test_var > uint_max) {
   30832           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30833             :                                   PyLong_Type.tp_name, uint_max, test_var);
   30834           0 :                                 return -1;
   30835             :                         }
   30836           0 :                         object->in.level = test_var;
   30837             :                 } else {
   30838           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   30839             :                           PyLong_Type.tp_name);
   30840           0 :                         return -1;
   30841             :                 }
   30842             :         }
   30843           0 :         return 0;
   30844             : }
   30845             : 
   30846           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_out_get_info(PyObject *obj, void *closure)
   30847             : {
   30848           0 :         struct srvsvc_NetCharDevGetInfo *object = (struct srvsvc_NetCharDevGetInfo *)pytalloc_get_ptr(obj);
   30849             :         PyObject *py_info;
   30850           0 :         if (object->out.info == NULL) {
   30851           0 :                 Py_RETURN_NONE;
   30852             :         }
   30853           0 :         py_info = pyrpc_import_union(&srvsvc_NetCharDevInfo_Type, object->out.info, object->in.level, object->out.info, "union srvsvc_NetCharDevInfo");
   30854           0 :         if (py_info == NULL) {
   30855           0 :                 return NULL;
   30856             :         }
   30857           0 :         return py_info;
   30858             : }
   30859             : 
   30860           0 : static int py_srvsvc_NetCharDevGetInfo_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   30861             : {
   30862           0 :         struct srvsvc_NetCharDevGetInfo *object = (struct srvsvc_NetCharDevGetInfo *)pytalloc_get_ptr(py_obj);
   30863           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   30864           0 :         if (value == NULL) {
   30865           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info");
   30866           0 :                 return -1;
   30867             :         }
   30868           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   30869           0 :         if (object->out.info == NULL) {
   30870           0 :                 PyErr_NoMemory();
   30871           0 :                 return -1;
   30872             :         }
   30873             :         {
   30874             :                 union srvsvc_NetCharDevInfo *info_switch_1;
   30875           0 :                 info_switch_1 = (union srvsvc_NetCharDevInfo *)pyrpc_export_union(&srvsvc_NetCharDevInfo_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union srvsvc_NetCharDevInfo");
   30876           0 :                 if (info_switch_1 == NULL) {
   30877           0 :                         return -1;
   30878             :                 }
   30879           0 :                 object->out.info = info_switch_1;
   30880             :         }
   30881           0 :         return 0;
   30882             : }
   30883             : 
   30884           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_get_result(PyObject *obj, void *closure)
   30885             : {
   30886           0 :         struct srvsvc_NetCharDevGetInfo *object = (struct srvsvc_NetCharDevGetInfo *)pytalloc_get_ptr(obj);
   30887             :         PyObject *py_result;
   30888           0 :         py_result = PyErr_FromWERROR(object->out.result);
   30889           0 :         return py_result;
   30890             : }
   30891             : 
   30892           0 : static int py_srvsvc_NetCharDevGetInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
   30893             : {
   30894           0 :         struct srvsvc_NetCharDevGetInfo *object = (struct srvsvc_NetCharDevGetInfo *)pytalloc_get_ptr(py_obj);
   30895           0 :         if (value == NULL) {
   30896           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   30897           0 :                 return -1;
   30898             :         }
   30899           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   30900           0 :         return 0;
   30901             : }
   30902             : 
   30903             : static PyGetSetDef py_srvsvc_NetCharDevGetInfo_getsetters[] = {
   30904             :         {
   30905             :                 .name = discard_const_p(char, "in_server_unc"),
   30906             :                 .get = py_srvsvc_NetCharDevGetInfo_in_get_server_unc,
   30907             :                 .set = py_srvsvc_NetCharDevGetInfo_in_set_server_unc,
   30908             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   30909             :         },
   30910             :         {
   30911             :                 .name = discard_const_p(char, "in_device_name"),
   30912             :                 .get = py_srvsvc_NetCharDevGetInfo_in_get_device_name,
   30913             :                 .set = py_srvsvc_NetCharDevGetInfo_in_set_device_name,
   30914             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   30915             :         },
   30916             :         {
   30917             :                 .name = discard_const_p(char, "in_level"),
   30918             :                 .get = py_srvsvc_NetCharDevGetInfo_in_get_level,
   30919             :                 .set = py_srvsvc_NetCharDevGetInfo_in_set_level,
   30920             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   30921             :         },
   30922             :         {
   30923             :                 .name = discard_const_p(char, "out_info"),
   30924             :                 .get = py_srvsvc_NetCharDevGetInfo_out_get_info,
   30925             :                 .set = py_srvsvc_NetCharDevGetInfo_out_set_info,
   30926             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetCharDevInfo")
   30927             :         },
   30928             :         {
   30929             :                 .name = discard_const_p(char, "result"),
   30930             :                 .get = py_srvsvc_NetCharDevGetInfo_get_result,
   30931             :                 .set = py_srvsvc_NetCharDevGetInfo_set_result,
   30932             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   30933             :         },
   30934             :         { .name = NULL }
   30935             : };
   30936             : 
   30937           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   30938             : {
   30939           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetCharDevGetInfo, type);
   30940           0 :         struct srvsvc_NetCharDevGetInfo *_self = (struct srvsvc_NetCharDevGetInfo *)pytalloc_get_ptr(self);
   30941           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   30942           0 :         _self->out.info = talloc_zero(mem_ctx, union srvsvc_NetCharDevInfo);
   30943           0 :         return self;
   30944             : }
   30945             : 
   30946           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   30947             : {
   30948             : 
   30949             : 
   30950           0 :         return PyLong_FromLong(1);
   30951             : }
   30952             : 
   30953           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   30954             : {
   30955           0 :         const struct ndr_interface_call *call = NULL;
   30956           0 :         struct srvsvc_NetCharDevGetInfo *object = (struct srvsvc_NetCharDevGetInfo *)pytalloc_get_ptr(py_obj);
   30957           0 :         PyObject *ret = NULL;
   30958           0 :         struct ndr_push *push = NULL;
   30959             :         DATA_BLOB blob;
   30960             :         enum ndr_err_code err;
   30961             : 
   30962           0 :         if (ndr_table_srvsvc.num_calls < 2) {
   30963           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevGetInfo_ndr_pack");
   30964           0 :                 return NULL;
   30965             :         }
   30966           0 :         call = &ndr_table_srvsvc.calls[1];
   30967             : 
   30968           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   30969           0 :         if (push == NULL) {
   30970           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   30971           0 :                 return NULL;
   30972             :         }
   30973             : 
   30974           0 :         push->flags |= ndr_push_flags;
   30975             : 
   30976           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   30977           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   30978           0 :                 TALLOC_FREE(push);
   30979           0 :                 PyErr_SetNdrError(err);
   30980           0 :                 return NULL;
   30981             :         }
   30982           0 :         blob = ndr_push_blob(push);
   30983           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   30984           0 :         TALLOC_FREE(push);
   30985           0 :         return ret;
   30986             : }
   30987             : 
   30988           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   30989             : {
   30990           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   30991           0 :         PyObject *bigendian_obj = NULL;
   30992           0 :         PyObject *ndr64_obj = NULL;
   30993           0 :         uint32_t ndr_push_flags = 0;
   30994             : 
   30995           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   30996             :                 discard_const_p(char *, kwnames),
   30997             :                 &bigendian_obj,
   30998             :                 &ndr64_obj)) {
   30999           0 :                 return NULL;
   31000             :         }
   31001             : 
   31002           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   31003           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   31004             :         }
   31005           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   31006           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   31007             :         }
   31008             : 
   31009           0 :         return py_srvsvc_NetCharDevGetInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   31010             : }
   31011             : 
   31012           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   31013             : {
   31014           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   31015           0 :         PyObject *bigendian_obj = NULL;
   31016           0 :         PyObject *ndr64_obj = NULL;
   31017           0 :         uint32_t ndr_push_flags = 0;
   31018             : 
   31019           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   31020             :                 discard_const_p(char *, kwnames),
   31021             :                 &bigendian_obj,
   31022             :                 &ndr64_obj)) {
   31023           0 :                 return NULL;
   31024             :         }
   31025             : 
   31026           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   31027           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   31028             :         }
   31029           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   31030           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   31031             :         }
   31032             : 
   31033           0 :         return py_srvsvc_NetCharDevGetInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   31034             : }
   31035             : 
   31036           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   31037             : {
   31038           0 :         const struct ndr_interface_call *call = NULL;
   31039           0 :         struct srvsvc_NetCharDevGetInfo *object = (struct srvsvc_NetCharDevGetInfo *)pytalloc_get_ptr(py_obj);
   31040           0 :         struct ndr_pull *pull = NULL;
   31041             :         enum ndr_err_code err;
   31042             : 
   31043           0 :         if (ndr_table_srvsvc.num_calls < 2) {
   31044           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevGetInfo_ndr_unpack");
   31045           0 :                 return NULL;
   31046             :         }
   31047           0 :         call = &ndr_table_srvsvc.calls[1];
   31048             : 
   31049           0 :         pull = ndr_pull_init_blob(blob, object);
   31050           0 :         if (pull == NULL) {
   31051           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   31052           0 :                 return NULL;
   31053             :         }
   31054             : 
   31055           0 :         pull->flags |= ndr_pull_flags;
   31056             : 
   31057           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   31058           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   31059           0 :                 TALLOC_FREE(pull);
   31060           0 :                 PyErr_SetNdrError(err);
   31061           0 :                 return NULL;
   31062             :         }
   31063           0 :         if (!allow_remaining) {
   31064             :                 uint32_t highest_ofs;
   31065             : 
   31066           0 :                 if (pull->offset > pull->relative_highest_offset) {
   31067           0 :                         highest_ofs = pull->offset;
   31068             :                 } else {
   31069           0 :                         highest_ofs = pull->relative_highest_offset;
   31070             :                 }
   31071           0 :                 if (highest_ofs < pull->data_size) {
   31072           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   31073             :                                 "not all bytes consumed ofs[%u] size[%u]",
   31074             :                                 highest_ofs, pull->data_size);
   31075           0 :                         TALLOC_FREE(pull);
   31076           0 :                         PyErr_SetNdrError(err);
   31077           0 :                         return NULL;
   31078             :                 }
   31079             :         }
   31080             : 
   31081           0 :         TALLOC_FREE(pull);
   31082           0 :         Py_RETURN_NONE;
   31083             : }
   31084             : 
   31085           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   31086             : {
   31087             :         DATA_BLOB blob;
   31088           0 :         Py_ssize_t blob_length = 0;
   31089           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   31090           0 :         PyObject *bigendian_obj = NULL;
   31091           0 :         PyObject *ndr64_obj = NULL;
   31092           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   31093           0 :         PyObject *allow_remaining_obj = NULL;
   31094           0 :         bool allow_remaining = false;
   31095             : 
   31096           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   31097             :                 discard_const_p(char *, kwnames),
   31098             :                 &blob.data, &blob_length,
   31099             :                 &bigendian_obj,
   31100             :                 &ndr64_obj,
   31101             :                 &allow_remaining_obj)) {
   31102           0 :                 return NULL;
   31103             :         }
   31104           0 :         blob.length = blob_length;
   31105             : 
   31106           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   31107           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   31108             :         }
   31109           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   31110           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   31111             :         }
   31112             : 
   31113           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   31114           0 :                 allow_remaining = true;
   31115             :         }
   31116             : 
   31117           0 :         return py_srvsvc_NetCharDevGetInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   31118             : }
   31119             : 
   31120           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   31121             : {
   31122             :         DATA_BLOB blob;
   31123           0 :         Py_ssize_t blob_length = 0;
   31124           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   31125           0 :         PyObject *bigendian_obj = NULL;
   31126           0 :         PyObject *ndr64_obj = NULL;
   31127           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   31128           0 :         PyObject *allow_remaining_obj = NULL;
   31129           0 :         bool allow_remaining = false;
   31130             : 
   31131           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   31132             :                 discard_const_p(char *, kwnames),
   31133             :                 &blob.data, &blob_length,
   31134             :                 &bigendian_obj,
   31135             :                 &ndr64_obj,
   31136             :                 &allow_remaining_obj)) {
   31137           0 :                 return NULL;
   31138             :         }
   31139           0 :         blob.length = blob_length;
   31140             : 
   31141           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   31142           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   31143             :         }
   31144           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   31145           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   31146             :         }
   31147             : 
   31148           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   31149           0 :                 allow_remaining = true;
   31150             :         }
   31151             : 
   31152           0 :         return py_srvsvc_NetCharDevGetInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   31153             : }
   31154             : 
   31155           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   31156             : {
   31157           0 :         const struct ndr_interface_call *call = NULL;
   31158           0 :         struct srvsvc_NetCharDevGetInfo *object = (struct srvsvc_NetCharDevGetInfo *)pytalloc_get_ptr(py_obj);
   31159             :         PyObject *ret;
   31160             :         char *retstr;
   31161             : 
   31162           0 :         if (ndr_table_srvsvc.num_calls < 2) {
   31163           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevGetInfo_ndr_print");
   31164           0 :                 return NULL;
   31165             :         }
   31166           0 :         call = &ndr_table_srvsvc.calls[1];
   31167             : 
   31168           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   31169           0 :         ret = PyUnicode_FromString(retstr);
   31170           0 :         TALLOC_FREE(retstr);
   31171             : 
   31172           0 :         return ret;
   31173             : }
   31174             : 
   31175           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   31176             : {
   31177           0 :         return py_srvsvc_NetCharDevGetInfo_ndr_print(py_obj, "srvsvc_NetCharDevGetInfo_in", NDR_IN);
   31178             : }
   31179             : 
   31180           0 : static PyObject *py_srvsvc_NetCharDevGetInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   31181             : {
   31182           0 :         return py_srvsvc_NetCharDevGetInfo_ndr_print(py_obj, "srvsvc_NetCharDevGetInfo_out", NDR_OUT);
   31183             : }
   31184             : 
   31185             : static PyMethodDef py_srvsvc_NetCharDevGetInfo_methods[] = {
   31186             :         { "opnum", (PyCFunction)py_srvsvc_NetCharDevGetInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
   31187             :                 "srvsvc.NetCharDevGetInfo.opnum() -> 1 (0x01) " },
   31188             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevGetInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   31189             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   31190             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevGetInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   31191             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   31192             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevGetInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   31193             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   31194             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevGetInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   31195             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   31196             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetCharDevGetInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   31197             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetCharDevGetInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   31198             :         { NULL, NULL, 0, NULL }
   31199             : };
   31200             : 
   31201             : 
   31202             : static PyTypeObject srvsvc_NetCharDevGetInfo_Type = {
   31203             :         PyVarObject_HEAD_INIT(NULL, 0)
   31204             :         .tp_name = "srvsvc.NetCharDevGetInfo",
   31205             :         .tp_getset = py_srvsvc_NetCharDevGetInfo_getsetters,
   31206             :         .tp_methods = py_srvsvc_NetCharDevGetInfo_methods,
   31207             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   31208             :         .tp_new = py_srvsvc_NetCharDevGetInfo_new,
   31209             : };
   31210             : 
   31211           0 : static bool pack_py_srvsvc_NetCharDevGetInfo_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetCharDevGetInfo *r)
   31212             : {
   31213             :         PyObject *py_server_unc;
   31214             :         PyObject *py_device_name;
   31215             :         PyObject *py_level;
   31216           0 :         const char *kwnames[] = {
   31217             :                 "server_unc", "device_name", "level", NULL
   31218             :         };
   31219             : 
   31220           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetCharDevGetInfo", discard_const_p(char *, kwnames), &py_server_unc, &py_device_name, &py_level)) {
   31221           0 :                 return false;
   31222             :         }
   31223             : 
   31224           0 :         if (py_server_unc == NULL) {
   31225           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   31226           0 :                 return false;
   31227             :         }
   31228           0 :         if (py_server_unc == Py_None) {
   31229           0 :                 r->in.server_unc = NULL;
   31230             :         } else {
   31231           0 :                 r->in.server_unc = NULL;
   31232             :                 {
   31233             :                         const char *test_str;
   31234             :                         const char *talloc_str;
   31235           0 :                         PyObject *unicode = NULL;
   31236           0 :                         if (PyUnicode_Check(py_server_unc)) {
   31237           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   31238           0 :                                 if (unicode == NULL) {
   31239           0 :                                         PyErr_NoMemory();
   31240           0 :                                         return false;
   31241             :                                 }
   31242           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   31243           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   31244           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   31245             :                         } else {
   31246           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   31247           0 :                                 return false;
   31248             :                         }
   31249           0 :                         talloc_str = talloc_strdup(r, test_str);
   31250           0 :                         if (unicode != NULL) {
   31251           0 :                                 Py_DECREF(unicode);
   31252             :                         }
   31253           0 :                         if (talloc_str == NULL) {
   31254           0 :                                 PyErr_NoMemory();
   31255           0 :                                 return false;
   31256             :                         }
   31257           0 :                         r->in.server_unc = talloc_str;
   31258             :                 }
   31259             :         }
   31260           0 :         if (py_device_name == NULL) {
   31261           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.device_name");
   31262           0 :                 return false;
   31263             :         }
   31264             :         {
   31265             :                 const char *test_str;
   31266             :                 const char *talloc_str;
   31267           0 :                 PyObject *unicode = NULL;
   31268           0 :                 if (PyUnicode_Check(py_device_name)) {
   31269           0 :                         unicode = PyUnicode_AsEncodedString(py_device_name, "utf-8", "ignore");
   31270           0 :                         if (unicode == NULL) {
   31271           0 :                                 PyErr_NoMemory();
   31272           0 :                                 return false;
   31273             :                         }
   31274           0 :                         test_str = PyBytes_AS_STRING(unicode);
   31275           0 :                 } else if (PyBytes_Check(py_device_name)) {
   31276           0 :                         test_str = PyBytes_AS_STRING(py_device_name);
   31277             :                 } else {
   31278           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_device_name)->tp_name);
   31279           0 :                         return false;
   31280             :                 }
   31281           0 :                 talloc_str = talloc_strdup(r, test_str);
   31282           0 :                 if (unicode != NULL) {
   31283           0 :                         Py_DECREF(unicode);
   31284             :                 }
   31285           0 :                 if (talloc_str == NULL) {
   31286           0 :                         PyErr_NoMemory();
   31287           0 :                         return false;
   31288             :                 }
   31289           0 :                 r->in.device_name = talloc_str;
   31290             :         }
   31291           0 :         if (py_level == NULL) {
   31292           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   31293           0 :                 return false;
   31294             :         }
   31295             :         {
   31296           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   31297           0 :                 if (PyLong_Check(py_level)) {
   31298             :                         unsigned long long test_var;
   31299           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   31300           0 :                         if (PyErr_Occurred() != NULL) {
   31301           0 :                                 return false;
   31302             :                         }
   31303           0 :                         if (test_var > uint_max) {
   31304           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   31305             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31306           0 :                                 return false;
   31307             :                         }
   31308           0 :                         r->in.level = test_var;
   31309             :                 } else {
   31310           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   31311             :                           PyLong_Type.tp_name);
   31312           0 :                         return false;
   31313             :                 }
   31314             :         }
   31315           0 :         return true;
   31316             : }
   31317             : 
   31318           0 : static PyObject *unpack_py_srvsvc_NetCharDevGetInfo_args_out(struct srvsvc_NetCharDevGetInfo *r)
   31319             : {
   31320             :         PyObject *result;
   31321             :         PyObject *py_info;
   31322           0 :         py_info = pyrpc_import_union(&srvsvc_NetCharDevInfo_Type, r->out.info, r->in.level, r->out.info, "union srvsvc_NetCharDevInfo");
   31323           0 :         if (py_info == NULL) {
   31324           0 :                 return NULL;
   31325             :         }
   31326           0 :         result = py_info;
   31327           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   31328           0 :                 PyErr_SetWERROR(r->out.result);
   31329           0 :                 return NULL;
   31330             :         }
   31331             : 
   31332           0 :         return result;
   31333             : }
   31334             : 
   31335             : 
   31336           0 : static PyObject *py_srvsvc_NetCharDevControl_in_get_server_unc(PyObject *obj, void *closure)
   31337             : {
   31338           0 :         struct srvsvc_NetCharDevControl *object = (struct srvsvc_NetCharDevControl *)pytalloc_get_ptr(obj);
   31339             :         PyObject *py_server_unc;
   31340           0 :         if (object->in.server_unc == NULL) {
   31341           0 :                 Py_RETURN_NONE;
   31342             :         }
   31343           0 :         if (object->in.server_unc == NULL) {
   31344           0 :                 py_server_unc = Py_None;
   31345           0 :                 Py_INCREF(py_server_unc);
   31346             :         } else {
   31347           0 :                 if (object->in.server_unc == NULL) {
   31348           0 :                         py_server_unc = Py_None;
   31349           0 :                         Py_INCREF(py_server_unc);
   31350             :                 } else {
   31351           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   31352             :                 }
   31353             :         }
   31354           0 :         return py_server_unc;
   31355             : }
   31356             : 
   31357           0 : static int py_srvsvc_NetCharDevControl_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   31358             : {
   31359           0 :         struct srvsvc_NetCharDevControl *object = (struct srvsvc_NetCharDevControl *)pytalloc_get_ptr(py_obj);
   31360           0 :         if (value == NULL) {
   31361           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   31362           0 :                 return -1;
   31363             :         }
   31364           0 :         if (value == Py_None) {
   31365           0 :                 object->in.server_unc = NULL;
   31366             :         } else {
   31367           0 :                 object->in.server_unc = NULL;
   31368             :                 {
   31369             :                         const char *test_str;
   31370             :                         const char *talloc_str;
   31371           0 :                         PyObject *unicode = NULL;
   31372           0 :                         if (PyUnicode_Check(value)) {
   31373           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   31374           0 :                                 if (unicode == NULL) {
   31375           0 :                                         PyErr_NoMemory();
   31376           0 :                                         return -1;
   31377             :                                 }
   31378           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   31379           0 :                         } else if (PyBytes_Check(value)) {
   31380           0 :                                 test_str = PyBytes_AS_STRING(value);
   31381             :                         } else {
   31382           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   31383           0 :                                 return -1;
   31384             :                         }
   31385           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   31386           0 :                         if (unicode != NULL) {
   31387           0 :                                 Py_DECREF(unicode);
   31388             :                         }
   31389           0 :                         if (talloc_str == NULL) {
   31390           0 :                                 PyErr_NoMemory();
   31391           0 :                                 return -1;
   31392             :                         }
   31393           0 :                         object->in.server_unc = talloc_str;
   31394             :                 }
   31395             :         }
   31396           0 :         return 0;
   31397             : }
   31398             : 
   31399           0 : static PyObject *py_srvsvc_NetCharDevControl_in_get_device_name(PyObject *obj, void *closure)
   31400             : {
   31401           0 :         struct srvsvc_NetCharDevControl *object = (struct srvsvc_NetCharDevControl *)pytalloc_get_ptr(obj);
   31402             :         PyObject *py_device_name;
   31403           0 :         if (object->in.device_name == NULL) {
   31404           0 :                 py_device_name = Py_None;
   31405           0 :                 Py_INCREF(py_device_name);
   31406             :         } else {
   31407           0 :                 py_device_name = PyUnicode_Decode(object->in.device_name, strlen(object->in.device_name), "utf-8", "ignore");
   31408             :         }
   31409           0 :         return py_device_name;
   31410             : }
   31411             : 
   31412           0 : static int py_srvsvc_NetCharDevControl_in_set_device_name(PyObject *py_obj, PyObject *value, void *closure)
   31413             : {
   31414           0 :         struct srvsvc_NetCharDevControl *object = (struct srvsvc_NetCharDevControl *)pytalloc_get_ptr(py_obj);
   31415           0 :         if (value == NULL) {
   31416           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.device_name");
   31417           0 :                 return -1;
   31418             :         }
   31419             :         {
   31420             :                 const char *test_str;
   31421             :                 const char *talloc_str;
   31422           0 :                 PyObject *unicode = NULL;
   31423           0 :                 if (PyUnicode_Check(value)) {
   31424           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   31425           0 :                         if (unicode == NULL) {
   31426           0 :                                 PyErr_NoMemory();
   31427           0 :                                 return -1;
   31428             :                         }
   31429           0 :                         test_str = PyBytes_AS_STRING(unicode);
   31430           0 :                 } else if (PyBytes_Check(value)) {
   31431           0 :                         test_str = PyBytes_AS_STRING(value);
   31432             :                 } else {
   31433           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   31434           0 :                         return -1;
   31435             :                 }
   31436           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   31437           0 :                 if (unicode != NULL) {
   31438           0 :                         Py_DECREF(unicode);
   31439             :                 }
   31440           0 :                 if (talloc_str == NULL) {
   31441           0 :                         PyErr_NoMemory();
   31442           0 :                         return -1;
   31443             :                 }
   31444           0 :                 object->in.device_name = talloc_str;
   31445             :         }
   31446           0 :         return 0;
   31447             : }
   31448             : 
   31449           0 : static PyObject *py_srvsvc_NetCharDevControl_in_get_opcode(PyObject *obj, void *closure)
   31450             : {
   31451           0 :         struct srvsvc_NetCharDevControl *object = (struct srvsvc_NetCharDevControl *)pytalloc_get_ptr(obj);
   31452             :         PyObject *py_opcode;
   31453           0 :         py_opcode = PyLong_FromUnsignedLongLong((uint32_t)object->in.opcode);
   31454           0 :         return py_opcode;
   31455             : }
   31456             : 
   31457           0 : static int py_srvsvc_NetCharDevControl_in_set_opcode(PyObject *py_obj, PyObject *value, void *closure)
   31458             : {
   31459           0 :         struct srvsvc_NetCharDevControl *object = (struct srvsvc_NetCharDevControl *)pytalloc_get_ptr(py_obj);
   31460           0 :         if (value == NULL) {
   31461           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.opcode");
   31462           0 :                 return -1;
   31463             :         }
   31464             :         {
   31465           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.opcode));
   31466           0 :                 if (PyLong_Check(value)) {
   31467             :                         unsigned long long test_var;
   31468           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   31469           0 :                         if (PyErr_Occurred() != NULL) {
   31470           0 :                                 return -1;
   31471             :                         }
   31472           0 :                         if (test_var > uint_max) {
   31473           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   31474             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31475           0 :                                 return -1;
   31476             :                         }
   31477           0 :                         object->in.opcode = test_var;
   31478             :                 } else {
   31479           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   31480             :                           PyLong_Type.tp_name);
   31481           0 :                         return -1;
   31482             :                 }
   31483             :         }
   31484           0 :         return 0;
   31485             : }
   31486             : 
   31487           0 : static PyObject *py_srvsvc_NetCharDevControl_get_result(PyObject *obj, void *closure)
   31488             : {
   31489           0 :         struct srvsvc_NetCharDevControl *object = (struct srvsvc_NetCharDevControl *)pytalloc_get_ptr(obj);
   31490             :         PyObject *py_result;
   31491           0 :         py_result = PyErr_FromWERROR(object->out.result);
   31492           0 :         return py_result;
   31493             : }
   31494             : 
   31495           0 : static int py_srvsvc_NetCharDevControl_set_result(PyObject *py_obj, PyObject *value, void *closure)
   31496             : {
   31497           0 :         struct srvsvc_NetCharDevControl *object = (struct srvsvc_NetCharDevControl *)pytalloc_get_ptr(py_obj);
   31498           0 :         if (value == NULL) {
   31499           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   31500           0 :                 return -1;
   31501             :         }
   31502           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   31503           0 :         return 0;
   31504             : }
   31505             : 
   31506             : static PyGetSetDef py_srvsvc_NetCharDevControl_getsetters[] = {
   31507             :         {
   31508             :                 .name = discard_const_p(char, "in_server_unc"),
   31509             :                 .get = py_srvsvc_NetCharDevControl_in_get_server_unc,
   31510             :                 .set = py_srvsvc_NetCharDevControl_in_set_server_unc,
   31511             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   31512             :         },
   31513             :         {
   31514             :                 .name = discard_const_p(char, "in_device_name"),
   31515             :                 .get = py_srvsvc_NetCharDevControl_in_get_device_name,
   31516             :                 .set = py_srvsvc_NetCharDevControl_in_set_device_name,
   31517             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   31518             :         },
   31519             :         {
   31520             :                 .name = discard_const_p(char, "in_opcode"),
   31521             :                 .get = py_srvsvc_NetCharDevControl_in_get_opcode,
   31522             :                 .set = py_srvsvc_NetCharDevControl_in_set_opcode,
   31523             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   31524             :         },
   31525             :         {
   31526             :                 .name = discard_const_p(char, "result"),
   31527             :                 .get = py_srvsvc_NetCharDevControl_get_result,
   31528             :                 .set = py_srvsvc_NetCharDevControl_set_result,
   31529             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   31530             :         },
   31531             :         { .name = NULL }
   31532             : };
   31533             : 
   31534           0 : static PyObject *py_srvsvc_NetCharDevControl_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   31535             : {
   31536           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetCharDevControl, type);
   31537           0 :         return self;
   31538             : }
   31539             : 
   31540           0 : static PyObject *py_srvsvc_NetCharDevControl_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   31541             : {
   31542             : 
   31543             : 
   31544           0 :         return PyLong_FromLong(2);
   31545             : }
   31546             : 
   31547           0 : static PyObject *py_srvsvc_NetCharDevControl_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   31548             : {
   31549           0 :         const struct ndr_interface_call *call = NULL;
   31550           0 :         struct srvsvc_NetCharDevControl *object = (struct srvsvc_NetCharDevControl *)pytalloc_get_ptr(py_obj);
   31551           0 :         PyObject *ret = NULL;
   31552           0 :         struct ndr_push *push = NULL;
   31553             :         DATA_BLOB blob;
   31554             :         enum ndr_err_code err;
   31555             : 
   31556           0 :         if (ndr_table_srvsvc.num_calls < 3) {
   31557           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevControl_ndr_pack");
   31558           0 :                 return NULL;
   31559             :         }
   31560           0 :         call = &ndr_table_srvsvc.calls[2];
   31561             : 
   31562           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   31563           0 :         if (push == NULL) {
   31564           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   31565           0 :                 return NULL;
   31566             :         }
   31567             : 
   31568           0 :         push->flags |= ndr_push_flags;
   31569             : 
   31570           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   31571           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   31572           0 :                 TALLOC_FREE(push);
   31573           0 :                 PyErr_SetNdrError(err);
   31574           0 :                 return NULL;
   31575             :         }
   31576           0 :         blob = ndr_push_blob(push);
   31577           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   31578           0 :         TALLOC_FREE(push);
   31579           0 :         return ret;
   31580             : }
   31581             : 
   31582           0 : static PyObject *py_srvsvc_NetCharDevControl_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   31583             : {
   31584           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   31585           0 :         PyObject *bigendian_obj = NULL;
   31586           0 :         PyObject *ndr64_obj = NULL;
   31587           0 :         uint32_t ndr_push_flags = 0;
   31588             : 
   31589           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   31590             :                 discard_const_p(char *, kwnames),
   31591             :                 &bigendian_obj,
   31592             :                 &ndr64_obj)) {
   31593           0 :                 return NULL;
   31594             :         }
   31595             : 
   31596           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   31597           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   31598             :         }
   31599           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   31600           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   31601             :         }
   31602             : 
   31603           0 :         return py_srvsvc_NetCharDevControl_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   31604             : }
   31605             : 
   31606           0 : static PyObject *py_srvsvc_NetCharDevControl_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   31607             : {
   31608           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   31609           0 :         PyObject *bigendian_obj = NULL;
   31610           0 :         PyObject *ndr64_obj = NULL;
   31611           0 :         uint32_t ndr_push_flags = 0;
   31612             : 
   31613           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   31614             :                 discard_const_p(char *, kwnames),
   31615             :                 &bigendian_obj,
   31616             :                 &ndr64_obj)) {
   31617           0 :                 return NULL;
   31618             :         }
   31619             : 
   31620           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   31621           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   31622             :         }
   31623           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   31624           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   31625             :         }
   31626             : 
   31627           0 :         return py_srvsvc_NetCharDevControl_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   31628             : }
   31629             : 
   31630           0 : static PyObject *py_srvsvc_NetCharDevControl_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   31631             : {
   31632           0 :         const struct ndr_interface_call *call = NULL;
   31633           0 :         struct srvsvc_NetCharDevControl *object = (struct srvsvc_NetCharDevControl *)pytalloc_get_ptr(py_obj);
   31634           0 :         struct ndr_pull *pull = NULL;
   31635             :         enum ndr_err_code err;
   31636             : 
   31637           0 :         if (ndr_table_srvsvc.num_calls < 3) {
   31638           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevControl_ndr_unpack");
   31639           0 :                 return NULL;
   31640             :         }
   31641           0 :         call = &ndr_table_srvsvc.calls[2];
   31642             : 
   31643           0 :         pull = ndr_pull_init_blob(blob, object);
   31644           0 :         if (pull == NULL) {
   31645           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   31646           0 :                 return NULL;
   31647             :         }
   31648             : 
   31649           0 :         pull->flags |= ndr_pull_flags;
   31650             : 
   31651           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   31652           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   31653           0 :                 TALLOC_FREE(pull);
   31654           0 :                 PyErr_SetNdrError(err);
   31655           0 :                 return NULL;
   31656             :         }
   31657           0 :         if (!allow_remaining) {
   31658             :                 uint32_t highest_ofs;
   31659             : 
   31660           0 :                 if (pull->offset > pull->relative_highest_offset) {
   31661           0 :                         highest_ofs = pull->offset;
   31662             :                 } else {
   31663           0 :                         highest_ofs = pull->relative_highest_offset;
   31664             :                 }
   31665           0 :                 if (highest_ofs < pull->data_size) {
   31666           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   31667             :                                 "not all bytes consumed ofs[%u] size[%u]",
   31668             :                                 highest_ofs, pull->data_size);
   31669           0 :                         TALLOC_FREE(pull);
   31670           0 :                         PyErr_SetNdrError(err);
   31671           0 :                         return NULL;
   31672             :                 }
   31673             :         }
   31674             : 
   31675           0 :         TALLOC_FREE(pull);
   31676           0 :         Py_RETURN_NONE;
   31677             : }
   31678             : 
   31679           0 : static PyObject *py_srvsvc_NetCharDevControl_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   31680             : {
   31681             :         DATA_BLOB blob;
   31682           0 :         Py_ssize_t blob_length = 0;
   31683           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   31684           0 :         PyObject *bigendian_obj = NULL;
   31685           0 :         PyObject *ndr64_obj = NULL;
   31686           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   31687           0 :         PyObject *allow_remaining_obj = NULL;
   31688           0 :         bool allow_remaining = false;
   31689             : 
   31690           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   31691             :                 discard_const_p(char *, kwnames),
   31692             :                 &blob.data, &blob_length,
   31693             :                 &bigendian_obj,
   31694             :                 &ndr64_obj,
   31695             :                 &allow_remaining_obj)) {
   31696           0 :                 return NULL;
   31697             :         }
   31698           0 :         blob.length = blob_length;
   31699             : 
   31700           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   31701           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   31702             :         }
   31703           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   31704           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   31705             :         }
   31706             : 
   31707           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   31708           0 :                 allow_remaining = true;
   31709             :         }
   31710             : 
   31711           0 :         return py_srvsvc_NetCharDevControl_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   31712             : }
   31713             : 
   31714           0 : static PyObject *py_srvsvc_NetCharDevControl_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   31715             : {
   31716             :         DATA_BLOB blob;
   31717           0 :         Py_ssize_t blob_length = 0;
   31718           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   31719           0 :         PyObject *bigendian_obj = NULL;
   31720           0 :         PyObject *ndr64_obj = NULL;
   31721           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   31722           0 :         PyObject *allow_remaining_obj = NULL;
   31723           0 :         bool allow_remaining = false;
   31724             : 
   31725           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   31726             :                 discard_const_p(char *, kwnames),
   31727             :                 &blob.data, &blob_length,
   31728             :                 &bigendian_obj,
   31729             :                 &ndr64_obj,
   31730             :                 &allow_remaining_obj)) {
   31731           0 :                 return NULL;
   31732             :         }
   31733           0 :         blob.length = blob_length;
   31734             : 
   31735           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   31736           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   31737             :         }
   31738           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   31739           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   31740             :         }
   31741             : 
   31742           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   31743           0 :                 allow_remaining = true;
   31744             :         }
   31745             : 
   31746           0 :         return py_srvsvc_NetCharDevControl_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   31747             : }
   31748             : 
   31749           0 : static PyObject *py_srvsvc_NetCharDevControl_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   31750             : {
   31751           0 :         const struct ndr_interface_call *call = NULL;
   31752           0 :         struct srvsvc_NetCharDevControl *object = (struct srvsvc_NetCharDevControl *)pytalloc_get_ptr(py_obj);
   31753             :         PyObject *ret;
   31754             :         char *retstr;
   31755             : 
   31756           0 :         if (ndr_table_srvsvc.num_calls < 3) {
   31757           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevControl_ndr_print");
   31758           0 :                 return NULL;
   31759             :         }
   31760           0 :         call = &ndr_table_srvsvc.calls[2];
   31761             : 
   31762           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   31763           0 :         ret = PyUnicode_FromString(retstr);
   31764           0 :         TALLOC_FREE(retstr);
   31765             : 
   31766           0 :         return ret;
   31767             : }
   31768             : 
   31769           0 : static PyObject *py_srvsvc_NetCharDevControl_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   31770             : {
   31771           0 :         return py_srvsvc_NetCharDevControl_ndr_print(py_obj, "srvsvc_NetCharDevControl_in", NDR_IN);
   31772             : }
   31773             : 
   31774           0 : static PyObject *py_srvsvc_NetCharDevControl_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   31775             : {
   31776           0 :         return py_srvsvc_NetCharDevControl_ndr_print(py_obj, "srvsvc_NetCharDevControl_out", NDR_OUT);
   31777             : }
   31778             : 
   31779             : static PyMethodDef py_srvsvc_NetCharDevControl_methods[] = {
   31780             :         { "opnum", (PyCFunction)py_srvsvc_NetCharDevControl_ndr_opnum, METH_NOARGS|METH_CLASS,
   31781             :                 "srvsvc.NetCharDevControl.opnum() -> 2 (0x02) " },
   31782             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevControl_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   31783             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   31784             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevControl_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   31785             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   31786             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevControl_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   31787             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   31788             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevControl_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   31789             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   31790             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetCharDevControl_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   31791             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetCharDevControl_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   31792             :         { NULL, NULL, 0, NULL }
   31793             : };
   31794             : 
   31795             : 
   31796             : static PyTypeObject srvsvc_NetCharDevControl_Type = {
   31797             :         PyVarObject_HEAD_INIT(NULL, 0)
   31798             :         .tp_name = "srvsvc.NetCharDevControl",
   31799             :         .tp_getset = py_srvsvc_NetCharDevControl_getsetters,
   31800             :         .tp_methods = py_srvsvc_NetCharDevControl_methods,
   31801             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   31802             :         .tp_new = py_srvsvc_NetCharDevControl_new,
   31803             : };
   31804             : 
   31805           0 : static bool pack_py_srvsvc_NetCharDevControl_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetCharDevControl *r)
   31806             : {
   31807             :         PyObject *py_server_unc;
   31808             :         PyObject *py_device_name;
   31809             :         PyObject *py_opcode;
   31810           0 :         const char *kwnames[] = {
   31811             :                 "server_unc", "device_name", "opcode", NULL
   31812             :         };
   31813             : 
   31814           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetCharDevControl", discard_const_p(char *, kwnames), &py_server_unc, &py_device_name, &py_opcode)) {
   31815           0 :                 return false;
   31816             :         }
   31817             : 
   31818           0 :         if (py_server_unc == NULL) {
   31819           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   31820           0 :                 return false;
   31821             :         }
   31822           0 :         if (py_server_unc == Py_None) {
   31823           0 :                 r->in.server_unc = NULL;
   31824             :         } else {
   31825           0 :                 r->in.server_unc = NULL;
   31826             :                 {
   31827             :                         const char *test_str;
   31828             :                         const char *talloc_str;
   31829           0 :                         PyObject *unicode = NULL;
   31830           0 :                         if (PyUnicode_Check(py_server_unc)) {
   31831           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   31832           0 :                                 if (unicode == NULL) {
   31833           0 :                                         PyErr_NoMemory();
   31834           0 :                                         return false;
   31835             :                                 }
   31836           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   31837           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   31838           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   31839             :                         } else {
   31840           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   31841           0 :                                 return false;
   31842             :                         }
   31843           0 :                         talloc_str = talloc_strdup(r, test_str);
   31844           0 :                         if (unicode != NULL) {
   31845           0 :                                 Py_DECREF(unicode);
   31846             :                         }
   31847           0 :                         if (talloc_str == NULL) {
   31848           0 :                                 PyErr_NoMemory();
   31849           0 :                                 return false;
   31850             :                         }
   31851           0 :                         r->in.server_unc = talloc_str;
   31852             :                 }
   31853             :         }
   31854           0 :         if (py_device_name == NULL) {
   31855           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.device_name");
   31856           0 :                 return false;
   31857             :         }
   31858             :         {
   31859             :                 const char *test_str;
   31860             :                 const char *talloc_str;
   31861           0 :                 PyObject *unicode = NULL;
   31862           0 :                 if (PyUnicode_Check(py_device_name)) {
   31863           0 :                         unicode = PyUnicode_AsEncodedString(py_device_name, "utf-8", "ignore");
   31864           0 :                         if (unicode == NULL) {
   31865           0 :                                 PyErr_NoMemory();
   31866           0 :                                 return false;
   31867             :                         }
   31868           0 :                         test_str = PyBytes_AS_STRING(unicode);
   31869           0 :                 } else if (PyBytes_Check(py_device_name)) {
   31870           0 :                         test_str = PyBytes_AS_STRING(py_device_name);
   31871             :                 } else {
   31872           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_device_name)->tp_name);
   31873           0 :                         return false;
   31874             :                 }
   31875           0 :                 talloc_str = talloc_strdup(r, test_str);
   31876           0 :                 if (unicode != NULL) {
   31877           0 :                         Py_DECREF(unicode);
   31878             :                 }
   31879           0 :                 if (talloc_str == NULL) {
   31880           0 :                         PyErr_NoMemory();
   31881           0 :                         return false;
   31882             :                 }
   31883           0 :                 r->in.device_name = talloc_str;
   31884             :         }
   31885           0 :         if (py_opcode == NULL) {
   31886           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.opcode");
   31887           0 :                 return false;
   31888             :         }
   31889             :         {
   31890           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.opcode));
   31891           0 :                 if (PyLong_Check(py_opcode)) {
   31892             :                         unsigned long long test_var;
   31893           0 :                         test_var = PyLong_AsUnsignedLongLong(py_opcode);
   31894           0 :                         if (PyErr_Occurred() != NULL) {
   31895           0 :                                 return false;
   31896             :                         }
   31897           0 :                         if (test_var > uint_max) {
   31898           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   31899             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31900           0 :                                 return false;
   31901             :                         }
   31902           0 :                         r->in.opcode = test_var;
   31903             :                 } else {
   31904           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   31905             :                           PyLong_Type.tp_name);
   31906           0 :                         return false;
   31907             :                 }
   31908             :         }
   31909           0 :         return true;
   31910             : }
   31911             : 
   31912           0 : static PyObject *unpack_py_srvsvc_NetCharDevControl_args_out(struct srvsvc_NetCharDevControl *r)
   31913             : {
   31914             :         PyObject *result;
   31915           0 :         result = Py_None;
   31916           0 :         Py_INCREF(result);
   31917           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   31918           0 :                 PyErr_SetWERROR(r->out.result);
   31919           0 :                 return NULL;
   31920             :         }
   31921             : 
   31922           0 :         return result;
   31923             : }
   31924             : 
   31925             : 
   31926           0 : static PyObject *py_srvsvc_NetCharDevQEnum_in_get_server_unc(PyObject *obj, void *closure)
   31927             : {
   31928           0 :         struct srvsvc_NetCharDevQEnum *object = (struct srvsvc_NetCharDevQEnum *)pytalloc_get_ptr(obj);
   31929             :         PyObject *py_server_unc;
   31930           0 :         if (object->in.server_unc == NULL) {
   31931           0 :                 Py_RETURN_NONE;
   31932             :         }
   31933           0 :         if (object->in.server_unc == NULL) {
   31934           0 :                 py_server_unc = Py_None;
   31935           0 :                 Py_INCREF(py_server_unc);
   31936             :         } else {
   31937           0 :                 if (object->in.server_unc == NULL) {
   31938           0 :                         py_server_unc = Py_None;
   31939           0 :                         Py_INCREF(py_server_unc);
   31940             :                 } else {
   31941           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   31942             :                 }
   31943             :         }
   31944           0 :         return py_server_unc;
   31945             : }
   31946             : 
   31947           0 : static int py_srvsvc_NetCharDevQEnum_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   31948             : {
   31949           0 :         struct srvsvc_NetCharDevQEnum *object = (struct srvsvc_NetCharDevQEnum *)pytalloc_get_ptr(py_obj);
   31950           0 :         if (value == NULL) {
   31951           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   31952           0 :                 return -1;
   31953             :         }
   31954           0 :         if (value == Py_None) {
   31955           0 :                 object->in.server_unc = NULL;
   31956             :         } else {
   31957           0 :                 object->in.server_unc = NULL;
   31958             :                 {
   31959             :                         const char *test_str;
   31960             :                         const char *talloc_str;
   31961           0 :                         PyObject *unicode = NULL;
   31962           0 :                         if (PyUnicode_Check(value)) {
   31963           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   31964           0 :                                 if (unicode == NULL) {
   31965           0 :                                         PyErr_NoMemory();
   31966           0 :                                         return -1;
   31967             :                                 }
   31968           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   31969           0 :                         } else if (PyBytes_Check(value)) {
   31970           0 :                                 test_str = PyBytes_AS_STRING(value);
   31971             :                         } else {
   31972           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   31973           0 :                                 return -1;
   31974             :                         }
   31975           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   31976           0 :                         if (unicode != NULL) {
   31977           0 :                                 Py_DECREF(unicode);
   31978             :                         }
   31979           0 :                         if (talloc_str == NULL) {
   31980           0 :                                 PyErr_NoMemory();
   31981           0 :                                 return -1;
   31982             :                         }
   31983           0 :                         object->in.server_unc = talloc_str;
   31984             :                 }
   31985             :         }
   31986           0 :         return 0;
   31987             : }
   31988             : 
   31989           0 : static PyObject *py_srvsvc_NetCharDevQEnum_in_get_user(PyObject *obj, void *closure)
   31990             : {
   31991           0 :         struct srvsvc_NetCharDevQEnum *object = (struct srvsvc_NetCharDevQEnum *)pytalloc_get_ptr(obj);
   31992             :         PyObject *py_user;
   31993           0 :         if (object->in.user == NULL) {
   31994           0 :                 Py_RETURN_NONE;
   31995             :         }
   31996           0 :         if (object->in.user == NULL) {
   31997           0 :                 py_user = Py_None;
   31998           0 :                 Py_INCREF(py_user);
   31999             :         } else {
   32000           0 :                 if (object->in.user == NULL) {
   32001           0 :                         py_user = Py_None;
   32002           0 :                         Py_INCREF(py_user);
   32003             :                 } else {
   32004           0 :                         py_user = PyUnicode_Decode(object->in.user, strlen(object->in.user), "utf-8", "ignore");
   32005             :                 }
   32006             :         }
   32007           0 :         return py_user;
   32008             : }
   32009             : 
   32010           0 : static int py_srvsvc_NetCharDevQEnum_in_set_user(PyObject *py_obj, PyObject *value, void *closure)
   32011             : {
   32012           0 :         struct srvsvc_NetCharDevQEnum *object = (struct srvsvc_NetCharDevQEnum *)pytalloc_get_ptr(py_obj);
   32013           0 :         if (value == NULL) {
   32014           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.user");
   32015           0 :                 return -1;
   32016             :         }
   32017           0 :         if (value == Py_None) {
   32018           0 :                 object->in.user = NULL;
   32019             :         } else {
   32020           0 :                 object->in.user = NULL;
   32021             :                 {
   32022             :                         const char *test_str;
   32023             :                         const char *talloc_str;
   32024           0 :                         PyObject *unicode = NULL;
   32025           0 :                         if (PyUnicode_Check(value)) {
   32026           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   32027           0 :                                 if (unicode == NULL) {
   32028           0 :                                         PyErr_NoMemory();
   32029           0 :                                         return -1;
   32030             :                                 }
   32031           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   32032           0 :                         } else if (PyBytes_Check(value)) {
   32033           0 :                                 test_str = PyBytes_AS_STRING(value);
   32034             :                         } else {
   32035           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   32036           0 :                                 return -1;
   32037             :                         }
   32038           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   32039           0 :                         if (unicode != NULL) {
   32040           0 :                                 Py_DECREF(unicode);
   32041             :                         }
   32042           0 :                         if (talloc_str == NULL) {
   32043           0 :                                 PyErr_NoMemory();
   32044           0 :                                 return -1;
   32045             :                         }
   32046           0 :                         object->in.user = talloc_str;
   32047             :                 }
   32048             :         }
   32049           0 :         return 0;
   32050             : }
   32051             : 
   32052           0 : static PyObject *py_srvsvc_NetCharDevQEnum_in_get_info_ctr(PyObject *obj, void *closure)
   32053             : {
   32054           0 :         struct srvsvc_NetCharDevQEnum *object = (struct srvsvc_NetCharDevQEnum *)pytalloc_get_ptr(obj);
   32055             :         PyObject *py_info_ctr;
   32056           0 :         if (object->in.info_ctr == NULL) {
   32057           0 :                 Py_RETURN_NONE;
   32058             :         }
   32059           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetCharDevQInfoCtr_Type, object->in.info_ctr, object->in.info_ctr);
   32060           0 :         return py_info_ctr;
   32061             : }
   32062             : 
   32063           0 : static int py_srvsvc_NetCharDevQEnum_in_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   32064             : {
   32065           0 :         struct srvsvc_NetCharDevQEnum *object = (struct srvsvc_NetCharDevQEnum *)pytalloc_get_ptr(py_obj);
   32066           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info_ctr));
   32067           0 :         if (value == NULL) {
   32068           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.info_ctr");
   32069           0 :                 return -1;
   32070             :         }
   32071           0 :         object->in.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info_ctr);
   32072           0 :         if (object->in.info_ctr == NULL) {
   32073           0 :                 PyErr_NoMemory();
   32074           0 :                 return -1;
   32075             :         }
   32076           0 :         PY_CHECK_TYPE(&srvsvc_NetCharDevQInfoCtr_Type, value, return -1;);
   32077           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   32078           0 :                 PyErr_NoMemory();
   32079           0 :                 return -1;
   32080             :         }
   32081           0 :         object->in.info_ctr = (struct srvsvc_NetCharDevQInfoCtr *)pytalloc_get_ptr(value);
   32082           0 :         return 0;
   32083             : }
   32084             : 
   32085           0 : static PyObject *py_srvsvc_NetCharDevQEnum_out_get_info_ctr(PyObject *obj, void *closure)
   32086             : {
   32087           0 :         struct srvsvc_NetCharDevQEnum *object = (struct srvsvc_NetCharDevQEnum *)pytalloc_get_ptr(obj);
   32088             :         PyObject *py_info_ctr;
   32089           0 :         if (object->out.info_ctr == NULL) {
   32090           0 :                 Py_RETURN_NONE;
   32091             :         }
   32092           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetCharDevQInfoCtr_Type, object->out.info_ctr, object->out.info_ctr);
   32093           0 :         return py_info_ctr;
   32094             : }
   32095             : 
   32096           0 : static int py_srvsvc_NetCharDevQEnum_out_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   32097             : {
   32098           0 :         struct srvsvc_NetCharDevQEnum *object = (struct srvsvc_NetCharDevQEnum *)pytalloc_get_ptr(py_obj);
   32099           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info_ctr));
   32100           0 :         if (value == NULL) {
   32101           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info_ctr");
   32102           0 :                 return -1;
   32103             :         }
   32104           0 :         object->out.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info_ctr);
   32105           0 :         if (object->out.info_ctr == NULL) {
   32106           0 :                 PyErr_NoMemory();
   32107           0 :                 return -1;
   32108             :         }
   32109           0 :         PY_CHECK_TYPE(&srvsvc_NetCharDevQInfoCtr_Type, value, return -1;);
   32110           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   32111           0 :                 PyErr_NoMemory();
   32112           0 :                 return -1;
   32113             :         }
   32114           0 :         object->out.info_ctr = (struct srvsvc_NetCharDevQInfoCtr *)pytalloc_get_ptr(value);
   32115           0 :         return 0;
   32116             : }
   32117             : 
   32118           0 : static PyObject *py_srvsvc_NetCharDevQEnum_in_get_max_buffer(PyObject *obj, void *closure)
   32119             : {
   32120           0 :         struct srvsvc_NetCharDevQEnum *object = (struct srvsvc_NetCharDevQEnum *)pytalloc_get_ptr(obj);
   32121             :         PyObject *py_max_buffer;
   32122           0 :         py_max_buffer = PyLong_FromUnsignedLongLong((uint32_t)object->in.max_buffer);
   32123           0 :         return py_max_buffer;
   32124             : }
   32125             : 
   32126           0 : static int py_srvsvc_NetCharDevQEnum_in_set_max_buffer(PyObject *py_obj, PyObject *value, void *closure)
   32127             : {
   32128           0 :         struct srvsvc_NetCharDevQEnum *object = (struct srvsvc_NetCharDevQEnum *)pytalloc_get_ptr(py_obj);
   32129           0 :         if (value == NULL) {
   32130           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.max_buffer");
   32131           0 :                 return -1;
   32132             :         }
   32133             :         {
   32134           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.max_buffer));
   32135           0 :                 if (PyLong_Check(value)) {
   32136             :                         unsigned long long test_var;
   32137           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   32138           0 :                         if (PyErr_Occurred() != NULL) {
   32139           0 :                                 return -1;
   32140             :                         }
   32141           0 :                         if (test_var > uint_max) {
   32142           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32143             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32144           0 :                                 return -1;
   32145             :                         }
   32146           0 :                         object->in.max_buffer = test_var;
   32147             :                 } else {
   32148           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   32149             :                           PyLong_Type.tp_name);
   32150           0 :                         return -1;
   32151             :                 }
   32152             :         }
   32153           0 :         return 0;
   32154             : }
   32155             : 
   32156           0 : static PyObject *py_srvsvc_NetCharDevQEnum_out_get_totalentries(PyObject *obj, void *closure)
   32157             : {
   32158           0 :         struct srvsvc_NetCharDevQEnum *object = (struct srvsvc_NetCharDevQEnum *)pytalloc_get_ptr(obj);
   32159             :         PyObject *py_totalentries;
   32160           0 :         if (object->out.totalentries == NULL) {
   32161           0 :                 Py_RETURN_NONE;
   32162             :         }
   32163           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)*object->out.totalentries);
   32164           0 :         return py_totalentries;
   32165             : }
   32166             : 
   32167           0 : static int py_srvsvc_NetCharDevQEnum_out_set_totalentries(PyObject *py_obj, PyObject *value, void *closure)
   32168             : {
   32169           0 :         struct srvsvc_NetCharDevQEnum *object = (struct srvsvc_NetCharDevQEnum *)pytalloc_get_ptr(py_obj);
   32170           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.totalentries));
   32171           0 :         if (value == NULL) {
   32172           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.totalentries");
   32173           0 :                 return -1;
   32174             :         }
   32175           0 :         object->out.totalentries = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.totalentries);
   32176           0 :         if (object->out.totalentries == NULL) {
   32177           0 :                 PyErr_NoMemory();
   32178           0 :                 return -1;
   32179             :         }
   32180             :         {
   32181           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.totalentries));
   32182           0 :                 if (PyLong_Check(value)) {
   32183             :                         unsigned long long test_var;
   32184           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   32185           0 :                         if (PyErr_Occurred() != NULL) {
   32186           0 :                                 return -1;
   32187             :                         }
   32188           0 :                         if (test_var > uint_max) {
   32189           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32190             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32191           0 :                                 return -1;
   32192             :                         }
   32193           0 :                         *object->out.totalentries = test_var;
   32194             :                 } else {
   32195           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   32196             :                           PyLong_Type.tp_name);
   32197           0 :                         return -1;
   32198             :                 }
   32199             :         }
   32200           0 :         return 0;
   32201             : }
   32202             : 
   32203           0 : static PyObject *py_srvsvc_NetCharDevQEnum_in_get_resume_handle(PyObject *obj, void *closure)
   32204             : {
   32205           0 :         struct srvsvc_NetCharDevQEnum *object = (struct srvsvc_NetCharDevQEnum *)pytalloc_get_ptr(obj);
   32206             :         PyObject *py_resume_handle;
   32207           0 :         if (object->in.resume_handle == NULL) {
   32208           0 :                 Py_RETURN_NONE;
   32209             :         }
   32210           0 :         if (object->in.resume_handle == NULL) {
   32211           0 :                 py_resume_handle = Py_None;
   32212           0 :                 Py_INCREF(py_resume_handle);
   32213             :         } else {
   32214           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)*object->in.resume_handle);
   32215             :         }
   32216           0 :         return py_resume_handle;
   32217             : }
   32218             : 
   32219           0 : static int py_srvsvc_NetCharDevQEnum_in_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   32220             : {
   32221           0 :         struct srvsvc_NetCharDevQEnum *object = (struct srvsvc_NetCharDevQEnum *)pytalloc_get_ptr(py_obj);
   32222           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.resume_handle));
   32223           0 :         if (value == NULL) {
   32224           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.resume_handle");
   32225           0 :                 return -1;
   32226             :         }
   32227           0 :         if (value == Py_None) {
   32228           0 :                 object->in.resume_handle = NULL;
   32229             :         } else {
   32230           0 :                 object->in.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.resume_handle);
   32231           0 :                 if (object->in.resume_handle == NULL) {
   32232           0 :                         PyErr_NoMemory();
   32233           0 :                         return -1;
   32234             :                 }
   32235             :                 {
   32236           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.resume_handle));
   32237           0 :                         if (PyLong_Check(value)) {
   32238             :                                 unsigned long long test_var;
   32239           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   32240           0 :                                 if (PyErr_Occurred() != NULL) {
   32241           0 :                                         return -1;
   32242             :                                 }
   32243           0 :                                 if (test_var > uint_max) {
   32244           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32245             :                                           PyLong_Type.tp_name, uint_max, test_var);
   32246           0 :                                         return -1;
   32247             :                                 }
   32248           0 :                                 *object->in.resume_handle = test_var;
   32249             :                         } else {
   32250           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   32251             :                                   PyLong_Type.tp_name);
   32252           0 :                                 return -1;
   32253             :                         }
   32254             :                 }
   32255             :         }
   32256           0 :         return 0;
   32257             : }
   32258             : 
   32259           0 : static PyObject *py_srvsvc_NetCharDevQEnum_out_get_resume_handle(PyObject *obj, void *closure)
   32260             : {
   32261           0 :         struct srvsvc_NetCharDevQEnum *object = (struct srvsvc_NetCharDevQEnum *)pytalloc_get_ptr(obj);
   32262             :         PyObject *py_resume_handle;
   32263           0 :         if (object->out.resume_handle == NULL) {
   32264           0 :                 Py_RETURN_NONE;
   32265             :         }
   32266           0 :         if (object->out.resume_handle == NULL) {
   32267           0 :                 py_resume_handle = Py_None;
   32268           0 :                 Py_INCREF(py_resume_handle);
   32269             :         } else {
   32270           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)*object->out.resume_handle);
   32271             :         }
   32272           0 :         return py_resume_handle;
   32273             : }
   32274             : 
   32275           0 : static int py_srvsvc_NetCharDevQEnum_out_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   32276             : {
   32277           0 :         struct srvsvc_NetCharDevQEnum *object = (struct srvsvc_NetCharDevQEnum *)pytalloc_get_ptr(py_obj);
   32278           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.resume_handle));
   32279           0 :         if (value == NULL) {
   32280           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.resume_handle");
   32281           0 :                 return -1;
   32282             :         }
   32283           0 :         if (value == Py_None) {
   32284           0 :                 object->out.resume_handle = NULL;
   32285             :         } else {
   32286           0 :                 object->out.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.resume_handle);
   32287           0 :                 if (object->out.resume_handle == NULL) {
   32288           0 :                         PyErr_NoMemory();
   32289           0 :                         return -1;
   32290             :                 }
   32291             :                 {
   32292           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.resume_handle));
   32293           0 :                         if (PyLong_Check(value)) {
   32294             :                                 unsigned long long test_var;
   32295           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   32296           0 :                                 if (PyErr_Occurred() != NULL) {
   32297           0 :                                         return -1;
   32298             :                                 }
   32299           0 :                                 if (test_var > uint_max) {
   32300           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32301             :                                           PyLong_Type.tp_name, uint_max, test_var);
   32302           0 :                                         return -1;
   32303             :                                 }
   32304           0 :                                 *object->out.resume_handle = test_var;
   32305             :                         } else {
   32306           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   32307             :                                   PyLong_Type.tp_name);
   32308           0 :                                 return -1;
   32309             :                         }
   32310             :                 }
   32311             :         }
   32312           0 :         return 0;
   32313             : }
   32314             : 
   32315           0 : static PyObject *py_srvsvc_NetCharDevQEnum_get_result(PyObject *obj, void *closure)
   32316             : {
   32317           0 :         struct srvsvc_NetCharDevQEnum *object = (struct srvsvc_NetCharDevQEnum *)pytalloc_get_ptr(obj);
   32318             :         PyObject *py_result;
   32319           0 :         py_result = PyErr_FromWERROR(object->out.result);
   32320           0 :         return py_result;
   32321             : }
   32322             : 
   32323           0 : static int py_srvsvc_NetCharDevQEnum_set_result(PyObject *py_obj, PyObject *value, void *closure)
   32324             : {
   32325           0 :         struct srvsvc_NetCharDevQEnum *object = (struct srvsvc_NetCharDevQEnum *)pytalloc_get_ptr(py_obj);
   32326           0 :         if (value == NULL) {
   32327           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   32328           0 :                 return -1;
   32329             :         }
   32330           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   32331           0 :         return 0;
   32332             : }
   32333             : 
   32334             : static PyGetSetDef py_srvsvc_NetCharDevQEnum_getsetters[] = {
   32335             :         {
   32336             :                 .name = discard_const_p(char, "in_server_unc"),
   32337             :                 .get = py_srvsvc_NetCharDevQEnum_in_get_server_unc,
   32338             :                 .set = py_srvsvc_NetCharDevQEnum_in_set_server_unc,
   32339             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   32340             :         },
   32341             :         {
   32342             :                 .name = discard_const_p(char, "in_user"),
   32343             :                 .get = py_srvsvc_NetCharDevQEnum_in_get_user,
   32344             :                 .set = py_srvsvc_NetCharDevQEnum_in_set_user,
   32345             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   32346             :         },
   32347             :         {
   32348             :                 .name = discard_const_p(char, "in_info_ctr"),
   32349             :                 .get = py_srvsvc_NetCharDevQEnum_in_get_info_ctr,
   32350             :                 .set = py_srvsvc_NetCharDevQEnum_in_set_info_ctr,
   32351             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetCharDevQInfoCtr")
   32352             :         },
   32353             :         {
   32354             :                 .name = discard_const_p(char, "out_info_ctr"),
   32355             :                 .get = py_srvsvc_NetCharDevQEnum_out_get_info_ctr,
   32356             :                 .set = py_srvsvc_NetCharDevQEnum_out_set_info_ctr,
   32357             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetCharDevQInfoCtr")
   32358             :         },
   32359             :         {
   32360             :                 .name = discard_const_p(char, "in_max_buffer"),
   32361             :                 .get = py_srvsvc_NetCharDevQEnum_in_get_max_buffer,
   32362             :                 .set = py_srvsvc_NetCharDevQEnum_in_set_max_buffer,
   32363             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   32364             :         },
   32365             :         {
   32366             :                 .name = discard_const_p(char, "out_totalentries"),
   32367             :                 .get = py_srvsvc_NetCharDevQEnum_out_get_totalentries,
   32368             :                 .set = py_srvsvc_NetCharDevQEnum_out_set_totalentries,
   32369             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   32370             :         },
   32371             :         {
   32372             :                 .name = discard_const_p(char, "in_resume_handle"),
   32373             :                 .get = py_srvsvc_NetCharDevQEnum_in_get_resume_handle,
   32374             :                 .set = py_srvsvc_NetCharDevQEnum_in_set_resume_handle,
   32375             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   32376             :         },
   32377             :         {
   32378             :                 .name = discard_const_p(char, "out_resume_handle"),
   32379             :                 .get = py_srvsvc_NetCharDevQEnum_out_get_resume_handle,
   32380             :                 .set = py_srvsvc_NetCharDevQEnum_out_set_resume_handle,
   32381             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   32382             :         },
   32383             :         {
   32384             :                 .name = discard_const_p(char, "result"),
   32385             :                 .get = py_srvsvc_NetCharDevQEnum_get_result,
   32386             :                 .set = py_srvsvc_NetCharDevQEnum_set_result,
   32387             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   32388             :         },
   32389             :         { .name = NULL }
   32390             : };
   32391             : 
   32392           0 : static PyObject *py_srvsvc_NetCharDevQEnum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   32393             : {
   32394           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetCharDevQEnum, type);
   32395           0 :         struct srvsvc_NetCharDevQEnum *_self = (struct srvsvc_NetCharDevQEnum *)pytalloc_get_ptr(self);
   32396           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   32397           0 :         _self->in.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetCharDevQInfoCtr);
   32398           0 :         _self->out.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetCharDevQInfoCtr);
   32399           0 :         _self->out.totalentries = talloc_zero(mem_ctx, uint32_t);
   32400           0 :         return self;
   32401             : }
   32402             : 
   32403           0 : static PyObject *py_srvsvc_NetCharDevQEnum_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   32404             : {
   32405             : 
   32406             : 
   32407           0 :         return PyLong_FromLong(3);
   32408             : }
   32409             : 
   32410           0 : static PyObject *py_srvsvc_NetCharDevQEnum_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   32411             : {
   32412           0 :         const struct ndr_interface_call *call = NULL;
   32413           0 :         struct srvsvc_NetCharDevQEnum *object = (struct srvsvc_NetCharDevQEnum *)pytalloc_get_ptr(py_obj);
   32414           0 :         PyObject *ret = NULL;
   32415           0 :         struct ndr_push *push = NULL;
   32416             :         DATA_BLOB blob;
   32417             :         enum ndr_err_code err;
   32418             : 
   32419           0 :         if (ndr_table_srvsvc.num_calls < 4) {
   32420           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQEnum_ndr_pack");
   32421           0 :                 return NULL;
   32422             :         }
   32423           0 :         call = &ndr_table_srvsvc.calls[3];
   32424             : 
   32425           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   32426           0 :         if (push == NULL) {
   32427           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   32428           0 :                 return NULL;
   32429             :         }
   32430             : 
   32431           0 :         push->flags |= ndr_push_flags;
   32432             : 
   32433           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   32434           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   32435           0 :                 TALLOC_FREE(push);
   32436           0 :                 PyErr_SetNdrError(err);
   32437           0 :                 return NULL;
   32438             :         }
   32439           0 :         blob = ndr_push_blob(push);
   32440           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   32441           0 :         TALLOC_FREE(push);
   32442           0 :         return ret;
   32443             : }
   32444             : 
   32445           0 : static PyObject *py_srvsvc_NetCharDevQEnum_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   32446             : {
   32447           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   32448           0 :         PyObject *bigendian_obj = NULL;
   32449           0 :         PyObject *ndr64_obj = NULL;
   32450           0 :         uint32_t ndr_push_flags = 0;
   32451             : 
   32452           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   32453             :                 discard_const_p(char *, kwnames),
   32454             :                 &bigendian_obj,
   32455             :                 &ndr64_obj)) {
   32456           0 :                 return NULL;
   32457             :         }
   32458             : 
   32459           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   32460           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   32461             :         }
   32462           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   32463           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   32464             :         }
   32465             : 
   32466           0 :         return py_srvsvc_NetCharDevQEnum_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   32467             : }
   32468             : 
   32469           0 : static PyObject *py_srvsvc_NetCharDevQEnum_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   32470             : {
   32471           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   32472           0 :         PyObject *bigendian_obj = NULL;
   32473           0 :         PyObject *ndr64_obj = NULL;
   32474           0 :         uint32_t ndr_push_flags = 0;
   32475             : 
   32476           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   32477             :                 discard_const_p(char *, kwnames),
   32478             :                 &bigendian_obj,
   32479             :                 &ndr64_obj)) {
   32480           0 :                 return NULL;
   32481             :         }
   32482             : 
   32483           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   32484           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   32485             :         }
   32486           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   32487           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   32488             :         }
   32489             : 
   32490           0 :         return py_srvsvc_NetCharDevQEnum_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   32491             : }
   32492             : 
   32493           0 : static PyObject *py_srvsvc_NetCharDevQEnum_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   32494             : {
   32495           0 :         const struct ndr_interface_call *call = NULL;
   32496           0 :         struct srvsvc_NetCharDevQEnum *object = (struct srvsvc_NetCharDevQEnum *)pytalloc_get_ptr(py_obj);
   32497           0 :         struct ndr_pull *pull = NULL;
   32498             :         enum ndr_err_code err;
   32499             : 
   32500           0 :         if (ndr_table_srvsvc.num_calls < 4) {
   32501           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQEnum_ndr_unpack");
   32502           0 :                 return NULL;
   32503             :         }
   32504           0 :         call = &ndr_table_srvsvc.calls[3];
   32505             : 
   32506           0 :         pull = ndr_pull_init_blob(blob, object);
   32507           0 :         if (pull == NULL) {
   32508           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   32509           0 :                 return NULL;
   32510             :         }
   32511             : 
   32512           0 :         pull->flags |= ndr_pull_flags;
   32513             : 
   32514           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   32515           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   32516           0 :                 TALLOC_FREE(pull);
   32517           0 :                 PyErr_SetNdrError(err);
   32518           0 :                 return NULL;
   32519             :         }
   32520           0 :         if (!allow_remaining) {
   32521             :                 uint32_t highest_ofs;
   32522             : 
   32523           0 :                 if (pull->offset > pull->relative_highest_offset) {
   32524           0 :                         highest_ofs = pull->offset;
   32525             :                 } else {
   32526           0 :                         highest_ofs = pull->relative_highest_offset;
   32527             :                 }
   32528           0 :                 if (highest_ofs < pull->data_size) {
   32529           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   32530             :                                 "not all bytes consumed ofs[%u] size[%u]",
   32531             :                                 highest_ofs, pull->data_size);
   32532           0 :                         TALLOC_FREE(pull);
   32533           0 :                         PyErr_SetNdrError(err);
   32534           0 :                         return NULL;
   32535             :                 }
   32536             :         }
   32537             : 
   32538           0 :         TALLOC_FREE(pull);
   32539           0 :         Py_RETURN_NONE;
   32540             : }
   32541             : 
   32542           0 : static PyObject *py_srvsvc_NetCharDevQEnum_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   32543             : {
   32544             :         DATA_BLOB blob;
   32545           0 :         Py_ssize_t blob_length = 0;
   32546           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   32547           0 :         PyObject *bigendian_obj = NULL;
   32548           0 :         PyObject *ndr64_obj = NULL;
   32549           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   32550           0 :         PyObject *allow_remaining_obj = NULL;
   32551           0 :         bool allow_remaining = false;
   32552             : 
   32553           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   32554             :                 discard_const_p(char *, kwnames),
   32555             :                 &blob.data, &blob_length,
   32556             :                 &bigendian_obj,
   32557             :                 &ndr64_obj,
   32558             :                 &allow_remaining_obj)) {
   32559           0 :                 return NULL;
   32560             :         }
   32561           0 :         blob.length = blob_length;
   32562             : 
   32563           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   32564           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   32565             :         }
   32566           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   32567           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   32568             :         }
   32569             : 
   32570           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   32571           0 :                 allow_remaining = true;
   32572             :         }
   32573             : 
   32574           0 :         return py_srvsvc_NetCharDevQEnum_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   32575             : }
   32576             : 
   32577           0 : static PyObject *py_srvsvc_NetCharDevQEnum_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   32578             : {
   32579             :         DATA_BLOB blob;
   32580           0 :         Py_ssize_t blob_length = 0;
   32581           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   32582           0 :         PyObject *bigendian_obj = NULL;
   32583           0 :         PyObject *ndr64_obj = NULL;
   32584           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   32585           0 :         PyObject *allow_remaining_obj = NULL;
   32586           0 :         bool allow_remaining = false;
   32587             : 
   32588           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   32589             :                 discard_const_p(char *, kwnames),
   32590             :                 &blob.data, &blob_length,
   32591             :                 &bigendian_obj,
   32592             :                 &ndr64_obj,
   32593             :                 &allow_remaining_obj)) {
   32594           0 :                 return NULL;
   32595             :         }
   32596           0 :         blob.length = blob_length;
   32597             : 
   32598           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   32599           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   32600             :         }
   32601           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   32602           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   32603             :         }
   32604             : 
   32605           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   32606           0 :                 allow_remaining = true;
   32607             :         }
   32608             : 
   32609           0 :         return py_srvsvc_NetCharDevQEnum_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   32610             : }
   32611             : 
   32612           0 : static PyObject *py_srvsvc_NetCharDevQEnum_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   32613             : {
   32614           0 :         const struct ndr_interface_call *call = NULL;
   32615           0 :         struct srvsvc_NetCharDevQEnum *object = (struct srvsvc_NetCharDevQEnum *)pytalloc_get_ptr(py_obj);
   32616             :         PyObject *ret;
   32617             :         char *retstr;
   32618             : 
   32619           0 :         if (ndr_table_srvsvc.num_calls < 4) {
   32620           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQEnum_ndr_print");
   32621           0 :                 return NULL;
   32622             :         }
   32623           0 :         call = &ndr_table_srvsvc.calls[3];
   32624             : 
   32625           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   32626           0 :         ret = PyUnicode_FromString(retstr);
   32627           0 :         TALLOC_FREE(retstr);
   32628             : 
   32629           0 :         return ret;
   32630             : }
   32631             : 
   32632           0 : static PyObject *py_srvsvc_NetCharDevQEnum_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   32633             : {
   32634           0 :         return py_srvsvc_NetCharDevQEnum_ndr_print(py_obj, "srvsvc_NetCharDevQEnum_in", NDR_IN);
   32635             : }
   32636             : 
   32637           0 : static PyObject *py_srvsvc_NetCharDevQEnum_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   32638             : {
   32639           0 :         return py_srvsvc_NetCharDevQEnum_ndr_print(py_obj, "srvsvc_NetCharDevQEnum_out", NDR_OUT);
   32640             : }
   32641             : 
   32642             : static PyMethodDef py_srvsvc_NetCharDevQEnum_methods[] = {
   32643             :         { "opnum", (PyCFunction)py_srvsvc_NetCharDevQEnum_ndr_opnum, METH_NOARGS|METH_CLASS,
   32644             :                 "srvsvc.NetCharDevQEnum.opnum() -> 3 (0x03) " },
   32645             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQEnum_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   32646             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   32647             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQEnum_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   32648             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   32649             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQEnum_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   32650             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   32651             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQEnum_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   32652             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   32653             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetCharDevQEnum_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   32654             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetCharDevQEnum_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   32655             :         { NULL, NULL, 0, NULL }
   32656             : };
   32657             : 
   32658             : 
   32659             : static PyTypeObject srvsvc_NetCharDevQEnum_Type = {
   32660             :         PyVarObject_HEAD_INIT(NULL, 0)
   32661             :         .tp_name = "srvsvc.NetCharDevQEnum",
   32662             :         .tp_getset = py_srvsvc_NetCharDevQEnum_getsetters,
   32663             :         .tp_methods = py_srvsvc_NetCharDevQEnum_methods,
   32664             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   32665             :         .tp_new = py_srvsvc_NetCharDevQEnum_new,
   32666             : };
   32667             : 
   32668           0 : static bool pack_py_srvsvc_NetCharDevQEnum_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetCharDevQEnum *r)
   32669             : {
   32670             :         PyObject *py_server_unc;
   32671             :         PyObject *py_user;
   32672             :         PyObject *py_info_ctr;
   32673             :         PyObject *py_max_buffer;
   32674             :         PyObject *py_resume_handle;
   32675           0 :         const char *kwnames[] = {
   32676             :                 "server_unc", "user", "info_ctr", "max_buffer", "resume_handle", NULL
   32677             :         };
   32678             : 
   32679           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:srvsvc_NetCharDevQEnum", discard_const_p(char *, kwnames), &py_server_unc, &py_user, &py_info_ctr, &py_max_buffer, &py_resume_handle)) {
   32680           0 :                 return false;
   32681             :         }
   32682             : 
   32683           0 :         if (py_server_unc == NULL) {
   32684           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   32685           0 :                 return false;
   32686             :         }
   32687           0 :         if (py_server_unc == Py_None) {
   32688           0 :                 r->in.server_unc = NULL;
   32689             :         } else {
   32690           0 :                 r->in.server_unc = NULL;
   32691             :                 {
   32692             :                         const char *test_str;
   32693             :                         const char *talloc_str;
   32694           0 :                         PyObject *unicode = NULL;
   32695           0 :                         if (PyUnicode_Check(py_server_unc)) {
   32696           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   32697           0 :                                 if (unicode == NULL) {
   32698           0 :                                         PyErr_NoMemory();
   32699           0 :                                         return false;
   32700             :                                 }
   32701           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   32702           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   32703           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   32704             :                         } else {
   32705           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   32706           0 :                                 return false;
   32707             :                         }
   32708           0 :                         talloc_str = talloc_strdup(r, test_str);
   32709           0 :                         if (unicode != NULL) {
   32710           0 :                                 Py_DECREF(unicode);
   32711             :                         }
   32712           0 :                         if (talloc_str == NULL) {
   32713           0 :                                 PyErr_NoMemory();
   32714           0 :                                 return false;
   32715             :                         }
   32716           0 :                         r->in.server_unc = talloc_str;
   32717             :                 }
   32718             :         }
   32719           0 :         if (py_user == NULL) {
   32720           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.user");
   32721           0 :                 return false;
   32722             :         }
   32723           0 :         if (py_user == Py_None) {
   32724           0 :                 r->in.user = NULL;
   32725             :         } else {
   32726           0 :                 r->in.user = NULL;
   32727             :                 {
   32728             :                         const char *test_str;
   32729             :                         const char *talloc_str;
   32730           0 :                         PyObject *unicode = NULL;
   32731           0 :                         if (PyUnicode_Check(py_user)) {
   32732           0 :                                 unicode = PyUnicode_AsEncodedString(py_user, "utf-8", "ignore");
   32733           0 :                                 if (unicode == NULL) {
   32734           0 :                                         PyErr_NoMemory();
   32735           0 :                                         return false;
   32736             :                                 }
   32737           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   32738           0 :                         } else if (PyBytes_Check(py_user)) {
   32739           0 :                                 test_str = PyBytes_AS_STRING(py_user);
   32740             :                         } else {
   32741           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_user)->tp_name);
   32742           0 :                                 return false;
   32743             :                         }
   32744           0 :                         talloc_str = talloc_strdup(r, test_str);
   32745           0 :                         if (unicode != NULL) {
   32746           0 :                                 Py_DECREF(unicode);
   32747             :                         }
   32748           0 :                         if (talloc_str == NULL) {
   32749           0 :                                 PyErr_NoMemory();
   32750           0 :                                 return false;
   32751             :                         }
   32752           0 :                         r->in.user = talloc_str;
   32753             :                 }
   32754             :         }
   32755           0 :         if (py_info_ctr == NULL) {
   32756           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info_ctr");
   32757           0 :                 return false;
   32758             :         }
   32759           0 :         r->in.info_ctr = talloc_ptrtype(r, r->in.info_ctr);
   32760           0 :         if (r->in.info_ctr == NULL) {
   32761           0 :                 PyErr_NoMemory();
   32762           0 :                 return false;
   32763             :         }
   32764           0 :         PY_CHECK_TYPE(&srvsvc_NetCharDevQInfoCtr_Type, py_info_ctr, return false;);
   32765           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_info_ctr)) == NULL) {
   32766           0 :                 PyErr_NoMemory();
   32767           0 :                 return false;
   32768             :         }
   32769           0 :         r->in.info_ctr = (struct srvsvc_NetCharDevQInfoCtr *)pytalloc_get_ptr(py_info_ctr);
   32770           0 :         if (py_max_buffer == NULL) {
   32771           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.max_buffer");
   32772           0 :                 return false;
   32773             :         }
   32774             :         {
   32775           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
   32776           0 :                 if (PyLong_Check(py_max_buffer)) {
   32777             :                         unsigned long long test_var;
   32778           0 :                         test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
   32779           0 :                         if (PyErr_Occurred() != NULL) {
   32780           0 :                                 return false;
   32781             :                         }
   32782           0 :                         if (test_var > uint_max) {
   32783           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32784             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32785           0 :                                 return false;
   32786             :                         }
   32787           0 :                         r->in.max_buffer = test_var;
   32788             :                 } else {
   32789           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   32790             :                           PyLong_Type.tp_name);
   32791           0 :                         return false;
   32792             :                 }
   32793             :         }
   32794           0 :         if (py_resume_handle == NULL) {
   32795           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.resume_handle");
   32796           0 :                 return false;
   32797             :         }
   32798           0 :         if (py_resume_handle == Py_None) {
   32799           0 :                 r->in.resume_handle = NULL;
   32800             :         } else {
   32801           0 :                 r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
   32802           0 :                 if (r->in.resume_handle == NULL) {
   32803           0 :                         PyErr_NoMemory();
   32804           0 :                         return false;
   32805             :                 }
   32806             :                 {
   32807           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
   32808           0 :                         if (PyLong_Check(py_resume_handle)) {
   32809             :                                 unsigned long long test_var;
   32810           0 :                                 test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
   32811           0 :                                 if (PyErr_Occurred() != NULL) {
   32812           0 :                                         return false;
   32813             :                                 }
   32814           0 :                                 if (test_var > uint_max) {
   32815           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32816             :                                           PyLong_Type.tp_name, uint_max, test_var);
   32817           0 :                                         return false;
   32818             :                                 }
   32819           0 :                                 *r->in.resume_handle = test_var;
   32820             :                         } else {
   32821           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   32822             :                                   PyLong_Type.tp_name);
   32823           0 :                                 return false;
   32824             :                         }
   32825             :                 }
   32826             :         }
   32827           0 :         return true;
   32828             : }
   32829             : 
   32830           0 : static PyObject *unpack_py_srvsvc_NetCharDevQEnum_args_out(struct srvsvc_NetCharDevQEnum *r)
   32831             : {
   32832             :         PyObject *result;
   32833             :         PyObject *py_info_ctr;
   32834             :         PyObject *py_totalentries;
   32835             :         PyObject *py_resume_handle;
   32836           0 :         result = PyTuple_New(3);
   32837           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetCharDevQInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
   32838           0 :         PyTuple_SetItem(result, 0, py_info_ctr);
   32839           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)*r->out.totalentries);
   32840           0 :         PyTuple_SetItem(result, 1, py_totalentries);
   32841           0 :         if (r->out.resume_handle == NULL) {
   32842           0 :                 py_resume_handle = Py_None;
   32843           0 :                 Py_INCREF(py_resume_handle);
   32844             :         } else {
   32845           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)*r->out.resume_handle);
   32846             :         }
   32847           0 :         PyTuple_SetItem(result, 2, py_resume_handle);
   32848           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   32849           0 :                 PyErr_SetWERROR(r->out.result);
   32850           0 :                 return NULL;
   32851             :         }
   32852             : 
   32853           0 :         return result;
   32854             : }
   32855             : 
   32856             : 
   32857           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_in_get_server_unc(PyObject *obj, void *closure)
   32858             : {
   32859           0 :         struct srvsvc_NetCharDevQGetInfo *object = (struct srvsvc_NetCharDevQGetInfo *)pytalloc_get_ptr(obj);
   32860             :         PyObject *py_server_unc;
   32861           0 :         if (object->in.server_unc == NULL) {
   32862           0 :                 Py_RETURN_NONE;
   32863             :         }
   32864           0 :         if (object->in.server_unc == NULL) {
   32865           0 :                 py_server_unc = Py_None;
   32866           0 :                 Py_INCREF(py_server_unc);
   32867             :         } else {
   32868           0 :                 if (object->in.server_unc == NULL) {
   32869           0 :                         py_server_unc = Py_None;
   32870           0 :                         Py_INCREF(py_server_unc);
   32871             :                 } else {
   32872           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   32873             :                 }
   32874             :         }
   32875           0 :         return py_server_unc;
   32876             : }
   32877             : 
   32878           0 : static int py_srvsvc_NetCharDevQGetInfo_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   32879             : {
   32880           0 :         struct srvsvc_NetCharDevQGetInfo *object = (struct srvsvc_NetCharDevQGetInfo *)pytalloc_get_ptr(py_obj);
   32881           0 :         if (value == NULL) {
   32882           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   32883           0 :                 return -1;
   32884             :         }
   32885           0 :         if (value == Py_None) {
   32886           0 :                 object->in.server_unc = NULL;
   32887             :         } else {
   32888           0 :                 object->in.server_unc = NULL;
   32889             :                 {
   32890             :                         const char *test_str;
   32891             :                         const char *talloc_str;
   32892           0 :                         PyObject *unicode = NULL;
   32893           0 :                         if (PyUnicode_Check(value)) {
   32894           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   32895           0 :                                 if (unicode == NULL) {
   32896           0 :                                         PyErr_NoMemory();
   32897           0 :                                         return -1;
   32898             :                                 }
   32899           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   32900           0 :                         } else if (PyBytes_Check(value)) {
   32901           0 :                                 test_str = PyBytes_AS_STRING(value);
   32902             :                         } else {
   32903           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   32904           0 :                                 return -1;
   32905             :                         }
   32906           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   32907           0 :                         if (unicode != NULL) {
   32908           0 :                                 Py_DECREF(unicode);
   32909             :                         }
   32910           0 :                         if (talloc_str == NULL) {
   32911           0 :                                 PyErr_NoMemory();
   32912           0 :                                 return -1;
   32913             :                         }
   32914           0 :                         object->in.server_unc = talloc_str;
   32915             :                 }
   32916             :         }
   32917           0 :         return 0;
   32918             : }
   32919             : 
   32920           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_in_get_queue_name(PyObject *obj, void *closure)
   32921             : {
   32922           0 :         struct srvsvc_NetCharDevQGetInfo *object = (struct srvsvc_NetCharDevQGetInfo *)pytalloc_get_ptr(obj);
   32923             :         PyObject *py_queue_name;
   32924           0 :         if (object->in.queue_name == NULL) {
   32925           0 :                 py_queue_name = Py_None;
   32926           0 :                 Py_INCREF(py_queue_name);
   32927             :         } else {
   32928           0 :                 py_queue_name = PyUnicode_Decode(object->in.queue_name, strlen(object->in.queue_name), "utf-8", "ignore");
   32929             :         }
   32930           0 :         return py_queue_name;
   32931             : }
   32932             : 
   32933           0 : static int py_srvsvc_NetCharDevQGetInfo_in_set_queue_name(PyObject *py_obj, PyObject *value, void *closure)
   32934             : {
   32935           0 :         struct srvsvc_NetCharDevQGetInfo *object = (struct srvsvc_NetCharDevQGetInfo *)pytalloc_get_ptr(py_obj);
   32936           0 :         if (value == NULL) {
   32937           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.queue_name");
   32938           0 :                 return -1;
   32939             :         }
   32940             :         {
   32941             :                 const char *test_str;
   32942             :                 const char *talloc_str;
   32943           0 :                 PyObject *unicode = NULL;
   32944           0 :                 if (PyUnicode_Check(value)) {
   32945           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   32946           0 :                         if (unicode == NULL) {
   32947           0 :                                 PyErr_NoMemory();
   32948           0 :                                 return -1;
   32949             :                         }
   32950           0 :                         test_str = PyBytes_AS_STRING(unicode);
   32951           0 :                 } else if (PyBytes_Check(value)) {
   32952           0 :                         test_str = PyBytes_AS_STRING(value);
   32953             :                 } else {
   32954           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   32955           0 :                         return -1;
   32956             :                 }
   32957           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   32958           0 :                 if (unicode != NULL) {
   32959           0 :                         Py_DECREF(unicode);
   32960             :                 }
   32961           0 :                 if (talloc_str == NULL) {
   32962           0 :                         PyErr_NoMemory();
   32963           0 :                         return -1;
   32964             :                 }
   32965           0 :                 object->in.queue_name = talloc_str;
   32966             :         }
   32967           0 :         return 0;
   32968             : }
   32969             : 
   32970           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_in_get_user(PyObject *obj, void *closure)
   32971             : {
   32972           0 :         struct srvsvc_NetCharDevQGetInfo *object = (struct srvsvc_NetCharDevQGetInfo *)pytalloc_get_ptr(obj);
   32973             :         PyObject *py_user;
   32974           0 :         if (object->in.user == NULL) {
   32975           0 :                 py_user = Py_None;
   32976           0 :                 Py_INCREF(py_user);
   32977             :         } else {
   32978           0 :                 py_user = PyUnicode_Decode(object->in.user, strlen(object->in.user), "utf-8", "ignore");
   32979             :         }
   32980           0 :         return py_user;
   32981             : }
   32982             : 
   32983           0 : static int py_srvsvc_NetCharDevQGetInfo_in_set_user(PyObject *py_obj, PyObject *value, void *closure)
   32984             : {
   32985           0 :         struct srvsvc_NetCharDevQGetInfo *object = (struct srvsvc_NetCharDevQGetInfo *)pytalloc_get_ptr(py_obj);
   32986           0 :         if (value == NULL) {
   32987           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.user");
   32988           0 :                 return -1;
   32989             :         }
   32990             :         {
   32991             :                 const char *test_str;
   32992             :                 const char *talloc_str;
   32993           0 :                 PyObject *unicode = NULL;
   32994           0 :                 if (PyUnicode_Check(value)) {
   32995           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   32996           0 :                         if (unicode == NULL) {
   32997           0 :                                 PyErr_NoMemory();
   32998           0 :                                 return -1;
   32999             :                         }
   33000           0 :                         test_str = PyBytes_AS_STRING(unicode);
   33001           0 :                 } else if (PyBytes_Check(value)) {
   33002           0 :                         test_str = PyBytes_AS_STRING(value);
   33003             :                 } else {
   33004           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   33005           0 :                         return -1;
   33006             :                 }
   33007           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   33008           0 :                 if (unicode != NULL) {
   33009           0 :                         Py_DECREF(unicode);
   33010             :                 }
   33011           0 :                 if (talloc_str == NULL) {
   33012           0 :                         PyErr_NoMemory();
   33013           0 :                         return -1;
   33014             :                 }
   33015           0 :                 object->in.user = talloc_str;
   33016             :         }
   33017           0 :         return 0;
   33018             : }
   33019             : 
   33020           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_in_get_level(PyObject *obj, void *closure)
   33021             : {
   33022           0 :         struct srvsvc_NetCharDevQGetInfo *object = (struct srvsvc_NetCharDevQGetInfo *)pytalloc_get_ptr(obj);
   33023             :         PyObject *py_level;
   33024           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   33025           0 :         return py_level;
   33026             : }
   33027             : 
   33028           0 : static int py_srvsvc_NetCharDevQGetInfo_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   33029             : {
   33030           0 :         struct srvsvc_NetCharDevQGetInfo *object = (struct srvsvc_NetCharDevQGetInfo *)pytalloc_get_ptr(py_obj);
   33031           0 :         if (value == NULL) {
   33032           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   33033           0 :                 return -1;
   33034             :         }
   33035             :         {
   33036           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   33037           0 :                 if (PyLong_Check(value)) {
   33038             :                         unsigned long long test_var;
   33039           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   33040           0 :                         if (PyErr_Occurred() != NULL) {
   33041           0 :                                 return -1;
   33042             :                         }
   33043           0 :                         if (test_var > uint_max) {
   33044           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33045             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33046           0 :                                 return -1;
   33047             :                         }
   33048           0 :                         object->in.level = test_var;
   33049             :                 } else {
   33050           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   33051             :                           PyLong_Type.tp_name);
   33052           0 :                         return -1;
   33053             :                 }
   33054             :         }
   33055           0 :         return 0;
   33056             : }
   33057             : 
   33058           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_out_get_info(PyObject *obj, void *closure)
   33059             : {
   33060           0 :         struct srvsvc_NetCharDevQGetInfo *object = (struct srvsvc_NetCharDevQGetInfo *)pytalloc_get_ptr(obj);
   33061             :         PyObject *py_info;
   33062           0 :         if (object->out.info == NULL) {
   33063           0 :                 Py_RETURN_NONE;
   33064             :         }
   33065           0 :         py_info = pyrpc_import_union(&srvsvc_NetCharDevQInfo_Type, object->out.info, object->in.level, object->out.info, "union srvsvc_NetCharDevQInfo");
   33066           0 :         if (py_info == NULL) {
   33067           0 :                 return NULL;
   33068             :         }
   33069           0 :         return py_info;
   33070             : }
   33071             : 
   33072           0 : static int py_srvsvc_NetCharDevQGetInfo_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   33073             : {
   33074           0 :         struct srvsvc_NetCharDevQGetInfo *object = (struct srvsvc_NetCharDevQGetInfo *)pytalloc_get_ptr(py_obj);
   33075           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   33076           0 :         if (value == NULL) {
   33077           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info");
   33078           0 :                 return -1;
   33079             :         }
   33080           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   33081           0 :         if (object->out.info == NULL) {
   33082           0 :                 PyErr_NoMemory();
   33083           0 :                 return -1;
   33084             :         }
   33085             :         {
   33086             :                 union srvsvc_NetCharDevQInfo *info_switch_1;
   33087           0 :                 info_switch_1 = (union srvsvc_NetCharDevQInfo *)pyrpc_export_union(&srvsvc_NetCharDevQInfo_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union srvsvc_NetCharDevQInfo");
   33088           0 :                 if (info_switch_1 == NULL) {
   33089           0 :                         return -1;
   33090             :                 }
   33091           0 :                 object->out.info = info_switch_1;
   33092             :         }
   33093           0 :         return 0;
   33094             : }
   33095             : 
   33096           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_get_result(PyObject *obj, void *closure)
   33097             : {
   33098           0 :         struct srvsvc_NetCharDevQGetInfo *object = (struct srvsvc_NetCharDevQGetInfo *)pytalloc_get_ptr(obj);
   33099             :         PyObject *py_result;
   33100           0 :         py_result = PyErr_FromWERROR(object->out.result);
   33101           0 :         return py_result;
   33102             : }
   33103             : 
   33104           0 : static int py_srvsvc_NetCharDevQGetInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
   33105             : {
   33106           0 :         struct srvsvc_NetCharDevQGetInfo *object = (struct srvsvc_NetCharDevQGetInfo *)pytalloc_get_ptr(py_obj);
   33107           0 :         if (value == NULL) {
   33108           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   33109           0 :                 return -1;
   33110             :         }
   33111           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   33112           0 :         return 0;
   33113             : }
   33114             : 
   33115             : static PyGetSetDef py_srvsvc_NetCharDevQGetInfo_getsetters[] = {
   33116             :         {
   33117             :                 .name = discard_const_p(char, "in_server_unc"),
   33118             :                 .get = py_srvsvc_NetCharDevQGetInfo_in_get_server_unc,
   33119             :                 .set = py_srvsvc_NetCharDevQGetInfo_in_set_server_unc,
   33120             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   33121             :         },
   33122             :         {
   33123             :                 .name = discard_const_p(char, "in_queue_name"),
   33124             :                 .get = py_srvsvc_NetCharDevQGetInfo_in_get_queue_name,
   33125             :                 .set = py_srvsvc_NetCharDevQGetInfo_in_set_queue_name,
   33126             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   33127             :         },
   33128             :         {
   33129             :                 .name = discard_const_p(char, "in_user"),
   33130             :                 .get = py_srvsvc_NetCharDevQGetInfo_in_get_user,
   33131             :                 .set = py_srvsvc_NetCharDevQGetInfo_in_set_user,
   33132             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   33133             :         },
   33134             :         {
   33135             :                 .name = discard_const_p(char, "in_level"),
   33136             :                 .get = py_srvsvc_NetCharDevQGetInfo_in_get_level,
   33137             :                 .set = py_srvsvc_NetCharDevQGetInfo_in_set_level,
   33138             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   33139             :         },
   33140             :         {
   33141             :                 .name = discard_const_p(char, "out_info"),
   33142             :                 .get = py_srvsvc_NetCharDevQGetInfo_out_get_info,
   33143             :                 .set = py_srvsvc_NetCharDevQGetInfo_out_set_info,
   33144             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetCharDevQInfo")
   33145             :         },
   33146             :         {
   33147             :                 .name = discard_const_p(char, "result"),
   33148             :                 .get = py_srvsvc_NetCharDevQGetInfo_get_result,
   33149             :                 .set = py_srvsvc_NetCharDevQGetInfo_set_result,
   33150             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   33151             :         },
   33152             :         { .name = NULL }
   33153             : };
   33154             : 
   33155           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   33156             : {
   33157           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetCharDevQGetInfo, type);
   33158           0 :         struct srvsvc_NetCharDevQGetInfo *_self = (struct srvsvc_NetCharDevQGetInfo *)pytalloc_get_ptr(self);
   33159           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   33160           0 :         _self->out.info = talloc_zero(mem_ctx, union srvsvc_NetCharDevQInfo);
   33161           0 :         return self;
   33162             : }
   33163             : 
   33164           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   33165             : {
   33166             : 
   33167             : 
   33168           0 :         return PyLong_FromLong(4);
   33169             : }
   33170             : 
   33171           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   33172             : {
   33173           0 :         const struct ndr_interface_call *call = NULL;
   33174           0 :         struct srvsvc_NetCharDevQGetInfo *object = (struct srvsvc_NetCharDevQGetInfo *)pytalloc_get_ptr(py_obj);
   33175           0 :         PyObject *ret = NULL;
   33176           0 :         struct ndr_push *push = NULL;
   33177             :         DATA_BLOB blob;
   33178             :         enum ndr_err_code err;
   33179             : 
   33180           0 :         if (ndr_table_srvsvc.num_calls < 5) {
   33181           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQGetInfo_ndr_pack");
   33182           0 :                 return NULL;
   33183             :         }
   33184           0 :         call = &ndr_table_srvsvc.calls[4];
   33185             : 
   33186           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   33187           0 :         if (push == NULL) {
   33188           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   33189           0 :                 return NULL;
   33190             :         }
   33191             : 
   33192           0 :         push->flags |= ndr_push_flags;
   33193             : 
   33194           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   33195           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   33196           0 :                 TALLOC_FREE(push);
   33197           0 :                 PyErr_SetNdrError(err);
   33198           0 :                 return NULL;
   33199             :         }
   33200           0 :         blob = ndr_push_blob(push);
   33201           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   33202           0 :         TALLOC_FREE(push);
   33203           0 :         return ret;
   33204             : }
   33205             : 
   33206           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   33207             : {
   33208           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   33209           0 :         PyObject *bigendian_obj = NULL;
   33210           0 :         PyObject *ndr64_obj = NULL;
   33211           0 :         uint32_t ndr_push_flags = 0;
   33212             : 
   33213           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   33214             :                 discard_const_p(char *, kwnames),
   33215             :                 &bigendian_obj,
   33216             :                 &ndr64_obj)) {
   33217           0 :                 return NULL;
   33218             :         }
   33219             : 
   33220           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   33221           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   33222             :         }
   33223           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   33224           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   33225             :         }
   33226             : 
   33227           0 :         return py_srvsvc_NetCharDevQGetInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   33228             : }
   33229             : 
   33230           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   33231             : {
   33232           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   33233           0 :         PyObject *bigendian_obj = NULL;
   33234           0 :         PyObject *ndr64_obj = NULL;
   33235           0 :         uint32_t ndr_push_flags = 0;
   33236             : 
   33237           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   33238             :                 discard_const_p(char *, kwnames),
   33239             :                 &bigendian_obj,
   33240             :                 &ndr64_obj)) {
   33241           0 :                 return NULL;
   33242             :         }
   33243             : 
   33244           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   33245           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   33246             :         }
   33247           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   33248           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   33249             :         }
   33250             : 
   33251           0 :         return py_srvsvc_NetCharDevQGetInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   33252             : }
   33253             : 
   33254           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   33255             : {
   33256           0 :         const struct ndr_interface_call *call = NULL;
   33257           0 :         struct srvsvc_NetCharDevQGetInfo *object = (struct srvsvc_NetCharDevQGetInfo *)pytalloc_get_ptr(py_obj);
   33258           0 :         struct ndr_pull *pull = NULL;
   33259             :         enum ndr_err_code err;
   33260             : 
   33261           0 :         if (ndr_table_srvsvc.num_calls < 5) {
   33262           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQGetInfo_ndr_unpack");
   33263           0 :                 return NULL;
   33264             :         }
   33265           0 :         call = &ndr_table_srvsvc.calls[4];
   33266             : 
   33267           0 :         pull = ndr_pull_init_blob(blob, object);
   33268           0 :         if (pull == NULL) {
   33269           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   33270           0 :                 return NULL;
   33271             :         }
   33272             : 
   33273           0 :         pull->flags |= ndr_pull_flags;
   33274             : 
   33275           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   33276           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   33277           0 :                 TALLOC_FREE(pull);
   33278           0 :                 PyErr_SetNdrError(err);
   33279           0 :                 return NULL;
   33280             :         }
   33281           0 :         if (!allow_remaining) {
   33282             :                 uint32_t highest_ofs;
   33283             : 
   33284           0 :                 if (pull->offset > pull->relative_highest_offset) {
   33285           0 :                         highest_ofs = pull->offset;
   33286             :                 } else {
   33287           0 :                         highest_ofs = pull->relative_highest_offset;
   33288             :                 }
   33289           0 :                 if (highest_ofs < pull->data_size) {
   33290           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   33291             :                                 "not all bytes consumed ofs[%u] size[%u]",
   33292             :                                 highest_ofs, pull->data_size);
   33293           0 :                         TALLOC_FREE(pull);
   33294           0 :                         PyErr_SetNdrError(err);
   33295           0 :                         return NULL;
   33296             :                 }
   33297             :         }
   33298             : 
   33299           0 :         TALLOC_FREE(pull);
   33300           0 :         Py_RETURN_NONE;
   33301             : }
   33302             : 
   33303           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   33304             : {
   33305             :         DATA_BLOB blob;
   33306           0 :         Py_ssize_t blob_length = 0;
   33307           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   33308           0 :         PyObject *bigendian_obj = NULL;
   33309           0 :         PyObject *ndr64_obj = NULL;
   33310           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   33311           0 :         PyObject *allow_remaining_obj = NULL;
   33312           0 :         bool allow_remaining = false;
   33313             : 
   33314           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   33315             :                 discard_const_p(char *, kwnames),
   33316             :                 &blob.data, &blob_length,
   33317             :                 &bigendian_obj,
   33318             :                 &ndr64_obj,
   33319             :                 &allow_remaining_obj)) {
   33320           0 :                 return NULL;
   33321             :         }
   33322           0 :         blob.length = blob_length;
   33323             : 
   33324           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   33325           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   33326             :         }
   33327           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   33328           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   33329             :         }
   33330             : 
   33331           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   33332           0 :                 allow_remaining = true;
   33333             :         }
   33334             : 
   33335           0 :         return py_srvsvc_NetCharDevQGetInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   33336             : }
   33337             : 
   33338           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   33339             : {
   33340             :         DATA_BLOB blob;
   33341           0 :         Py_ssize_t blob_length = 0;
   33342           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   33343           0 :         PyObject *bigendian_obj = NULL;
   33344           0 :         PyObject *ndr64_obj = NULL;
   33345           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   33346           0 :         PyObject *allow_remaining_obj = NULL;
   33347           0 :         bool allow_remaining = false;
   33348             : 
   33349           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   33350             :                 discard_const_p(char *, kwnames),
   33351             :                 &blob.data, &blob_length,
   33352             :                 &bigendian_obj,
   33353             :                 &ndr64_obj,
   33354             :                 &allow_remaining_obj)) {
   33355           0 :                 return NULL;
   33356             :         }
   33357           0 :         blob.length = blob_length;
   33358             : 
   33359           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   33360           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   33361             :         }
   33362           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   33363           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   33364             :         }
   33365             : 
   33366           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   33367           0 :                 allow_remaining = true;
   33368             :         }
   33369             : 
   33370           0 :         return py_srvsvc_NetCharDevQGetInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   33371             : }
   33372             : 
   33373           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   33374             : {
   33375           0 :         const struct ndr_interface_call *call = NULL;
   33376           0 :         struct srvsvc_NetCharDevQGetInfo *object = (struct srvsvc_NetCharDevQGetInfo *)pytalloc_get_ptr(py_obj);
   33377             :         PyObject *ret;
   33378             :         char *retstr;
   33379             : 
   33380           0 :         if (ndr_table_srvsvc.num_calls < 5) {
   33381           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQGetInfo_ndr_print");
   33382           0 :                 return NULL;
   33383             :         }
   33384           0 :         call = &ndr_table_srvsvc.calls[4];
   33385             : 
   33386           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   33387           0 :         ret = PyUnicode_FromString(retstr);
   33388           0 :         TALLOC_FREE(retstr);
   33389             : 
   33390           0 :         return ret;
   33391             : }
   33392             : 
   33393           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   33394             : {
   33395           0 :         return py_srvsvc_NetCharDevQGetInfo_ndr_print(py_obj, "srvsvc_NetCharDevQGetInfo_in", NDR_IN);
   33396             : }
   33397             : 
   33398           0 : static PyObject *py_srvsvc_NetCharDevQGetInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   33399             : {
   33400           0 :         return py_srvsvc_NetCharDevQGetInfo_ndr_print(py_obj, "srvsvc_NetCharDevQGetInfo_out", NDR_OUT);
   33401             : }
   33402             : 
   33403             : static PyMethodDef py_srvsvc_NetCharDevQGetInfo_methods[] = {
   33404             :         { "opnum", (PyCFunction)py_srvsvc_NetCharDevQGetInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
   33405             :                 "srvsvc.NetCharDevQGetInfo.opnum() -> 4 (0x04) " },
   33406             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQGetInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   33407             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   33408             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQGetInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   33409             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   33410             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQGetInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   33411             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   33412             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQGetInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   33413             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   33414             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetCharDevQGetInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   33415             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetCharDevQGetInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   33416             :         { NULL, NULL, 0, NULL }
   33417             : };
   33418             : 
   33419             : 
   33420             : static PyTypeObject srvsvc_NetCharDevQGetInfo_Type = {
   33421             :         PyVarObject_HEAD_INIT(NULL, 0)
   33422             :         .tp_name = "srvsvc.NetCharDevQGetInfo",
   33423             :         .tp_getset = py_srvsvc_NetCharDevQGetInfo_getsetters,
   33424             :         .tp_methods = py_srvsvc_NetCharDevQGetInfo_methods,
   33425             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   33426             :         .tp_new = py_srvsvc_NetCharDevQGetInfo_new,
   33427             : };
   33428             : 
   33429           0 : static bool pack_py_srvsvc_NetCharDevQGetInfo_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetCharDevQGetInfo *r)
   33430             : {
   33431             :         PyObject *py_server_unc;
   33432             :         PyObject *py_queue_name;
   33433             :         PyObject *py_user;
   33434             :         PyObject *py_level;
   33435           0 :         const char *kwnames[] = {
   33436             :                 "server_unc", "queue_name", "user", "level", NULL
   33437             :         };
   33438             : 
   33439           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetCharDevQGetInfo", discard_const_p(char *, kwnames), &py_server_unc, &py_queue_name, &py_user, &py_level)) {
   33440           0 :                 return false;
   33441             :         }
   33442             : 
   33443           0 :         if (py_server_unc == NULL) {
   33444           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   33445           0 :                 return false;
   33446             :         }
   33447           0 :         if (py_server_unc == Py_None) {
   33448           0 :                 r->in.server_unc = NULL;
   33449             :         } else {
   33450           0 :                 r->in.server_unc = NULL;
   33451             :                 {
   33452             :                         const char *test_str;
   33453             :                         const char *talloc_str;
   33454           0 :                         PyObject *unicode = NULL;
   33455           0 :                         if (PyUnicode_Check(py_server_unc)) {
   33456           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   33457           0 :                                 if (unicode == NULL) {
   33458           0 :                                         PyErr_NoMemory();
   33459           0 :                                         return false;
   33460             :                                 }
   33461           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   33462           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   33463           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   33464             :                         } else {
   33465           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   33466           0 :                                 return false;
   33467             :                         }
   33468           0 :                         talloc_str = talloc_strdup(r, test_str);
   33469           0 :                         if (unicode != NULL) {
   33470           0 :                                 Py_DECREF(unicode);
   33471             :                         }
   33472           0 :                         if (talloc_str == NULL) {
   33473           0 :                                 PyErr_NoMemory();
   33474           0 :                                 return false;
   33475             :                         }
   33476           0 :                         r->in.server_unc = talloc_str;
   33477             :                 }
   33478             :         }
   33479           0 :         if (py_queue_name == NULL) {
   33480           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.queue_name");
   33481           0 :                 return false;
   33482             :         }
   33483             :         {
   33484             :                 const char *test_str;
   33485             :                 const char *talloc_str;
   33486           0 :                 PyObject *unicode = NULL;
   33487           0 :                 if (PyUnicode_Check(py_queue_name)) {
   33488           0 :                         unicode = PyUnicode_AsEncodedString(py_queue_name, "utf-8", "ignore");
   33489           0 :                         if (unicode == NULL) {
   33490           0 :                                 PyErr_NoMemory();
   33491           0 :                                 return false;
   33492             :                         }
   33493           0 :                         test_str = PyBytes_AS_STRING(unicode);
   33494           0 :                 } else if (PyBytes_Check(py_queue_name)) {
   33495           0 :                         test_str = PyBytes_AS_STRING(py_queue_name);
   33496             :                 } else {
   33497           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_queue_name)->tp_name);
   33498           0 :                         return false;
   33499             :                 }
   33500           0 :                 talloc_str = talloc_strdup(r, test_str);
   33501           0 :                 if (unicode != NULL) {
   33502           0 :                         Py_DECREF(unicode);
   33503             :                 }
   33504           0 :                 if (talloc_str == NULL) {
   33505           0 :                         PyErr_NoMemory();
   33506           0 :                         return false;
   33507             :                 }
   33508           0 :                 r->in.queue_name = talloc_str;
   33509             :         }
   33510           0 :         if (py_user == NULL) {
   33511           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.user");
   33512           0 :                 return false;
   33513             :         }
   33514             :         {
   33515             :                 const char *test_str;
   33516             :                 const char *talloc_str;
   33517           0 :                 PyObject *unicode = NULL;
   33518           0 :                 if (PyUnicode_Check(py_user)) {
   33519           0 :                         unicode = PyUnicode_AsEncodedString(py_user, "utf-8", "ignore");
   33520           0 :                         if (unicode == NULL) {
   33521           0 :                                 PyErr_NoMemory();
   33522           0 :                                 return false;
   33523             :                         }
   33524           0 :                         test_str = PyBytes_AS_STRING(unicode);
   33525           0 :                 } else if (PyBytes_Check(py_user)) {
   33526           0 :                         test_str = PyBytes_AS_STRING(py_user);
   33527             :                 } else {
   33528           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_user)->tp_name);
   33529           0 :                         return false;
   33530             :                 }
   33531           0 :                 talloc_str = talloc_strdup(r, test_str);
   33532           0 :                 if (unicode != NULL) {
   33533           0 :                         Py_DECREF(unicode);
   33534             :                 }
   33535           0 :                 if (talloc_str == NULL) {
   33536           0 :                         PyErr_NoMemory();
   33537           0 :                         return false;
   33538             :                 }
   33539           0 :                 r->in.user = talloc_str;
   33540             :         }
   33541           0 :         if (py_level == NULL) {
   33542           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   33543           0 :                 return false;
   33544             :         }
   33545             :         {
   33546           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   33547           0 :                 if (PyLong_Check(py_level)) {
   33548             :                         unsigned long long test_var;
   33549           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   33550           0 :                         if (PyErr_Occurred() != NULL) {
   33551           0 :                                 return false;
   33552             :                         }
   33553           0 :                         if (test_var > uint_max) {
   33554           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33555             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33556           0 :                                 return false;
   33557             :                         }
   33558           0 :                         r->in.level = test_var;
   33559             :                 } else {
   33560           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   33561             :                           PyLong_Type.tp_name);
   33562           0 :                         return false;
   33563             :                 }
   33564             :         }
   33565           0 :         return true;
   33566             : }
   33567             : 
   33568           0 : static PyObject *unpack_py_srvsvc_NetCharDevQGetInfo_args_out(struct srvsvc_NetCharDevQGetInfo *r)
   33569             : {
   33570             :         PyObject *result;
   33571             :         PyObject *py_info;
   33572           0 :         py_info = pyrpc_import_union(&srvsvc_NetCharDevQInfo_Type, r->out.info, r->in.level, r->out.info, "union srvsvc_NetCharDevQInfo");
   33573           0 :         if (py_info == NULL) {
   33574           0 :                 return NULL;
   33575             :         }
   33576           0 :         result = py_info;
   33577           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   33578           0 :                 PyErr_SetWERROR(r->out.result);
   33579           0 :                 return NULL;
   33580             :         }
   33581             : 
   33582           0 :         return result;
   33583             : }
   33584             : 
   33585             : 
   33586           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_in_get_server_unc(PyObject *obj, void *closure)
   33587             : {
   33588           0 :         struct srvsvc_NetCharDevQSetInfo *object = (struct srvsvc_NetCharDevQSetInfo *)pytalloc_get_ptr(obj);
   33589             :         PyObject *py_server_unc;
   33590           0 :         if (object->in.server_unc == NULL) {
   33591           0 :                 Py_RETURN_NONE;
   33592             :         }
   33593           0 :         if (object->in.server_unc == NULL) {
   33594           0 :                 py_server_unc = Py_None;
   33595           0 :                 Py_INCREF(py_server_unc);
   33596             :         } else {
   33597           0 :                 if (object->in.server_unc == NULL) {
   33598           0 :                         py_server_unc = Py_None;
   33599           0 :                         Py_INCREF(py_server_unc);
   33600             :                 } else {
   33601           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   33602             :                 }
   33603             :         }
   33604           0 :         return py_server_unc;
   33605             : }
   33606             : 
   33607           0 : static int py_srvsvc_NetCharDevQSetInfo_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   33608             : {
   33609           0 :         struct srvsvc_NetCharDevQSetInfo *object = (struct srvsvc_NetCharDevQSetInfo *)pytalloc_get_ptr(py_obj);
   33610           0 :         if (value == NULL) {
   33611           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   33612           0 :                 return -1;
   33613             :         }
   33614           0 :         if (value == Py_None) {
   33615           0 :                 object->in.server_unc = NULL;
   33616             :         } else {
   33617           0 :                 object->in.server_unc = NULL;
   33618             :                 {
   33619             :                         const char *test_str;
   33620             :                         const char *talloc_str;
   33621           0 :                         PyObject *unicode = NULL;
   33622           0 :                         if (PyUnicode_Check(value)) {
   33623           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   33624           0 :                                 if (unicode == NULL) {
   33625           0 :                                         PyErr_NoMemory();
   33626           0 :                                         return -1;
   33627             :                                 }
   33628           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   33629           0 :                         } else if (PyBytes_Check(value)) {
   33630           0 :                                 test_str = PyBytes_AS_STRING(value);
   33631             :                         } else {
   33632           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   33633           0 :                                 return -1;
   33634             :                         }
   33635           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   33636           0 :                         if (unicode != NULL) {
   33637           0 :                                 Py_DECREF(unicode);
   33638             :                         }
   33639           0 :                         if (talloc_str == NULL) {
   33640           0 :                                 PyErr_NoMemory();
   33641           0 :                                 return -1;
   33642             :                         }
   33643           0 :                         object->in.server_unc = talloc_str;
   33644             :                 }
   33645             :         }
   33646           0 :         return 0;
   33647             : }
   33648             : 
   33649           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_in_get_queue_name(PyObject *obj, void *closure)
   33650             : {
   33651           0 :         struct srvsvc_NetCharDevQSetInfo *object = (struct srvsvc_NetCharDevQSetInfo *)pytalloc_get_ptr(obj);
   33652             :         PyObject *py_queue_name;
   33653           0 :         if (object->in.queue_name == NULL) {
   33654           0 :                 py_queue_name = Py_None;
   33655           0 :                 Py_INCREF(py_queue_name);
   33656             :         } else {
   33657           0 :                 py_queue_name = PyUnicode_Decode(object->in.queue_name, strlen(object->in.queue_name), "utf-8", "ignore");
   33658             :         }
   33659           0 :         return py_queue_name;
   33660             : }
   33661             : 
   33662           0 : static int py_srvsvc_NetCharDevQSetInfo_in_set_queue_name(PyObject *py_obj, PyObject *value, void *closure)
   33663             : {
   33664           0 :         struct srvsvc_NetCharDevQSetInfo *object = (struct srvsvc_NetCharDevQSetInfo *)pytalloc_get_ptr(py_obj);
   33665           0 :         if (value == NULL) {
   33666           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.queue_name");
   33667           0 :                 return -1;
   33668             :         }
   33669             :         {
   33670             :                 const char *test_str;
   33671             :                 const char *talloc_str;
   33672           0 :                 PyObject *unicode = NULL;
   33673           0 :                 if (PyUnicode_Check(value)) {
   33674           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   33675           0 :                         if (unicode == NULL) {
   33676           0 :                                 PyErr_NoMemory();
   33677           0 :                                 return -1;
   33678             :                         }
   33679           0 :                         test_str = PyBytes_AS_STRING(unicode);
   33680           0 :                 } else if (PyBytes_Check(value)) {
   33681           0 :                         test_str = PyBytes_AS_STRING(value);
   33682             :                 } else {
   33683           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   33684           0 :                         return -1;
   33685             :                 }
   33686           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   33687           0 :                 if (unicode != NULL) {
   33688           0 :                         Py_DECREF(unicode);
   33689             :                 }
   33690           0 :                 if (talloc_str == NULL) {
   33691           0 :                         PyErr_NoMemory();
   33692           0 :                         return -1;
   33693             :                 }
   33694           0 :                 object->in.queue_name = talloc_str;
   33695             :         }
   33696           0 :         return 0;
   33697             : }
   33698             : 
   33699           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_in_get_level(PyObject *obj, void *closure)
   33700             : {
   33701           0 :         struct srvsvc_NetCharDevQSetInfo *object = (struct srvsvc_NetCharDevQSetInfo *)pytalloc_get_ptr(obj);
   33702             :         PyObject *py_level;
   33703           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   33704           0 :         return py_level;
   33705             : }
   33706             : 
   33707           0 : static int py_srvsvc_NetCharDevQSetInfo_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   33708             : {
   33709           0 :         struct srvsvc_NetCharDevQSetInfo *object = (struct srvsvc_NetCharDevQSetInfo *)pytalloc_get_ptr(py_obj);
   33710           0 :         if (value == NULL) {
   33711           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   33712           0 :                 return -1;
   33713             :         }
   33714             :         {
   33715           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   33716           0 :                 if (PyLong_Check(value)) {
   33717             :                         unsigned long long test_var;
   33718           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   33719           0 :                         if (PyErr_Occurred() != NULL) {
   33720           0 :                                 return -1;
   33721             :                         }
   33722           0 :                         if (test_var > uint_max) {
   33723           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33724             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33725           0 :                                 return -1;
   33726             :                         }
   33727           0 :                         object->in.level = test_var;
   33728             :                 } else {
   33729           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   33730             :                           PyLong_Type.tp_name);
   33731           0 :                         return -1;
   33732             :                 }
   33733             :         }
   33734           0 :         return 0;
   33735             : }
   33736             : 
   33737           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_in_get_info(PyObject *obj, void *closure)
   33738             : {
   33739           0 :         struct srvsvc_NetCharDevQSetInfo *object = (struct srvsvc_NetCharDevQSetInfo *)pytalloc_get_ptr(obj);
   33740             :         PyObject *py_info;
   33741           0 :         py_info = pyrpc_import_union(&srvsvc_NetCharDevQInfo_Type, pytalloc_get_mem_ctx(obj), object->in.level, &object->in.info, "union srvsvc_NetCharDevQInfo");
   33742           0 :         if (py_info == NULL) {
   33743           0 :                 return NULL;
   33744             :         }
   33745           0 :         return py_info;
   33746             : }
   33747             : 
   33748           0 : static int py_srvsvc_NetCharDevQSetInfo_in_set_info(PyObject *py_obj, PyObject *value, void *closure)
   33749             : {
   33750           0 :         struct srvsvc_NetCharDevQSetInfo *object = (struct srvsvc_NetCharDevQSetInfo *)pytalloc_get_ptr(py_obj);
   33751           0 :         if (value == NULL) {
   33752           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.info");
   33753           0 :                 return -1;
   33754             :         }
   33755             :         {
   33756             :                 union srvsvc_NetCharDevQInfo *info_switch_0;
   33757           0 :                 info_switch_0 = (union srvsvc_NetCharDevQInfo *)pyrpc_export_union(&srvsvc_NetCharDevQInfo_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union srvsvc_NetCharDevQInfo");
   33758           0 :                 if (info_switch_0 == NULL) {
   33759           0 :                         return -1;
   33760             :                 }
   33761           0 :                 object->in.info = *info_switch_0;
   33762             :         }
   33763           0 :         return 0;
   33764             : }
   33765             : 
   33766           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_in_get_parm_error(PyObject *obj, void *closure)
   33767             : {
   33768           0 :         struct srvsvc_NetCharDevQSetInfo *object = (struct srvsvc_NetCharDevQSetInfo *)pytalloc_get_ptr(obj);
   33769             :         PyObject *py_parm_error;
   33770           0 :         if (object->in.parm_error == NULL) {
   33771           0 :                 Py_RETURN_NONE;
   33772             :         }
   33773           0 :         if (object->in.parm_error == NULL) {
   33774           0 :                 py_parm_error = Py_None;
   33775           0 :                 Py_INCREF(py_parm_error);
   33776             :         } else {
   33777           0 :                 py_parm_error = PyLong_FromUnsignedLongLong((uint32_t)*object->in.parm_error);
   33778             :         }
   33779           0 :         return py_parm_error;
   33780             : }
   33781             : 
   33782           0 : static int py_srvsvc_NetCharDevQSetInfo_in_set_parm_error(PyObject *py_obj, PyObject *value, void *closure)
   33783             : {
   33784           0 :         struct srvsvc_NetCharDevQSetInfo *object = (struct srvsvc_NetCharDevQSetInfo *)pytalloc_get_ptr(py_obj);
   33785           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.parm_error));
   33786           0 :         if (value == NULL) {
   33787           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.parm_error");
   33788           0 :                 return -1;
   33789             :         }
   33790           0 :         if (value == Py_None) {
   33791           0 :                 object->in.parm_error = NULL;
   33792             :         } else {
   33793           0 :                 object->in.parm_error = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.parm_error);
   33794           0 :                 if (object->in.parm_error == NULL) {
   33795           0 :                         PyErr_NoMemory();
   33796           0 :                         return -1;
   33797             :                 }
   33798             :                 {
   33799           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.parm_error));
   33800           0 :                         if (PyLong_Check(value)) {
   33801             :                                 unsigned long long test_var;
   33802           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   33803           0 :                                 if (PyErr_Occurred() != NULL) {
   33804           0 :                                         return -1;
   33805             :                                 }
   33806           0 :                                 if (test_var > uint_max) {
   33807           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33808             :                                           PyLong_Type.tp_name, uint_max, test_var);
   33809           0 :                                         return -1;
   33810             :                                 }
   33811           0 :                                 *object->in.parm_error = test_var;
   33812             :                         } else {
   33813           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   33814             :                                   PyLong_Type.tp_name);
   33815           0 :                                 return -1;
   33816             :                         }
   33817             :                 }
   33818             :         }
   33819           0 :         return 0;
   33820             : }
   33821             : 
   33822           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_out_get_parm_error(PyObject *obj, void *closure)
   33823             : {
   33824           0 :         struct srvsvc_NetCharDevQSetInfo *object = (struct srvsvc_NetCharDevQSetInfo *)pytalloc_get_ptr(obj);
   33825             :         PyObject *py_parm_error;
   33826           0 :         if (object->out.parm_error == NULL) {
   33827           0 :                 Py_RETURN_NONE;
   33828             :         }
   33829           0 :         if (object->out.parm_error == NULL) {
   33830           0 :                 py_parm_error = Py_None;
   33831           0 :                 Py_INCREF(py_parm_error);
   33832             :         } else {
   33833           0 :                 py_parm_error = PyLong_FromUnsignedLongLong((uint32_t)*object->out.parm_error);
   33834             :         }
   33835           0 :         return py_parm_error;
   33836             : }
   33837             : 
   33838           0 : static int py_srvsvc_NetCharDevQSetInfo_out_set_parm_error(PyObject *py_obj, PyObject *value, void *closure)
   33839             : {
   33840           0 :         struct srvsvc_NetCharDevQSetInfo *object = (struct srvsvc_NetCharDevQSetInfo *)pytalloc_get_ptr(py_obj);
   33841           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.parm_error));
   33842           0 :         if (value == NULL) {
   33843           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.parm_error");
   33844           0 :                 return -1;
   33845             :         }
   33846           0 :         if (value == Py_None) {
   33847           0 :                 object->out.parm_error = NULL;
   33848             :         } else {
   33849           0 :                 object->out.parm_error = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.parm_error);
   33850           0 :                 if (object->out.parm_error == NULL) {
   33851           0 :                         PyErr_NoMemory();
   33852           0 :                         return -1;
   33853             :                 }
   33854             :                 {
   33855           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.parm_error));
   33856           0 :                         if (PyLong_Check(value)) {
   33857             :                                 unsigned long long test_var;
   33858           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   33859           0 :                                 if (PyErr_Occurred() != NULL) {
   33860           0 :                                         return -1;
   33861             :                                 }
   33862           0 :                                 if (test_var > uint_max) {
   33863           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33864             :                                           PyLong_Type.tp_name, uint_max, test_var);
   33865           0 :                                         return -1;
   33866             :                                 }
   33867           0 :                                 *object->out.parm_error = test_var;
   33868             :                         } else {
   33869           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   33870             :                                   PyLong_Type.tp_name);
   33871           0 :                                 return -1;
   33872             :                         }
   33873             :                 }
   33874             :         }
   33875           0 :         return 0;
   33876             : }
   33877             : 
   33878           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_get_result(PyObject *obj, void *closure)
   33879             : {
   33880           0 :         struct srvsvc_NetCharDevQSetInfo *object = (struct srvsvc_NetCharDevQSetInfo *)pytalloc_get_ptr(obj);
   33881             :         PyObject *py_result;
   33882           0 :         py_result = PyErr_FromWERROR(object->out.result);
   33883           0 :         return py_result;
   33884             : }
   33885             : 
   33886           0 : static int py_srvsvc_NetCharDevQSetInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
   33887             : {
   33888           0 :         struct srvsvc_NetCharDevQSetInfo *object = (struct srvsvc_NetCharDevQSetInfo *)pytalloc_get_ptr(py_obj);
   33889           0 :         if (value == NULL) {
   33890           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   33891           0 :                 return -1;
   33892             :         }
   33893           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   33894           0 :         return 0;
   33895             : }
   33896             : 
   33897             : static PyGetSetDef py_srvsvc_NetCharDevQSetInfo_getsetters[] = {
   33898             :         {
   33899             :                 .name = discard_const_p(char, "in_server_unc"),
   33900             :                 .get = py_srvsvc_NetCharDevQSetInfo_in_get_server_unc,
   33901             :                 .set = py_srvsvc_NetCharDevQSetInfo_in_set_server_unc,
   33902             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   33903             :         },
   33904             :         {
   33905             :                 .name = discard_const_p(char, "in_queue_name"),
   33906             :                 .get = py_srvsvc_NetCharDevQSetInfo_in_get_queue_name,
   33907             :                 .set = py_srvsvc_NetCharDevQSetInfo_in_set_queue_name,
   33908             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   33909             :         },
   33910             :         {
   33911             :                 .name = discard_const_p(char, "in_level"),
   33912             :                 .get = py_srvsvc_NetCharDevQSetInfo_in_get_level,
   33913             :                 .set = py_srvsvc_NetCharDevQSetInfo_in_set_level,
   33914             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   33915             :         },
   33916             :         {
   33917             :                 .name = discard_const_p(char, "in_info"),
   33918             :                 .get = py_srvsvc_NetCharDevQSetInfo_in_get_info,
   33919             :                 .set = py_srvsvc_NetCharDevQSetInfo_in_set_info,
   33920             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetCharDevQInfo")
   33921             :         },
   33922             :         {
   33923             :                 .name = discard_const_p(char, "in_parm_error"),
   33924             :                 .get = py_srvsvc_NetCharDevQSetInfo_in_get_parm_error,
   33925             :                 .set = py_srvsvc_NetCharDevQSetInfo_in_set_parm_error,
   33926             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   33927             :         },
   33928             :         {
   33929             :                 .name = discard_const_p(char, "out_parm_error"),
   33930             :                 .get = py_srvsvc_NetCharDevQSetInfo_out_get_parm_error,
   33931             :                 .set = py_srvsvc_NetCharDevQSetInfo_out_set_parm_error,
   33932             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   33933             :         },
   33934             :         {
   33935             :                 .name = discard_const_p(char, "result"),
   33936             :                 .get = py_srvsvc_NetCharDevQSetInfo_get_result,
   33937             :                 .set = py_srvsvc_NetCharDevQSetInfo_set_result,
   33938             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   33939             :         },
   33940             :         { .name = NULL }
   33941             : };
   33942             : 
   33943           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   33944             : {
   33945           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetCharDevQSetInfo, type);
   33946           0 :         return self;
   33947             : }
   33948             : 
   33949           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   33950             : {
   33951             : 
   33952             : 
   33953           0 :         return PyLong_FromLong(5);
   33954             : }
   33955             : 
   33956           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   33957             : {
   33958           0 :         const struct ndr_interface_call *call = NULL;
   33959           0 :         struct srvsvc_NetCharDevQSetInfo *object = (struct srvsvc_NetCharDevQSetInfo *)pytalloc_get_ptr(py_obj);
   33960           0 :         PyObject *ret = NULL;
   33961           0 :         struct ndr_push *push = NULL;
   33962             :         DATA_BLOB blob;
   33963             :         enum ndr_err_code err;
   33964             : 
   33965           0 :         if (ndr_table_srvsvc.num_calls < 6) {
   33966           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQSetInfo_ndr_pack");
   33967           0 :                 return NULL;
   33968             :         }
   33969           0 :         call = &ndr_table_srvsvc.calls[5];
   33970             : 
   33971           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   33972           0 :         if (push == NULL) {
   33973           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   33974           0 :                 return NULL;
   33975             :         }
   33976             : 
   33977           0 :         push->flags |= ndr_push_flags;
   33978             : 
   33979           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   33980           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   33981           0 :                 TALLOC_FREE(push);
   33982           0 :                 PyErr_SetNdrError(err);
   33983           0 :                 return NULL;
   33984             :         }
   33985           0 :         blob = ndr_push_blob(push);
   33986           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   33987           0 :         TALLOC_FREE(push);
   33988           0 :         return ret;
   33989             : }
   33990             : 
   33991           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   33992             : {
   33993           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   33994           0 :         PyObject *bigendian_obj = NULL;
   33995           0 :         PyObject *ndr64_obj = NULL;
   33996           0 :         uint32_t ndr_push_flags = 0;
   33997             : 
   33998           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   33999             :                 discard_const_p(char *, kwnames),
   34000             :                 &bigendian_obj,
   34001             :                 &ndr64_obj)) {
   34002           0 :                 return NULL;
   34003             :         }
   34004             : 
   34005           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34006           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   34007             :         }
   34008           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34009           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   34010             :         }
   34011             : 
   34012           0 :         return py_srvsvc_NetCharDevQSetInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   34013             : }
   34014             : 
   34015           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34016             : {
   34017           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   34018           0 :         PyObject *bigendian_obj = NULL;
   34019           0 :         PyObject *ndr64_obj = NULL;
   34020           0 :         uint32_t ndr_push_flags = 0;
   34021             : 
   34022           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   34023             :                 discard_const_p(char *, kwnames),
   34024             :                 &bigendian_obj,
   34025             :                 &ndr64_obj)) {
   34026           0 :                 return NULL;
   34027             :         }
   34028             : 
   34029           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34030           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   34031             :         }
   34032           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34033           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   34034             :         }
   34035             : 
   34036           0 :         return py_srvsvc_NetCharDevQSetInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   34037             : }
   34038             : 
   34039           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   34040             : {
   34041           0 :         const struct ndr_interface_call *call = NULL;
   34042           0 :         struct srvsvc_NetCharDevQSetInfo *object = (struct srvsvc_NetCharDevQSetInfo *)pytalloc_get_ptr(py_obj);
   34043           0 :         struct ndr_pull *pull = NULL;
   34044             :         enum ndr_err_code err;
   34045             : 
   34046           0 :         if (ndr_table_srvsvc.num_calls < 6) {
   34047           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQSetInfo_ndr_unpack");
   34048           0 :                 return NULL;
   34049             :         }
   34050           0 :         call = &ndr_table_srvsvc.calls[5];
   34051             : 
   34052           0 :         pull = ndr_pull_init_blob(blob, object);
   34053           0 :         if (pull == NULL) {
   34054           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   34055           0 :                 return NULL;
   34056             :         }
   34057             : 
   34058           0 :         pull->flags |= ndr_pull_flags;
   34059             : 
   34060           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   34061           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   34062           0 :                 TALLOC_FREE(pull);
   34063           0 :                 PyErr_SetNdrError(err);
   34064           0 :                 return NULL;
   34065             :         }
   34066           0 :         if (!allow_remaining) {
   34067             :                 uint32_t highest_ofs;
   34068             : 
   34069           0 :                 if (pull->offset > pull->relative_highest_offset) {
   34070           0 :                         highest_ofs = pull->offset;
   34071             :                 } else {
   34072           0 :                         highest_ofs = pull->relative_highest_offset;
   34073             :                 }
   34074           0 :                 if (highest_ofs < pull->data_size) {
   34075           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   34076             :                                 "not all bytes consumed ofs[%u] size[%u]",
   34077             :                                 highest_ofs, pull->data_size);
   34078           0 :                         TALLOC_FREE(pull);
   34079           0 :                         PyErr_SetNdrError(err);
   34080           0 :                         return NULL;
   34081             :                 }
   34082             :         }
   34083             : 
   34084           0 :         TALLOC_FREE(pull);
   34085           0 :         Py_RETURN_NONE;
   34086             : }
   34087             : 
   34088           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34089             : {
   34090             :         DATA_BLOB blob;
   34091           0 :         Py_ssize_t blob_length = 0;
   34092           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   34093           0 :         PyObject *bigendian_obj = NULL;
   34094           0 :         PyObject *ndr64_obj = NULL;
   34095           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   34096           0 :         PyObject *allow_remaining_obj = NULL;
   34097           0 :         bool allow_remaining = false;
   34098             : 
   34099           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   34100             :                 discard_const_p(char *, kwnames),
   34101             :                 &blob.data, &blob_length,
   34102             :                 &bigendian_obj,
   34103             :                 &ndr64_obj,
   34104             :                 &allow_remaining_obj)) {
   34105           0 :                 return NULL;
   34106             :         }
   34107           0 :         blob.length = blob_length;
   34108             : 
   34109           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34110           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   34111             :         }
   34112           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34113           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   34114             :         }
   34115             : 
   34116           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   34117           0 :                 allow_remaining = true;
   34118             :         }
   34119             : 
   34120           0 :         return py_srvsvc_NetCharDevQSetInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   34121             : }
   34122             : 
   34123           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34124             : {
   34125             :         DATA_BLOB blob;
   34126           0 :         Py_ssize_t blob_length = 0;
   34127           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   34128           0 :         PyObject *bigendian_obj = NULL;
   34129           0 :         PyObject *ndr64_obj = NULL;
   34130           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   34131           0 :         PyObject *allow_remaining_obj = NULL;
   34132           0 :         bool allow_remaining = false;
   34133             : 
   34134           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   34135             :                 discard_const_p(char *, kwnames),
   34136             :                 &blob.data, &blob_length,
   34137             :                 &bigendian_obj,
   34138             :                 &ndr64_obj,
   34139             :                 &allow_remaining_obj)) {
   34140           0 :                 return NULL;
   34141             :         }
   34142           0 :         blob.length = blob_length;
   34143             : 
   34144           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34145           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   34146             :         }
   34147           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34148           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   34149             :         }
   34150             : 
   34151           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   34152           0 :                 allow_remaining = true;
   34153             :         }
   34154             : 
   34155           0 :         return py_srvsvc_NetCharDevQSetInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   34156             : }
   34157             : 
   34158           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   34159             : {
   34160           0 :         const struct ndr_interface_call *call = NULL;
   34161           0 :         struct srvsvc_NetCharDevQSetInfo *object = (struct srvsvc_NetCharDevQSetInfo *)pytalloc_get_ptr(py_obj);
   34162             :         PyObject *ret;
   34163             :         char *retstr;
   34164             : 
   34165           0 :         if (ndr_table_srvsvc.num_calls < 6) {
   34166           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQSetInfo_ndr_print");
   34167           0 :                 return NULL;
   34168             :         }
   34169           0 :         call = &ndr_table_srvsvc.calls[5];
   34170             : 
   34171           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   34172           0 :         ret = PyUnicode_FromString(retstr);
   34173           0 :         TALLOC_FREE(retstr);
   34174             : 
   34175           0 :         return ret;
   34176             : }
   34177             : 
   34178           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   34179             : {
   34180           0 :         return py_srvsvc_NetCharDevQSetInfo_ndr_print(py_obj, "srvsvc_NetCharDevQSetInfo_in", NDR_IN);
   34181             : }
   34182             : 
   34183           0 : static PyObject *py_srvsvc_NetCharDevQSetInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   34184             : {
   34185           0 :         return py_srvsvc_NetCharDevQSetInfo_ndr_print(py_obj, "srvsvc_NetCharDevQSetInfo_out", NDR_OUT);
   34186             : }
   34187             : 
   34188             : static PyMethodDef py_srvsvc_NetCharDevQSetInfo_methods[] = {
   34189             :         { "opnum", (PyCFunction)py_srvsvc_NetCharDevQSetInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
   34190             :                 "srvsvc.NetCharDevQSetInfo.opnum() -> 5 (0x05) " },
   34191             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQSetInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   34192             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   34193             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQSetInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   34194             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   34195             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQSetInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   34196             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   34197             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQSetInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   34198             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   34199             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetCharDevQSetInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   34200             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetCharDevQSetInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   34201             :         { NULL, NULL, 0, NULL }
   34202             : };
   34203             : 
   34204             : 
   34205             : static PyTypeObject srvsvc_NetCharDevQSetInfo_Type = {
   34206             :         PyVarObject_HEAD_INIT(NULL, 0)
   34207             :         .tp_name = "srvsvc.NetCharDevQSetInfo",
   34208             :         .tp_getset = py_srvsvc_NetCharDevQSetInfo_getsetters,
   34209             :         .tp_methods = py_srvsvc_NetCharDevQSetInfo_methods,
   34210             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   34211             :         .tp_new = py_srvsvc_NetCharDevQSetInfo_new,
   34212             : };
   34213             : 
   34214           0 : static bool pack_py_srvsvc_NetCharDevQSetInfo_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetCharDevQSetInfo *r)
   34215             : {
   34216             :         PyObject *py_server_unc;
   34217             :         PyObject *py_queue_name;
   34218             :         PyObject *py_level;
   34219             :         PyObject *py_info;
   34220             :         PyObject *py_parm_error;
   34221           0 :         const char *kwnames[] = {
   34222             :                 "server_unc", "queue_name", "level", "info", "parm_error", NULL
   34223             :         };
   34224             : 
   34225           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:srvsvc_NetCharDevQSetInfo", discard_const_p(char *, kwnames), &py_server_unc, &py_queue_name, &py_level, &py_info, &py_parm_error)) {
   34226           0 :                 return false;
   34227             :         }
   34228             : 
   34229           0 :         if (py_server_unc == NULL) {
   34230           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   34231           0 :                 return false;
   34232             :         }
   34233           0 :         if (py_server_unc == Py_None) {
   34234           0 :                 r->in.server_unc = NULL;
   34235             :         } else {
   34236           0 :                 r->in.server_unc = NULL;
   34237             :                 {
   34238             :                         const char *test_str;
   34239             :                         const char *talloc_str;
   34240           0 :                         PyObject *unicode = NULL;
   34241           0 :                         if (PyUnicode_Check(py_server_unc)) {
   34242           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   34243           0 :                                 if (unicode == NULL) {
   34244           0 :                                         PyErr_NoMemory();
   34245           0 :                                         return false;
   34246             :                                 }
   34247           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   34248           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   34249           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   34250             :                         } else {
   34251           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   34252           0 :                                 return false;
   34253             :                         }
   34254           0 :                         talloc_str = talloc_strdup(r, test_str);
   34255           0 :                         if (unicode != NULL) {
   34256           0 :                                 Py_DECREF(unicode);
   34257             :                         }
   34258           0 :                         if (talloc_str == NULL) {
   34259           0 :                                 PyErr_NoMemory();
   34260           0 :                                 return false;
   34261             :                         }
   34262           0 :                         r->in.server_unc = talloc_str;
   34263             :                 }
   34264             :         }
   34265           0 :         if (py_queue_name == NULL) {
   34266           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.queue_name");
   34267           0 :                 return false;
   34268             :         }
   34269             :         {
   34270             :                 const char *test_str;
   34271             :                 const char *talloc_str;
   34272           0 :                 PyObject *unicode = NULL;
   34273           0 :                 if (PyUnicode_Check(py_queue_name)) {
   34274           0 :                         unicode = PyUnicode_AsEncodedString(py_queue_name, "utf-8", "ignore");
   34275           0 :                         if (unicode == NULL) {
   34276           0 :                                 PyErr_NoMemory();
   34277           0 :                                 return false;
   34278             :                         }
   34279           0 :                         test_str = PyBytes_AS_STRING(unicode);
   34280           0 :                 } else if (PyBytes_Check(py_queue_name)) {
   34281           0 :                         test_str = PyBytes_AS_STRING(py_queue_name);
   34282             :                 } else {
   34283           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_queue_name)->tp_name);
   34284           0 :                         return false;
   34285             :                 }
   34286           0 :                 talloc_str = talloc_strdup(r, test_str);
   34287           0 :                 if (unicode != NULL) {
   34288           0 :                         Py_DECREF(unicode);
   34289             :                 }
   34290           0 :                 if (talloc_str == NULL) {
   34291           0 :                         PyErr_NoMemory();
   34292           0 :                         return false;
   34293             :                 }
   34294           0 :                 r->in.queue_name = talloc_str;
   34295             :         }
   34296           0 :         if (py_level == NULL) {
   34297           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   34298           0 :                 return false;
   34299             :         }
   34300             :         {
   34301           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   34302           0 :                 if (PyLong_Check(py_level)) {
   34303             :                         unsigned long long test_var;
   34304           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   34305           0 :                         if (PyErr_Occurred() != NULL) {
   34306           0 :                                 return false;
   34307             :                         }
   34308           0 :                         if (test_var > uint_max) {
   34309           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   34310             :                                   PyLong_Type.tp_name, uint_max, test_var);
   34311           0 :                                 return false;
   34312             :                         }
   34313           0 :                         r->in.level = test_var;
   34314             :                 } else {
   34315           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   34316             :                           PyLong_Type.tp_name);
   34317           0 :                         return false;
   34318             :                 }
   34319             :         }
   34320           0 :         if (py_info == NULL) {
   34321           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info");
   34322           0 :                 return false;
   34323             :         }
   34324             :         {
   34325             :                 union srvsvc_NetCharDevQInfo *info_switch_0;
   34326           0 :                 info_switch_0 = (union srvsvc_NetCharDevQInfo *)pyrpc_export_union(&srvsvc_NetCharDevQInfo_Type, r, r->in.level, py_info, "union srvsvc_NetCharDevQInfo");
   34327           0 :                 if (info_switch_0 == NULL) {
   34328           0 :                         return false;
   34329             :                 }
   34330           0 :                 r->in.info = *info_switch_0;
   34331             :         }
   34332           0 :         if (py_parm_error == NULL) {
   34333           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.parm_error");
   34334           0 :                 return false;
   34335             :         }
   34336           0 :         if (py_parm_error == Py_None) {
   34337           0 :                 r->in.parm_error = NULL;
   34338             :         } else {
   34339           0 :                 r->in.parm_error = talloc_ptrtype(r, r->in.parm_error);
   34340           0 :                 if (r->in.parm_error == NULL) {
   34341           0 :                         PyErr_NoMemory();
   34342           0 :                         return false;
   34343             :                 }
   34344             :                 {
   34345           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.parm_error));
   34346           0 :                         if (PyLong_Check(py_parm_error)) {
   34347             :                                 unsigned long long test_var;
   34348           0 :                                 test_var = PyLong_AsUnsignedLongLong(py_parm_error);
   34349           0 :                                 if (PyErr_Occurred() != NULL) {
   34350           0 :                                         return false;
   34351             :                                 }
   34352           0 :                                 if (test_var > uint_max) {
   34353           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   34354             :                                           PyLong_Type.tp_name, uint_max, test_var);
   34355           0 :                                         return false;
   34356             :                                 }
   34357           0 :                                 *r->in.parm_error = test_var;
   34358             :                         } else {
   34359           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   34360             :                                   PyLong_Type.tp_name);
   34361           0 :                                 return false;
   34362             :                         }
   34363             :                 }
   34364             :         }
   34365           0 :         return true;
   34366             : }
   34367             : 
   34368           0 : static PyObject *unpack_py_srvsvc_NetCharDevQSetInfo_args_out(struct srvsvc_NetCharDevQSetInfo *r)
   34369             : {
   34370             :         PyObject *result;
   34371             :         PyObject *py_parm_error;
   34372           0 :         if (r->out.parm_error == NULL) {
   34373           0 :                 py_parm_error = Py_None;
   34374           0 :                 Py_INCREF(py_parm_error);
   34375             :         } else {
   34376           0 :                 py_parm_error = PyLong_FromUnsignedLongLong((uint32_t)*r->out.parm_error);
   34377             :         }
   34378           0 :         result = py_parm_error;
   34379           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   34380           0 :                 PyErr_SetWERROR(r->out.result);
   34381           0 :                 return NULL;
   34382             :         }
   34383             : 
   34384           0 :         return result;
   34385             : }
   34386             : 
   34387             : 
   34388           0 : static PyObject *py_srvsvc_NetCharDevQPurge_in_get_server_unc(PyObject *obj, void *closure)
   34389             : {
   34390           0 :         struct srvsvc_NetCharDevQPurge *object = (struct srvsvc_NetCharDevQPurge *)pytalloc_get_ptr(obj);
   34391             :         PyObject *py_server_unc;
   34392           0 :         if (object->in.server_unc == NULL) {
   34393           0 :                 Py_RETURN_NONE;
   34394             :         }
   34395           0 :         if (object->in.server_unc == NULL) {
   34396           0 :                 py_server_unc = Py_None;
   34397           0 :                 Py_INCREF(py_server_unc);
   34398             :         } else {
   34399           0 :                 if (object->in.server_unc == NULL) {
   34400           0 :                         py_server_unc = Py_None;
   34401           0 :                         Py_INCREF(py_server_unc);
   34402             :                 } else {
   34403           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   34404             :                 }
   34405             :         }
   34406           0 :         return py_server_unc;
   34407             : }
   34408             : 
   34409           0 : static int py_srvsvc_NetCharDevQPurge_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   34410             : {
   34411           0 :         struct srvsvc_NetCharDevQPurge *object = (struct srvsvc_NetCharDevQPurge *)pytalloc_get_ptr(py_obj);
   34412           0 :         if (value == NULL) {
   34413           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   34414           0 :                 return -1;
   34415             :         }
   34416           0 :         if (value == Py_None) {
   34417           0 :                 object->in.server_unc = NULL;
   34418             :         } else {
   34419           0 :                 object->in.server_unc = NULL;
   34420             :                 {
   34421             :                         const char *test_str;
   34422             :                         const char *talloc_str;
   34423           0 :                         PyObject *unicode = NULL;
   34424           0 :                         if (PyUnicode_Check(value)) {
   34425           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   34426           0 :                                 if (unicode == NULL) {
   34427           0 :                                         PyErr_NoMemory();
   34428           0 :                                         return -1;
   34429             :                                 }
   34430           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   34431           0 :                         } else if (PyBytes_Check(value)) {
   34432           0 :                                 test_str = PyBytes_AS_STRING(value);
   34433             :                         } else {
   34434           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   34435           0 :                                 return -1;
   34436             :                         }
   34437           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   34438           0 :                         if (unicode != NULL) {
   34439           0 :                                 Py_DECREF(unicode);
   34440             :                         }
   34441           0 :                         if (talloc_str == NULL) {
   34442           0 :                                 PyErr_NoMemory();
   34443           0 :                                 return -1;
   34444             :                         }
   34445           0 :                         object->in.server_unc = talloc_str;
   34446             :                 }
   34447             :         }
   34448           0 :         return 0;
   34449             : }
   34450             : 
   34451           0 : static PyObject *py_srvsvc_NetCharDevQPurge_in_get_queue_name(PyObject *obj, void *closure)
   34452             : {
   34453           0 :         struct srvsvc_NetCharDevQPurge *object = (struct srvsvc_NetCharDevQPurge *)pytalloc_get_ptr(obj);
   34454             :         PyObject *py_queue_name;
   34455           0 :         if (object->in.queue_name == NULL) {
   34456           0 :                 py_queue_name = Py_None;
   34457           0 :                 Py_INCREF(py_queue_name);
   34458             :         } else {
   34459           0 :                 py_queue_name = PyUnicode_Decode(object->in.queue_name, strlen(object->in.queue_name), "utf-8", "ignore");
   34460             :         }
   34461           0 :         return py_queue_name;
   34462             : }
   34463             : 
   34464           0 : static int py_srvsvc_NetCharDevQPurge_in_set_queue_name(PyObject *py_obj, PyObject *value, void *closure)
   34465             : {
   34466           0 :         struct srvsvc_NetCharDevQPurge *object = (struct srvsvc_NetCharDevQPurge *)pytalloc_get_ptr(py_obj);
   34467           0 :         if (value == NULL) {
   34468           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.queue_name");
   34469           0 :                 return -1;
   34470             :         }
   34471             :         {
   34472             :                 const char *test_str;
   34473             :                 const char *talloc_str;
   34474           0 :                 PyObject *unicode = NULL;
   34475           0 :                 if (PyUnicode_Check(value)) {
   34476           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   34477           0 :                         if (unicode == NULL) {
   34478           0 :                                 PyErr_NoMemory();
   34479           0 :                                 return -1;
   34480             :                         }
   34481           0 :                         test_str = PyBytes_AS_STRING(unicode);
   34482           0 :                 } else if (PyBytes_Check(value)) {
   34483           0 :                         test_str = PyBytes_AS_STRING(value);
   34484             :                 } else {
   34485           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   34486           0 :                         return -1;
   34487             :                 }
   34488           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   34489           0 :                 if (unicode != NULL) {
   34490           0 :                         Py_DECREF(unicode);
   34491             :                 }
   34492           0 :                 if (talloc_str == NULL) {
   34493           0 :                         PyErr_NoMemory();
   34494           0 :                         return -1;
   34495             :                 }
   34496           0 :                 object->in.queue_name = talloc_str;
   34497             :         }
   34498           0 :         return 0;
   34499             : }
   34500             : 
   34501           0 : static PyObject *py_srvsvc_NetCharDevQPurge_get_result(PyObject *obj, void *closure)
   34502             : {
   34503           0 :         struct srvsvc_NetCharDevQPurge *object = (struct srvsvc_NetCharDevQPurge *)pytalloc_get_ptr(obj);
   34504             :         PyObject *py_result;
   34505           0 :         py_result = PyErr_FromWERROR(object->out.result);
   34506           0 :         return py_result;
   34507             : }
   34508             : 
   34509           0 : static int py_srvsvc_NetCharDevQPurge_set_result(PyObject *py_obj, PyObject *value, void *closure)
   34510             : {
   34511           0 :         struct srvsvc_NetCharDevQPurge *object = (struct srvsvc_NetCharDevQPurge *)pytalloc_get_ptr(py_obj);
   34512           0 :         if (value == NULL) {
   34513           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   34514           0 :                 return -1;
   34515             :         }
   34516           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   34517           0 :         return 0;
   34518             : }
   34519             : 
   34520             : static PyGetSetDef py_srvsvc_NetCharDevQPurge_getsetters[] = {
   34521             :         {
   34522             :                 .name = discard_const_p(char, "in_server_unc"),
   34523             :                 .get = py_srvsvc_NetCharDevQPurge_in_get_server_unc,
   34524             :                 .set = py_srvsvc_NetCharDevQPurge_in_set_server_unc,
   34525             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   34526             :         },
   34527             :         {
   34528             :                 .name = discard_const_p(char, "in_queue_name"),
   34529             :                 .get = py_srvsvc_NetCharDevQPurge_in_get_queue_name,
   34530             :                 .set = py_srvsvc_NetCharDevQPurge_in_set_queue_name,
   34531             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   34532             :         },
   34533             :         {
   34534             :                 .name = discard_const_p(char, "result"),
   34535             :                 .get = py_srvsvc_NetCharDevQPurge_get_result,
   34536             :                 .set = py_srvsvc_NetCharDevQPurge_set_result,
   34537             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   34538             :         },
   34539             :         { .name = NULL }
   34540             : };
   34541             : 
   34542           0 : static PyObject *py_srvsvc_NetCharDevQPurge_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   34543             : {
   34544           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetCharDevQPurge, type);
   34545           0 :         return self;
   34546             : }
   34547             : 
   34548           0 : static PyObject *py_srvsvc_NetCharDevQPurge_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   34549             : {
   34550             : 
   34551             : 
   34552           0 :         return PyLong_FromLong(6);
   34553             : }
   34554             : 
   34555           0 : static PyObject *py_srvsvc_NetCharDevQPurge_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   34556             : {
   34557           0 :         const struct ndr_interface_call *call = NULL;
   34558           0 :         struct srvsvc_NetCharDevQPurge *object = (struct srvsvc_NetCharDevQPurge *)pytalloc_get_ptr(py_obj);
   34559           0 :         PyObject *ret = NULL;
   34560           0 :         struct ndr_push *push = NULL;
   34561             :         DATA_BLOB blob;
   34562             :         enum ndr_err_code err;
   34563             : 
   34564           0 :         if (ndr_table_srvsvc.num_calls < 7) {
   34565           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQPurge_ndr_pack");
   34566           0 :                 return NULL;
   34567             :         }
   34568           0 :         call = &ndr_table_srvsvc.calls[6];
   34569             : 
   34570           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   34571           0 :         if (push == NULL) {
   34572           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   34573           0 :                 return NULL;
   34574             :         }
   34575             : 
   34576           0 :         push->flags |= ndr_push_flags;
   34577             : 
   34578           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   34579           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   34580           0 :                 TALLOC_FREE(push);
   34581           0 :                 PyErr_SetNdrError(err);
   34582           0 :                 return NULL;
   34583             :         }
   34584           0 :         blob = ndr_push_blob(push);
   34585           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   34586           0 :         TALLOC_FREE(push);
   34587           0 :         return ret;
   34588             : }
   34589             : 
   34590           0 : static PyObject *py_srvsvc_NetCharDevQPurge_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34591             : {
   34592           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   34593           0 :         PyObject *bigendian_obj = NULL;
   34594           0 :         PyObject *ndr64_obj = NULL;
   34595           0 :         uint32_t ndr_push_flags = 0;
   34596             : 
   34597           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   34598             :                 discard_const_p(char *, kwnames),
   34599             :                 &bigendian_obj,
   34600             :                 &ndr64_obj)) {
   34601           0 :                 return NULL;
   34602             :         }
   34603             : 
   34604           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34605           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   34606             :         }
   34607           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34608           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   34609             :         }
   34610             : 
   34611           0 :         return py_srvsvc_NetCharDevQPurge_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   34612             : }
   34613             : 
   34614           0 : static PyObject *py_srvsvc_NetCharDevQPurge_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34615             : {
   34616           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   34617           0 :         PyObject *bigendian_obj = NULL;
   34618           0 :         PyObject *ndr64_obj = NULL;
   34619           0 :         uint32_t ndr_push_flags = 0;
   34620             : 
   34621           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   34622             :                 discard_const_p(char *, kwnames),
   34623             :                 &bigendian_obj,
   34624             :                 &ndr64_obj)) {
   34625           0 :                 return NULL;
   34626             :         }
   34627             : 
   34628           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34629           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   34630             :         }
   34631           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34632           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   34633             :         }
   34634             : 
   34635           0 :         return py_srvsvc_NetCharDevQPurge_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   34636             : }
   34637             : 
   34638           0 : static PyObject *py_srvsvc_NetCharDevQPurge_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   34639             : {
   34640           0 :         const struct ndr_interface_call *call = NULL;
   34641           0 :         struct srvsvc_NetCharDevQPurge *object = (struct srvsvc_NetCharDevQPurge *)pytalloc_get_ptr(py_obj);
   34642           0 :         struct ndr_pull *pull = NULL;
   34643             :         enum ndr_err_code err;
   34644             : 
   34645           0 :         if (ndr_table_srvsvc.num_calls < 7) {
   34646           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQPurge_ndr_unpack");
   34647           0 :                 return NULL;
   34648             :         }
   34649           0 :         call = &ndr_table_srvsvc.calls[6];
   34650             : 
   34651           0 :         pull = ndr_pull_init_blob(blob, object);
   34652           0 :         if (pull == NULL) {
   34653           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   34654           0 :                 return NULL;
   34655             :         }
   34656             : 
   34657           0 :         pull->flags |= ndr_pull_flags;
   34658             : 
   34659           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   34660           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   34661           0 :                 TALLOC_FREE(pull);
   34662           0 :                 PyErr_SetNdrError(err);
   34663           0 :                 return NULL;
   34664             :         }
   34665           0 :         if (!allow_remaining) {
   34666             :                 uint32_t highest_ofs;
   34667             : 
   34668           0 :                 if (pull->offset > pull->relative_highest_offset) {
   34669           0 :                         highest_ofs = pull->offset;
   34670             :                 } else {
   34671           0 :                         highest_ofs = pull->relative_highest_offset;
   34672             :                 }
   34673           0 :                 if (highest_ofs < pull->data_size) {
   34674           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   34675             :                                 "not all bytes consumed ofs[%u] size[%u]",
   34676             :                                 highest_ofs, pull->data_size);
   34677           0 :                         TALLOC_FREE(pull);
   34678           0 :                         PyErr_SetNdrError(err);
   34679           0 :                         return NULL;
   34680             :                 }
   34681             :         }
   34682             : 
   34683           0 :         TALLOC_FREE(pull);
   34684           0 :         Py_RETURN_NONE;
   34685             : }
   34686             : 
   34687           0 : static PyObject *py_srvsvc_NetCharDevQPurge_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34688             : {
   34689             :         DATA_BLOB blob;
   34690           0 :         Py_ssize_t blob_length = 0;
   34691           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   34692           0 :         PyObject *bigendian_obj = NULL;
   34693           0 :         PyObject *ndr64_obj = NULL;
   34694           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   34695           0 :         PyObject *allow_remaining_obj = NULL;
   34696           0 :         bool allow_remaining = false;
   34697             : 
   34698           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   34699             :                 discard_const_p(char *, kwnames),
   34700             :                 &blob.data, &blob_length,
   34701             :                 &bigendian_obj,
   34702             :                 &ndr64_obj,
   34703             :                 &allow_remaining_obj)) {
   34704           0 :                 return NULL;
   34705             :         }
   34706           0 :         blob.length = blob_length;
   34707             : 
   34708           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34709           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   34710             :         }
   34711           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34712           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   34713             :         }
   34714             : 
   34715           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   34716           0 :                 allow_remaining = true;
   34717             :         }
   34718             : 
   34719           0 :         return py_srvsvc_NetCharDevQPurge_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   34720             : }
   34721             : 
   34722           0 : static PyObject *py_srvsvc_NetCharDevQPurge_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34723             : {
   34724             :         DATA_BLOB blob;
   34725           0 :         Py_ssize_t blob_length = 0;
   34726           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   34727           0 :         PyObject *bigendian_obj = NULL;
   34728           0 :         PyObject *ndr64_obj = NULL;
   34729           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   34730           0 :         PyObject *allow_remaining_obj = NULL;
   34731           0 :         bool allow_remaining = false;
   34732             : 
   34733           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   34734             :                 discard_const_p(char *, kwnames),
   34735             :                 &blob.data, &blob_length,
   34736             :                 &bigendian_obj,
   34737             :                 &ndr64_obj,
   34738             :                 &allow_remaining_obj)) {
   34739           0 :                 return NULL;
   34740             :         }
   34741           0 :         blob.length = blob_length;
   34742             : 
   34743           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34744           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   34745             :         }
   34746           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34747           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   34748             :         }
   34749             : 
   34750           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   34751           0 :                 allow_remaining = true;
   34752             :         }
   34753             : 
   34754           0 :         return py_srvsvc_NetCharDevQPurge_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   34755             : }
   34756             : 
   34757           0 : static PyObject *py_srvsvc_NetCharDevQPurge_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   34758             : {
   34759           0 :         const struct ndr_interface_call *call = NULL;
   34760           0 :         struct srvsvc_NetCharDevQPurge *object = (struct srvsvc_NetCharDevQPurge *)pytalloc_get_ptr(py_obj);
   34761             :         PyObject *ret;
   34762             :         char *retstr;
   34763             : 
   34764           0 :         if (ndr_table_srvsvc.num_calls < 7) {
   34765           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQPurge_ndr_print");
   34766           0 :                 return NULL;
   34767             :         }
   34768           0 :         call = &ndr_table_srvsvc.calls[6];
   34769             : 
   34770           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   34771           0 :         ret = PyUnicode_FromString(retstr);
   34772           0 :         TALLOC_FREE(retstr);
   34773             : 
   34774           0 :         return ret;
   34775             : }
   34776             : 
   34777           0 : static PyObject *py_srvsvc_NetCharDevQPurge_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   34778             : {
   34779           0 :         return py_srvsvc_NetCharDevQPurge_ndr_print(py_obj, "srvsvc_NetCharDevQPurge_in", NDR_IN);
   34780             : }
   34781             : 
   34782           0 : static PyObject *py_srvsvc_NetCharDevQPurge_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   34783             : {
   34784           0 :         return py_srvsvc_NetCharDevQPurge_ndr_print(py_obj, "srvsvc_NetCharDevQPurge_out", NDR_OUT);
   34785             : }
   34786             : 
   34787             : static PyMethodDef py_srvsvc_NetCharDevQPurge_methods[] = {
   34788             :         { "opnum", (PyCFunction)py_srvsvc_NetCharDevQPurge_ndr_opnum, METH_NOARGS|METH_CLASS,
   34789             :                 "srvsvc.NetCharDevQPurge.opnum() -> 6 (0x06) " },
   34790             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQPurge_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   34791             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   34792             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQPurge_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   34793             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   34794             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQPurge_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   34795             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   34796             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQPurge_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   34797             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   34798             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetCharDevQPurge_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   34799             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetCharDevQPurge_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   34800             :         { NULL, NULL, 0, NULL }
   34801             : };
   34802             : 
   34803             : 
   34804             : static PyTypeObject srvsvc_NetCharDevQPurge_Type = {
   34805             :         PyVarObject_HEAD_INIT(NULL, 0)
   34806             :         .tp_name = "srvsvc.NetCharDevQPurge",
   34807             :         .tp_getset = py_srvsvc_NetCharDevQPurge_getsetters,
   34808             :         .tp_methods = py_srvsvc_NetCharDevQPurge_methods,
   34809             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   34810             :         .tp_new = py_srvsvc_NetCharDevQPurge_new,
   34811             : };
   34812             : 
   34813           0 : static bool pack_py_srvsvc_NetCharDevQPurge_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetCharDevQPurge *r)
   34814             : {
   34815             :         PyObject *py_server_unc;
   34816             :         PyObject *py_queue_name;
   34817           0 :         const char *kwnames[] = {
   34818             :                 "server_unc", "queue_name", NULL
   34819             :         };
   34820             : 
   34821           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:srvsvc_NetCharDevQPurge", discard_const_p(char *, kwnames), &py_server_unc, &py_queue_name)) {
   34822           0 :                 return false;
   34823             :         }
   34824             : 
   34825           0 :         if (py_server_unc == NULL) {
   34826           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   34827           0 :                 return false;
   34828             :         }
   34829           0 :         if (py_server_unc == Py_None) {
   34830           0 :                 r->in.server_unc = NULL;
   34831             :         } else {
   34832           0 :                 r->in.server_unc = NULL;
   34833             :                 {
   34834             :                         const char *test_str;
   34835             :                         const char *talloc_str;
   34836           0 :                         PyObject *unicode = NULL;
   34837           0 :                         if (PyUnicode_Check(py_server_unc)) {
   34838           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   34839           0 :                                 if (unicode == NULL) {
   34840           0 :                                         PyErr_NoMemory();
   34841           0 :                                         return false;
   34842             :                                 }
   34843           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   34844           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   34845           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   34846             :                         } else {
   34847           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   34848           0 :                                 return false;
   34849             :                         }
   34850           0 :                         talloc_str = talloc_strdup(r, test_str);
   34851           0 :                         if (unicode != NULL) {
   34852           0 :                                 Py_DECREF(unicode);
   34853             :                         }
   34854           0 :                         if (talloc_str == NULL) {
   34855           0 :                                 PyErr_NoMemory();
   34856           0 :                                 return false;
   34857             :                         }
   34858           0 :                         r->in.server_unc = talloc_str;
   34859             :                 }
   34860             :         }
   34861           0 :         if (py_queue_name == NULL) {
   34862           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.queue_name");
   34863           0 :                 return false;
   34864             :         }
   34865             :         {
   34866             :                 const char *test_str;
   34867             :                 const char *talloc_str;
   34868           0 :                 PyObject *unicode = NULL;
   34869           0 :                 if (PyUnicode_Check(py_queue_name)) {
   34870           0 :                         unicode = PyUnicode_AsEncodedString(py_queue_name, "utf-8", "ignore");
   34871           0 :                         if (unicode == NULL) {
   34872           0 :                                 PyErr_NoMemory();
   34873           0 :                                 return false;
   34874             :                         }
   34875           0 :                         test_str = PyBytes_AS_STRING(unicode);
   34876           0 :                 } else if (PyBytes_Check(py_queue_name)) {
   34877           0 :                         test_str = PyBytes_AS_STRING(py_queue_name);
   34878             :                 } else {
   34879           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_queue_name)->tp_name);
   34880           0 :                         return false;
   34881             :                 }
   34882           0 :                 talloc_str = talloc_strdup(r, test_str);
   34883           0 :                 if (unicode != NULL) {
   34884           0 :                         Py_DECREF(unicode);
   34885             :                 }
   34886           0 :                 if (talloc_str == NULL) {
   34887           0 :                         PyErr_NoMemory();
   34888           0 :                         return false;
   34889             :                 }
   34890           0 :                 r->in.queue_name = talloc_str;
   34891             :         }
   34892           0 :         return true;
   34893             : }
   34894             : 
   34895           0 : static PyObject *unpack_py_srvsvc_NetCharDevQPurge_args_out(struct srvsvc_NetCharDevQPurge *r)
   34896             : {
   34897             :         PyObject *result;
   34898           0 :         result = Py_None;
   34899           0 :         Py_INCREF(result);
   34900           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   34901           0 :                 PyErr_SetWERROR(r->out.result);
   34902           0 :                 return NULL;
   34903             :         }
   34904             : 
   34905           0 :         return result;
   34906             : }
   34907             : 
   34908             : 
   34909           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_in_get_server_unc(PyObject *obj, void *closure)
   34910             : {
   34911           0 :         struct srvsvc_NetCharDevQPurgeSelf *object = (struct srvsvc_NetCharDevQPurgeSelf *)pytalloc_get_ptr(obj);
   34912             :         PyObject *py_server_unc;
   34913           0 :         if (object->in.server_unc == NULL) {
   34914           0 :                 Py_RETURN_NONE;
   34915             :         }
   34916           0 :         if (object->in.server_unc == NULL) {
   34917           0 :                 py_server_unc = Py_None;
   34918           0 :                 Py_INCREF(py_server_unc);
   34919             :         } else {
   34920           0 :                 if (object->in.server_unc == NULL) {
   34921           0 :                         py_server_unc = Py_None;
   34922           0 :                         Py_INCREF(py_server_unc);
   34923             :                 } else {
   34924           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   34925             :                 }
   34926             :         }
   34927           0 :         return py_server_unc;
   34928             : }
   34929             : 
   34930           0 : static int py_srvsvc_NetCharDevQPurgeSelf_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   34931             : {
   34932           0 :         struct srvsvc_NetCharDevQPurgeSelf *object = (struct srvsvc_NetCharDevQPurgeSelf *)pytalloc_get_ptr(py_obj);
   34933           0 :         if (value == NULL) {
   34934           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   34935           0 :                 return -1;
   34936             :         }
   34937           0 :         if (value == Py_None) {
   34938           0 :                 object->in.server_unc = NULL;
   34939             :         } else {
   34940           0 :                 object->in.server_unc = NULL;
   34941             :                 {
   34942             :                         const char *test_str;
   34943             :                         const char *talloc_str;
   34944           0 :                         PyObject *unicode = NULL;
   34945           0 :                         if (PyUnicode_Check(value)) {
   34946           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   34947           0 :                                 if (unicode == NULL) {
   34948           0 :                                         PyErr_NoMemory();
   34949           0 :                                         return -1;
   34950             :                                 }
   34951           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   34952           0 :                         } else if (PyBytes_Check(value)) {
   34953           0 :                                 test_str = PyBytes_AS_STRING(value);
   34954             :                         } else {
   34955           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   34956           0 :                                 return -1;
   34957             :                         }
   34958           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   34959           0 :                         if (unicode != NULL) {
   34960           0 :                                 Py_DECREF(unicode);
   34961             :                         }
   34962           0 :                         if (talloc_str == NULL) {
   34963           0 :                                 PyErr_NoMemory();
   34964           0 :                                 return -1;
   34965             :                         }
   34966           0 :                         object->in.server_unc = talloc_str;
   34967             :                 }
   34968             :         }
   34969           0 :         return 0;
   34970             : }
   34971             : 
   34972           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_in_get_queue_name(PyObject *obj, void *closure)
   34973             : {
   34974           0 :         struct srvsvc_NetCharDevQPurgeSelf *object = (struct srvsvc_NetCharDevQPurgeSelf *)pytalloc_get_ptr(obj);
   34975             :         PyObject *py_queue_name;
   34976           0 :         if (object->in.queue_name == NULL) {
   34977           0 :                 py_queue_name = Py_None;
   34978           0 :                 Py_INCREF(py_queue_name);
   34979             :         } else {
   34980           0 :                 py_queue_name = PyUnicode_Decode(object->in.queue_name, strlen(object->in.queue_name), "utf-8", "ignore");
   34981             :         }
   34982           0 :         return py_queue_name;
   34983             : }
   34984             : 
   34985           0 : static int py_srvsvc_NetCharDevQPurgeSelf_in_set_queue_name(PyObject *py_obj, PyObject *value, void *closure)
   34986             : {
   34987           0 :         struct srvsvc_NetCharDevQPurgeSelf *object = (struct srvsvc_NetCharDevQPurgeSelf *)pytalloc_get_ptr(py_obj);
   34988           0 :         if (value == NULL) {
   34989           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.queue_name");
   34990           0 :                 return -1;
   34991             :         }
   34992             :         {
   34993             :                 const char *test_str;
   34994             :                 const char *talloc_str;
   34995           0 :                 PyObject *unicode = NULL;
   34996           0 :                 if (PyUnicode_Check(value)) {
   34997           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   34998           0 :                         if (unicode == NULL) {
   34999           0 :                                 PyErr_NoMemory();
   35000           0 :                                 return -1;
   35001             :                         }
   35002           0 :                         test_str = PyBytes_AS_STRING(unicode);
   35003           0 :                 } else if (PyBytes_Check(value)) {
   35004           0 :                         test_str = PyBytes_AS_STRING(value);
   35005             :                 } else {
   35006           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   35007           0 :                         return -1;
   35008             :                 }
   35009           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   35010           0 :                 if (unicode != NULL) {
   35011           0 :                         Py_DECREF(unicode);
   35012             :                 }
   35013           0 :                 if (talloc_str == NULL) {
   35014           0 :                         PyErr_NoMemory();
   35015           0 :                         return -1;
   35016             :                 }
   35017           0 :                 object->in.queue_name = talloc_str;
   35018             :         }
   35019           0 :         return 0;
   35020             : }
   35021             : 
   35022           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_in_get_computer_name(PyObject *obj, void *closure)
   35023             : {
   35024           0 :         struct srvsvc_NetCharDevQPurgeSelf *object = (struct srvsvc_NetCharDevQPurgeSelf *)pytalloc_get_ptr(obj);
   35025             :         PyObject *py_computer_name;
   35026           0 :         if (object->in.computer_name == NULL) {
   35027           0 :                 py_computer_name = Py_None;
   35028           0 :                 Py_INCREF(py_computer_name);
   35029             :         } else {
   35030           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   35031             :         }
   35032           0 :         return py_computer_name;
   35033             : }
   35034             : 
   35035           0 : static int py_srvsvc_NetCharDevQPurgeSelf_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   35036             : {
   35037           0 :         struct srvsvc_NetCharDevQPurgeSelf *object = (struct srvsvc_NetCharDevQPurgeSelf *)pytalloc_get_ptr(py_obj);
   35038           0 :         if (value == NULL) {
   35039           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   35040           0 :                 return -1;
   35041             :         }
   35042             :         {
   35043             :                 const char *test_str;
   35044             :                 const char *talloc_str;
   35045           0 :                 PyObject *unicode = NULL;
   35046           0 :                 if (PyUnicode_Check(value)) {
   35047           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   35048           0 :                         if (unicode == NULL) {
   35049           0 :                                 PyErr_NoMemory();
   35050           0 :                                 return -1;
   35051             :                         }
   35052           0 :                         test_str = PyBytes_AS_STRING(unicode);
   35053           0 :                 } else if (PyBytes_Check(value)) {
   35054           0 :                         test_str = PyBytes_AS_STRING(value);
   35055             :                 } else {
   35056           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   35057           0 :                         return -1;
   35058             :                 }
   35059           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   35060           0 :                 if (unicode != NULL) {
   35061           0 :                         Py_DECREF(unicode);
   35062             :                 }
   35063           0 :                 if (talloc_str == NULL) {
   35064           0 :                         PyErr_NoMemory();
   35065           0 :                         return -1;
   35066             :                 }
   35067           0 :                 object->in.computer_name = talloc_str;
   35068             :         }
   35069           0 :         return 0;
   35070             : }
   35071             : 
   35072           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_get_result(PyObject *obj, void *closure)
   35073             : {
   35074           0 :         struct srvsvc_NetCharDevQPurgeSelf *object = (struct srvsvc_NetCharDevQPurgeSelf *)pytalloc_get_ptr(obj);
   35075             :         PyObject *py_result;
   35076           0 :         py_result = PyErr_FromWERROR(object->out.result);
   35077           0 :         return py_result;
   35078             : }
   35079             : 
   35080           0 : static int py_srvsvc_NetCharDevQPurgeSelf_set_result(PyObject *py_obj, PyObject *value, void *closure)
   35081             : {
   35082           0 :         struct srvsvc_NetCharDevQPurgeSelf *object = (struct srvsvc_NetCharDevQPurgeSelf *)pytalloc_get_ptr(py_obj);
   35083           0 :         if (value == NULL) {
   35084           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   35085           0 :                 return -1;
   35086             :         }
   35087           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   35088           0 :         return 0;
   35089             : }
   35090             : 
   35091             : static PyGetSetDef py_srvsvc_NetCharDevQPurgeSelf_getsetters[] = {
   35092             :         {
   35093             :                 .name = discard_const_p(char, "in_server_unc"),
   35094             :                 .get = py_srvsvc_NetCharDevQPurgeSelf_in_get_server_unc,
   35095             :                 .set = py_srvsvc_NetCharDevQPurgeSelf_in_set_server_unc,
   35096             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   35097             :         },
   35098             :         {
   35099             :                 .name = discard_const_p(char, "in_queue_name"),
   35100             :                 .get = py_srvsvc_NetCharDevQPurgeSelf_in_get_queue_name,
   35101             :                 .set = py_srvsvc_NetCharDevQPurgeSelf_in_set_queue_name,
   35102             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   35103             :         },
   35104             :         {
   35105             :                 .name = discard_const_p(char, "in_computer_name"),
   35106             :                 .get = py_srvsvc_NetCharDevQPurgeSelf_in_get_computer_name,
   35107             :                 .set = py_srvsvc_NetCharDevQPurgeSelf_in_set_computer_name,
   35108             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   35109             :         },
   35110             :         {
   35111             :                 .name = discard_const_p(char, "result"),
   35112             :                 .get = py_srvsvc_NetCharDevQPurgeSelf_get_result,
   35113             :                 .set = py_srvsvc_NetCharDevQPurgeSelf_set_result,
   35114             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   35115             :         },
   35116             :         { .name = NULL }
   35117             : };
   35118             : 
   35119           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   35120             : {
   35121           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetCharDevQPurgeSelf, type);
   35122           0 :         return self;
   35123             : }
   35124             : 
   35125           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   35126             : {
   35127             : 
   35128             : 
   35129           0 :         return PyLong_FromLong(7);
   35130             : }
   35131             : 
   35132           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   35133             : {
   35134           0 :         const struct ndr_interface_call *call = NULL;
   35135           0 :         struct srvsvc_NetCharDevQPurgeSelf *object = (struct srvsvc_NetCharDevQPurgeSelf *)pytalloc_get_ptr(py_obj);
   35136           0 :         PyObject *ret = NULL;
   35137           0 :         struct ndr_push *push = NULL;
   35138             :         DATA_BLOB blob;
   35139             :         enum ndr_err_code err;
   35140             : 
   35141           0 :         if (ndr_table_srvsvc.num_calls < 8) {
   35142           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQPurgeSelf_ndr_pack");
   35143           0 :                 return NULL;
   35144             :         }
   35145           0 :         call = &ndr_table_srvsvc.calls[7];
   35146             : 
   35147           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   35148           0 :         if (push == NULL) {
   35149           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   35150           0 :                 return NULL;
   35151             :         }
   35152             : 
   35153           0 :         push->flags |= ndr_push_flags;
   35154             : 
   35155           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   35156           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   35157           0 :                 TALLOC_FREE(push);
   35158           0 :                 PyErr_SetNdrError(err);
   35159           0 :                 return NULL;
   35160             :         }
   35161           0 :         blob = ndr_push_blob(push);
   35162           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   35163           0 :         TALLOC_FREE(push);
   35164           0 :         return ret;
   35165             : }
   35166             : 
   35167           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35168             : {
   35169           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   35170           0 :         PyObject *bigendian_obj = NULL;
   35171           0 :         PyObject *ndr64_obj = NULL;
   35172           0 :         uint32_t ndr_push_flags = 0;
   35173             : 
   35174           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   35175             :                 discard_const_p(char *, kwnames),
   35176             :                 &bigendian_obj,
   35177             :                 &ndr64_obj)) {
   35178           0 :                 return NULL;
   35179             :         }
   35180             : 
   35181           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35182           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   35183             :         }
   35184           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35185           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   35186             :         }
   35187             : 
   35188           0 :         return py_srvsvc_NetCharDevQPurgeSelf_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   35189             : }
   35190             : 
   35191           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35192             : {
   35193           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   35194           0 :         PyObject *bigendian_obj = NULL;
   35195           0 :         PyObject *ndr64_obj = NULL;
   35196           0 :         uint32_t ndr_push_flags = 0;
   35197             : 
   35198           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   35199             :                 discard_const_p(char *, kwnames),
   35200             :                 &bigendian_obj,
   35201             :                 &ndr64_obj)) {
   35202           0 :                 return NULL;
   35203             :         }
   35204             : 
   35205           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35206           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   35207             :         }
   35208           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35209           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   35210             :         }
   35211             : 
   35212           0 :         return py_srvsvc_NetCharDevQPurgeSelf_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   35213             : }
   35214             : 
   35215           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   35216             : {
   35217           0 :         const struct ndr_interface_call *call = NULL;
   35218           0 :         struct srvsvc_NetCharDevQPurgeSelf *object = (struct srvsvc_NetCharDevQPurgeSelf *)pytalloc_get_ptr(py_obj);
   35219           0 :         struct ndr_pull *pull = NULL;
   35220             :         enum ndr_err_code err;
   35221             : 
   35222           0 :         if (ndr_table_srvsvc.num_calls < 8) {
   35223           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQPurgeSelf_ndr_unpack");
   35224           0 :                 return NULL;
   35225             :         }
   35226           0 :         call = &ndr_table_srvsvc.calls[7];
   35227             : 
   35228           0 :         pull = ndr_pull_init_blob(blob, object);
   35229           0 :         if (pull == NULL) {
   35230           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   35231           0 :                 return NULL;
   35232             :         }
   35233             : 
   35234           0 :         pull->flags |= ndr_pull_flags;
   35235             : 
   35236           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   35237           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   35238           0 :                 TALLOC_FREE(pull);
   35239           0 :                 PyErr_SetNdrError(err);
   35240           0 :                 return NULL;
   35241             :         }
   35242           0 :         if (!allow_remaining) {
   35243             :                 uint32_t highest_ofs;
   35244             : 
   35245           0 :                 if (pull->offset > pull->relative_highest_offset) {
   35246           0 :                         highest_ofs = pull->offset;
   35247             :                 } else {
   35248           0 :                         highest_ofs = pull->relative_highest_offset;
   35249             :                 }
   35250           0 :                 if (highest_ofs < pull->data_size) {
   35251           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   35252             :                                 "not all bytes consumed ofs[%u] size[%u]",
   35253             :                                 highest_ofs, pull->data_size);
   35254           0 :                         TALLOC_FREE(pull);
   35255           0 :                         PyErr_SetNdrError(err);
   35256           0 :                         return NULL;
   35257             :                 }
   35258             :         }
   35259             : 
   35260           0 :         TALLOC_FREE(pull);
   35261           0 :         Py_RETURN_NONE;
   35262             : }
   35263             : 
   35264           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35265             : {
   35266             :         DATA_BLOB blob;
   35267           0 :         Py_ssize_t blob_length = 0;
   35268           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   35269           0 :         PyObject *bigendian_obj = NULL;
   35270           0 :         PyObject *ndr64_obj = NULL;
   35271           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   35272           0 :         PyObject *allow_remaining_obj = NULL;
   35273           0 :         bool allow_remaining = false;
   35274             : 
   35275           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   35276             :                 discard_const_p(char *, kwnames),
   35277             :                 &blob.data, &blob_length,
   35278             :                 &bigendian_obj,
   35279             :                 &ndr64_obj,
   35280             :                 &allow_remaining_obj)) {
   35281           0 :                 return NULL;
   35282             :         }
   35283           0 :         blob.length = blob_length;
   35284             : 
   35285           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35286           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   35287             :         }
   35288           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35289           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   35290             :         }
   35291             : 
   35292           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   35293           0 :                 allow_remaining = true;
   35294             :         }
   35295             : 
   35296           0 :         return py_srvsvc_NetCharDevQPurgeSelf_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   35297             : }
   35298             : 
   35299           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35300             : {
   35301             :         DATA_BLOB blob;
   35302           0 :         Py_ssize_t blob_length = 0;
   35303           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   35304           0 :         PyObject *bigendian_obj = NULL;
   35305           0 :         PyObject *ndr64_obj = NULL;
   35306           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   35307           0 :         PyObject *allow_remaining_obj = NULL;
   35308           0 :         bool allow_remaining = false;
   35309             : 
   35310           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   35311             :                 discard_const_p(char *, kwnames),
   35312             :                 &blob.data, &blob_length,
   35313             :                 &bigendian_obj,
   35314             :                 &ndr64_obj,
   35315             :                 &allow_remaining_obj)) {
   35316           0 :                 return NULL;
   35317             :         }
   35318           0 :         blob.length = blob_length;
   35319             : 
   35320           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35321           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   35322             :         }
   35323           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35324           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   35325             :         }
   35326             : 
   35327           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   35328           0 :                 allow_remaining = true;
   35329             :         }
   35330             : 
   35331           0 :         return py_srvsvc_NetCharDevQPurgeSelf_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   35332             : }
   35333             : 
   35334           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   35335             : {
   35336           0 :         const struct ndr_interface_call *call = NULL;
   35337           0 :         struct srvsvc_NetCharDevQPurgeSelf *object = (struct srvsvc_NetCharDevQPurgeSelf *)pytalloc_get_ptr(py_obj);
   35338             :         PyObject *ret;
   35339             :         char *retstr;
   35340             : 
   35341           0 :         if (ndr_table_srvsvc.num_calls < 8) {
   35342           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetCharDevQPurgeSelf_ndr_print");
   35343           0 :                 return NULL;
   35344             :         }
   35345           0 :         call = &ndr_table_srvsvc.calls[7];
   35346             : 
   35347           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   35348           0 :         ret = PyUnicode_FromString(retstr);
   35349           0 :         TALLOC_FREE(retstr);
   35350             : 
   35351           0 :         return ret;
   35352             : }
   35353             : 
   35354           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   35355             : {
   35356           0 :         return py_srvsvc_NetCharDevQPurgeSelf_ndr_print(py_obj, "srvsvc_NetCharDevQPurgeSelf_in", NDR_IN);
   35357             : }
   35358             : 
   35359           0 : static PyObject *py_srvsvc_NetCharDevQPurgeSelf_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   35360             : {
   35361           0 :         return py_srvsvc_NetCharDevQPurgeSelf_ndr_print(py_obj, "srvsvc_NetCharDevQPurgeSelf_out", NDR_OUT);
   35362             : }
   35363             : 
   35364             : static PyMethodDef py_srvsvc_NetCharDevQPurgeSelf_methods[] = {
   35365             :         { "opnum", (PyCFunction)py_srvsvc_NetCharDevQPurgeSelf_ndr_opnum, METH_NOARGS|METH_CLASS,
   35366             :                 "srvsvc.NetCharDevQPurgeSelf.opnum() -> 7 (0x07) " },
   35367             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQPurgeSelf_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   35368             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   35369             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQPurgeSelf_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   35370             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   35371             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQPurgeSelf_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   35372             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   35373             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetCharDevQPurgeSelf_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   35374             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   35375             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetCharDevQPurgeSelf_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   35376             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetCharDevQPurgeSelf_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   35377             :         { NULL, NULL, 0, NULL }
   35378             : };
   35379             : 
   35380             : 
   35381             : static PyTypeObject srvsvc_NetCharDevQPurgeSelf_Type = {
   35382             :         PyVarObject_HEAD_INIT(NULL, 0)
   35383             :         .tp_name = "srvsvc.NetCharDevQPurgeSelf",
   35384             :         .tp_getset = py_srvsvc_NetCharDevQPurgeSelf_getsetters,
   35385             :         .tp_methods = py_srvsvc_NetCharDevQPurgeSelf_methods,
   35386             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   35387             :         .tp_new = py_srvsvc_NetCharDevQPurgeSelf_new,
   35388             : };
   35389             : 
   35390           0 : static bool pack_py_srvsvc_NetCharDevQPurgeSelf_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetCharDevQPurgeSelf *r)
   35391             : {
   35392             :         PyObject *py_server_unc;
   35393             :         PyObject *py_queue_name;
   35394             :         PyObject *py_computer_name;
   35395           0 :         const char *kwnames[] = {
   35396             :                 "server_unc", "queue_name", "computer_name", NULL
   35397             :         };
   35398             : 
   35399           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetCharDevQPurgeSelf", discard_const_p(char *, kwnames), &py_server_unc, &py_queue_name, &py_computer_name)) {
   35400           0 :                 return false;
   35401             :         }
   35402             : 
   35403           0 :         if (py_server_unc == NULL) {
   35404           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   35405           0 :                 return false;
   35406             :         }
   35407           0 :         if (py_server_unc == Py_None) {
   35408           0 :                 r->in.server_unc = NULL;
   35409             :         } else {
   35410           0 :                 r->in.server_unc = NULL;
   35411             :                 {
   35412             :                         const char *test_str;
   35413             :                         const char *talloc_str;
   35414           0 :                         PyObject *unicode = NULL;
   35415           0 :                         if (PyUnicode_Check(py_server_unc)) {
   35416           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   35417           0 :                                 if (unicode == NULL) {
   35418           0 :                                         PyErr_NoMemory();
   35419           0 :                                         return false;
   35420             :                                 }
   35421           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   35422           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   35423           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   35424             :                         } else {
   35425           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   35426           0 :                                 return false;
   35427             :                         }
   35428           0 :                         talloc_str = talloc_strdup(r, test_str);
   35429           0 :                         if (unicode != NULL) {
   35430           0 :                                 Py_DECREF(unicode);
   35431             :                         }
   35432           0 :                         if (talloc_str == NULL) {
   35433           0 :                                 PyErr_NoMemory();
   35434           0 :                                 return false;
   35435             :                         }
   35436           0 :                         r->in.server_unc = talloc_str;
   35437             :                 }
   35438             :         }
   35439           0 :         if (py_queue_name == NULL) {
   35440           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.queue_name");
   35441           0 :                 return false;
   35442             :         }
   35443             :         {
   35444             :                 const char *test_str;
   35445             :                 const char *talloc_str;
   35446           0 :                 PyObject *unicode = NULL;
   35447           0 :                 if (PyUnicode_Check(py_queue_name)) {
   35448           0 :                         unicode = PyUnicode_AsEncodedString(py_queue_name, "utf-8", "ignore");
   35449           0 :                         if (unicode == NULL) {
   35450           0 :                                 PyErr_NoMemory();
   35451           0 :                                 return false;
   35452             :                         }
   35453           0 :                         test_str = PyBytes_AS_STRING(unicode);
   35454           0 :                 } else if (PyBytes_Check(py_queue_name)) {
   35455           0 :                         test_str = PyBytes_AS_STRING(py_queue_name);
   35456             :                 } else {
   35457           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_queue_name)->tp_name);
   35458           0 :                         return false;
   35459             :                 }
   35460           0 :                 talloc_str = talloc_strdup(r, test_str);
   35461           0 :                 if (unicode != NULL) {
   35462           0 :                         Py_DECREF(unicode);
   35463             :                 }
   35464           0 :                 if (talloc_str == NULL) {
   35465           0 :                         PyErr_NoMemory();
   35466           0 :                         return false;
   35467             :                 }
   35468           0 :                 r->in.queue_name = talloc_str;
   35469             :         }
   35470           0 :         if (py_computer_name == NULL) {
   35471           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   35472           0 :                 return false;
   35473             :         }
   35474             :         {
   35475             :                 const char *test_str;
   35476             :                 const char *talloc_str;
   35477           0 :                 PyObject *unicode = NULL;
   35478           0 :                 if (PyUnicode_Check(py_computer_name)) {
   35479           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   35480           0 :                         if (unicode == NULL) {
   35481           0 :                                 PyErr_NoMemory();
   35482           0 :                                 return false;
   35483             :                         }
   35484           0 :                         test_str = PyBytes_AS_STRING(unicode);
   35485           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   35486           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   35487             :                 } else {
   35488           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   35489           0 :                         return false;
   35490             :                 }
   35491           0 :                 talloc_str = talloc_strdup(r, test_str);
   35492           0 :                 if (unicode != NULL) {
   35493           0 :                         Py_DECREF(unicode);
   35494             :                 }
   35495           0 :                 if (talloc_str == NULL) {
   35496           0 :                         PyErr_NoMemory();
   35497           0 :                         return false;
   35498             :                 }
   35499           0 :                 r->in.computer_name = talloc_str;
   35500             :         }
   35501           0 :         return true;
   35502             : }
   35503             : 
   35504           0 : static PyObject *unpack_py_srvsvc_NetCharDevQPurgeSelf_args_out(struct srvsvc_NetCharDevQPurgeSelf *r)
   35505             : {
   35506             :         PyObject *result;
   35507           0 :         result = Py_None;
   35508           0 :         Py_INCREF(result);
   35509           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   35510           0 :                 PyErr_SetWERROR(r->out.result);
   35511           0 :                 return NULL;
   35512             :         }
   35513             : 
   35514           0 :         return result;
   35515             : }
   35516             : 
   35517             : 
   35518           0 : static PyObject *py_srvsvc_NetConnEnum_in_get_server_unc(PyObject *obj, void *closure)
   35519             : {
   35520           0 :         struct srvsvc_NetConnEnum *object = (struct srvsvc_NetConnEnum *)pytalloc_get_ptr(obj);
   35521             :         PyObject *py_server_unc;
   35522           0 :         if (object->in.server_unc == NULL) {
   35523           0 :                 Py_RETURN_NONE;
   35524             :         }
   35525           0 :         if (object->in.server_unc == NULL) {
   35526           0 :                 py_server_unc = Py_None;
   35527           0 :                 Py_INCREF(py_server_unc);
   35528             :         } else {
   35529           0 :                 if (object->in.server_unc == NULL) {
   35530           0 :                         py_server_unc = Py_None;
   35531           0 :                         Py_INCREF(py_server_unc);
   35532             :                 } else {
   35533           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   35534             :                 }
   35535             :         }
   35536           0 :         return py_server_unc;
   35537             : }
   35538             : 
   35539           0 : static int py_srvsvc_NetConnEnum_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   35540             : {
   35541           0 :         struct srvsvc_NetConnEnum *object = (struct srvsvc_NetConnEnum *)pytalloc_get_ptr(py_obj);
   35542           0 :         if (value == NULL) {
   35543           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   35544           0 :                 return -1;
   35545             :         }
   35546           0 :         if (value == Py_None) {
   35547           0 :                 object->in.server_unc = NULL;
   35548             :         } else {
   35549           0 :                 object->in.server_unc = NULL;
   35550             :                 {
   35551             :                         const char *test_str;
   35552             :                         const char *talloc_str;
   35553           0 :                         PyObject *unicode = NULL;
   35554           0 :                         if (PyUnicode_Check(value)) {
   35555           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   35556           0 :                                 if (unicode == NULL) {
   35557           0 :                                         PyErr_NoMemory();
   35558           0 :                                         return -1;
   35559             :                                 }
   35560           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   35561           0 :                         } else if (PyBytes_Check(value)) {
   35562           0 :                                 test_str = PyBytes_AS_STRING(value);
   35563             :                         } else {
   35564           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   35565           0 :                                 return -1;
   35566             :                         }
   35567           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   35568           0 :                         if (unicode != NULL) {
   35569           0 :                                 Py_DECREF(unicode);
   35570             :                         }
   35571           0 :                         if (talloc_str == NULL) {
   35572           0 :                                 PyErr_NoMemory();
   35573           0 :                                 return -1;
   35574             :                         }
   35575           0 :                         object->in.server_unc = talloc_str;
   35576             :                 }
   35577             :         }
   35578           0 :         return 0;
   35579             : }
   35580             : 
   35581           0 : static PyObject *py_srvsvc_NetConnEnum_in_get_path(PyObject *obj, void *closure)
   35582             : {
   35583           0 :         struct srvsvc_NetConnEnum *object = (struct srvsvc_NetConnEnum *)pytalloc_get_ptr(obj);
   35584             :         PyObject *py_path;
   35585           0 :         if (object->in.path == NULL) {
   35586           0 :                 Py_RETURN_NONE;
   35587             :         }
   35588           0 :         if (object->in.path == NULL) {
   35589           0 :                 py_path = Py_None;
   35590           0 :                 Py_INCREF(py_path);
   35591             :         } else {
   35592           0 :                 if (object->in.path == NULL) {
   35593           0 :                         py_path = Py_None;
   35594           0 :                         Py_INCREF(py_path);
   35595             :                 } else {
   35596           0 :                         py_path = PyUnicode_Decode(object->in.path, strlen(object->in.path), "utf-8", "ignore");
   35597             :                 }
   35598             :         }
   35599           0 :         return py_path;
   35600             : }
   35601             : 
   35602           0 : static int py_srvsvc_NetConnEnum_in_set_path(PyObject *py_obj, PyObject *value, void *closure)
   35603             : {
   35604           0 :         struct srvsvc_NetConnEnum *object = (struct srvsvc_NetConnEnum *)pytalloc_get_ptr(py_obj);
   35605           0 :         if (value == NULL) {
   35606           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.path");
   35607           0 :                 return -1;
   35608             :         }
   35609           0 :         if (value == Py_None) {
   35610           0 :                 object->in.path = NULL;
   35611             :         } else {
   35612           0 :                 object->in.path = NULL;
   35613             :                 {
   35614             :                         const char *test_str;
   35615             :                         const char *talloc_str;
   35616           0 :                         PyObject *unicode = NULL;
   35617           0 :                         if (PyUnicode_Check(value)) {
   35618           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   35619           0 :                                 if (unicode == NULL) {
   35620           0 :                                         PyErr_NoMemory();
   35621           0 :                                         return -1;
   35622             :                                 }
   35623           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   35624           0 :                         } else if (PyBytes_Check(value)) {
   35625           0 :                                 test_str = PyBytes_AS_STRING(value);
   35626             :                         } else {
   35627           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   35628           0 :                                 return -1;
   35629             :                         }
   35630           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   35631           0 :                         if (unicode != NULL) {
   35632           0 :                                 Py_DECREF(unicode);
   35633             :                         }
   35634           0 :                         if (talloc_str == NULL) {
   35635           0 :                                 PyErr_NoMemory();
   35636           0 :                                 return -1;
   35637             :                         }
   35638           0 :                         object->in.path = talloc_str;
   35639             :                 }
   35640             :         }
   35641           0 :         return 0;
   35642             : }
   35643             : 
   35644           0 : static PyObject *py_srvsvc_NetConnEnum_in_get_info_ctr(PyObject *obj, void *closure)
   35645             : {
   35646           0 :         struct srvsvc_NetConnEnum *object = (struct srvsvc_NetConnEnum *)pytalloc_get_ptr(obj);
   35647             :         PyObject *py_info_ctr;
   35648           0 :         if (object->in.info_ctr == NULL) {
   35649           0 :                 Py_RETURN_NONE;
   35650             :         }
   35651           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetConnInfoCtr_Type, object->in.info_ctr, object->in.info_ctr);
   35652           0 :         return py_info_ctr;
   35653             : }
   35654             : 
   35655           0 : static int py_srvsvc_NetConnEnum_in_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   35656             : {
   35657           0 :         struct srvsvc_NetConnEnum *object = (struct srvsvc_NetConnEnum *)pytalloc_get_ptr(py_obj);
   35658           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info_ctr));
   35659           0 :         if (value == NULL) {
   35660           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.info_ctr");
   35661           0 :                 return -1;
   35662             :         }
   35663           0 :         object->in.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info_ctr);
   35664           0 :         if (object->in.info_ctr == NULL) {
   35665           0 :                 PyErr_NoMemory();
   35666           0 :                 return -1;
   35667             :         }
   35668           0 :         PY_CHECK_TYPE(&srvsvc_NetConnInfoCtr_Type, value, return -1;);
   35669           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   35670           0 :                 PyErr_NoMemory();
   35671           0 :                 return -1;
   35672             :         }
   35673           0 :         object->in.info_ctr = (struct srvsvc_NetConnInfoCtr *)pytalloc_get_ptr(value);
   35674           0 :         return 0;
   35675             : }
   35676             : 
   35677           0 : static PyObject *py_srvsvc_NetConnEnum_out_get_info_ctr(PyObject *obj, void *closure)
   35678             : {
   35679           0 :         struct srvsvc_NetConnEnum *object = (struct srvsvc_NetConnEnum *)pytalloc_get_ptr(obj);
   35680             :         PyObject *py_info_ctr;
   35681           0 :         if (object->out.info_ctr == NULL) {
   35682           0 :                 Py_RETURN_NONE;
   35683             :         }
   35684           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetConnInfoCtr_Type, object->out.info_ctr, object->out.info_ctr);
   35685           0 :         return py_info_ctr;
   35686             : }
   35687             : 
   35688           0 : static int py_srvsvc_NetConnEnum_out_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   35689             : {
   35690           0 :         struct srvsvc_NetConnEnum *object = (struct srvsvc_NetConnEnum *)pytalloc_get_ptr(py_obj);
   35691           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info_ctr));
   35692           0 :         if (value == NULL) {
   35693           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info_ctr");
   35694           0 :                 return -1;
   35695             :         }
   35696           0 :         object->out.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info_ctr);
   35697           0 :         if (object->out.info_ctr == NULL) {
   35698           0 :                 PyErr_NoMemory();
   35699           0 :                 return -1;
   35700             :         }
   35701           0 :         PY_CHECK_TYPE(&srvsvc_NetConnInfoCtr_Type, value, return -1;);
   35702           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   35703           0 :                 PyErr_NoMemory();
   35704           0 :                 return -1;
   35705             :         }
   35706           0 :         object->out.info_ctr = (struct srvsvc_NetConnInfoCtr *)pytalloc_get_ptr(value);
   35707           0 :         return 0;
   35708             : }
   35709             : 
   35710           0 : static PyObject *py_srvsvc_NetConnEnum_in_get_max_buffer(PyObject *obj, void *closure)
   35711             : {
   35712           0 :         struct srvsvc_NetConnEnum *object = (struct srvsvc_NetConnEnum *)pytalloc_get_ptr(obj);
   35713             :         PyObject *py_max_buffer;
   35714           0 :         py_max_buffer = PyLong_FromUnsignedLongLong((uint32_t)object->in.max_buffer);
   35715           0 :         return py_max_buffer;
   35716             : }
   35717             : 
   35718           0 : static int py_srvsvc_NetConnEnum_in_set_max_buffer(PyObject *py_obj, PyObject *value, void *closure)
   35719             : {
   35720           0 :         struct srvsvc_NetConnEnum *object = (struct srvsvc_NetConnEnum *)pytalloc_get_ptr(py_obj);
   35721           0 :         if (value == NULL) {
   35722           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.max_buffer");
   35723           0 :                 return -1;
   35724             :         }
   35725             :         {
   35726           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.max_buffer));
   35727           0 :                 if (PyLong_Check(value)) {
   35728             :                         unsigned long long test_var;
   35729           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   35730           0 :                         if (PyErr_Occurred() != NULL) {
   35731           0 :                                 return -1;
   35732             :                         }
   35733           0 :                         if (test_var > uint_max) {
   35734           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   35735             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35736           0 :                                 return -1;
   35737             :                         }
   35738           0 :                         object->in.max_buffer = test_var;
   35739             :                 } else {
   35740           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   35741             :                           PyLong_Type.tp_name);
   35742           0 :                         return -1;
   35743             :                 }
   35744             :         }
   35745           0 :         return 0;
   35746             : }
   35747             : 
   35748           0 : static PyObject *py_srvsvc_NetConnEnum_out_get_totalentries(PyObject *obj, void *closure)
   35749             : {
   35750           0 :         struct srvsvc_NetConnEnum *object = (struct srvsvc_NetConnEnum *)pytalloc_get_ptr(obj);
   35751             :         PyObject *py_totalentries;
   35752           0 :         if (object->out.totalentries == NULL) {
   35753           0 :                 Py_RETURN_NONE;
   35754             :         }
   35755           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)*object->out.totalentries);
   35756           0 :         return py_totalentries;
   35757             : }
   35758             : 
   35759           0 : static int py_srvsvc_NetConnEnum_out_set_totalentries(PyObject *py_obj, PyObject *value, void *closure)
   35760             : {
   35761           0 :         struct srvsvc_NetConnEnum *object = (struct srvsvc_NetConnEnum *)pytalloc_get_ptr(py_obj);
   35762           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.totalentries));
   35763           0 :         if (value == NULL) {
   35764           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.totalentries");
   35765           0 :                 return -1;
   35766             :         }
   35767           0 :         object->out.totalentries = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.totalentries);
   35768           0 :         if (object->out.totalentries == NULL) {
   35769           0 :                 PyErr_NoMemory();
   35770           0 :                 return -1;
   35771             :         }
   35772             :         {
   35773           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.totalentries));
   35774           0 :                 if (PyLong_Check(value)) {
   35775             :                         unsigned long long test_var;
   35776           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   35777           0 :                         if (PyErr_Occurred() != NULL) {
   35778           0 :                                 return -1;
   35779             :                         }
   35780           0 :                         if (test_var > uint_max) {
   35781           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   35782             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35783           0 :                                 return -1;
   35784             :                         }
   35785           0 :                         *object->out.totalentries = test_var;
   35786             :                 } else {
   35787           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   35788             :                           PyLong_Type.tp_name);
   35789           0 :                         return -1;
   35790             :                 }
   35791             :         }
   35792           0 :         return 0;
   35793             : }
   35794             : 
   35795           0 : static PyObject *py_srvsvc_NetConnEnum_in_get_resume_handle(PyObject *obj, void *closure)
   35796             : {
   35797           0 :         struct srvsvc_NetConnEnum *object = (struct srvsvc_NetConnEnum *)pytalloc_get_ptr(obj);
   35798             :         PyObject *py_resume_handle;
   35799           0 :         if (object->in.resume_handle == NULL) {
   35800           0 :                 Py_RETURN_NONE;
   35801             :         }
   35802           0 :         if (object->in.resume_handle == NULL) {
   35803           0 :                 py_resume_handle = Py_None;
   35804           0 :                 Py_INCREF(py_resume_handle);
   35805             :         } else {
   35806           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)*object->in.resume_handle);
   35807             :         }
   35808           0 :         return py_resume_handle;
   35809             : }
   35810             : 
   35811           0 : static int py_srvsvc_NetConnEnum_in_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   35812             : {
   35813           0 :         struct srvsvc_NetConnEnum *object = (struct srvsvc_NetConnEnum *)pytalloc_get_ptr(py_obj);
   35814           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.resume_handle));
   35815           0 :         if (value == NULL) {
   35816           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.resume_handle");
   35817           0 :                 return -1;
   35818             :         }
   35819           0 :         if (value == Py_None) {
   35820           0 :                 object->in.resume_handle = NULL;
   35821             :         } else {
   35822           0 :                 object->in.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.resume_handle);
   35823           0 :                 if (object->in.resume_handle == NULL) {
   35824           0 :                         PyErr_NoMemory();
   35825           0 :                         return -1;
   35826             :                 }
   35827             :                 {
   35828           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.resume_handle));
   35829           0 :                         if (PyLong_Check(value)) {
   35830             :                                 unsigned long long test_var;
   35831           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   35832           0 :                                 if (PyErr_Occurred() != NULL) {
   35833           0 :                                         return -1;
   35834             :                                 }
   35835           0 :                                 if (test_var > uint_max) {
   35836           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   35837             :                                           PyLong_Type.tp_name, uint_max, test_var);
   35838           0 :                                         return -1;
   35839             :                                 }
   35840           0 :                                 *object->in.resume_handle = test_var;
   35841             :                         } else {
   35842           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   35843             :                                   PyLong_Type.tp_name);
   35844           0 :                                 return -1;
   35845             :                         }
   35846             :                 }
   35847             :         }
   35848           0 :         return 0;
   35849             : }
   35850             : 
   35851           0 : static PyObject *py_srvsvc_NetConnEnum_out_get_resume_handle(PyObject *obj, void *closure)
   35852             : {
   35853           0 :         struct srvsvc_NetConnEnum *object = (struct srvsvc_NetConnEnum *)pytalloc_get_ptr(obj);
   35854             :         PyObject *py_resume_handle;
   35855           0 :         if (object->out.resume_handle == NULL) {
   35856           0 :                 Py_RETURN_NONE;
   35857             :         }
   35858           0 :         if (object->out.resume_handle == NULL) {
   35859           0 :                 py_resume_handle = Py_None;
   35860           0 :                 Py_INCREF(py_resume_handle);
   35861             :         } else {
   35862           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)*object->out.resume_handle);
   35863             :         }
   35864           0 :         return py_resume_handle;
   35865             : }
   35866             : 
   35867           0 : static int py_srvsvc_NetConnEnum_out_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   35868             : {
   35869           0 :         struct srvsvc_NetConnEnum *object = (struct srvsvc_NetConnEnum *)pytalloc_get_ptr(py_obj);
   35870           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.resume_handle));
   35871           0 :         if (value == NULL) {
   35872           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.resume_handle");
   35873           0 :                 return -1;
   35874             :         }
   35875           0 :         if (value == Py_None) {
   35876           0 :                 object->out.resume_handle = NULL;
   35877             :         } else {
   35878           0 :                 object->out.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.resume_handle);
   35879           0 :                 if (object->out.resume_handle == NULL) {
   35880           0 :                         PyErr_NoMemory();
   35881           0 :                         return -1;
   35882             :                 }
   35883             :                 {
   35884           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.resume_handle));
   35885           0 :                         if (PyLong_Check(value)) {
   35886             :                                 unsigned long long test_var;
   35887           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   35888           0 :                                 if (PyErr_Occurred() != NULL) {
   35889           0 :                                         return -1;
   35890             :                                 }
   35891           0 :                                 if (test_var > uint_max) {
   35892           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   35893             :                                           PyLong_Type.tp_name, uint_max, test_var);
   35894           0 :                                         return -1;
   35895             :                                 }
   35896           0 :                                 *object->out.resume_handle = test_var;
   35897             :                         } else {
   35898           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   35899             :                                   PyLong_Type.tp_name);
   35900           0 :                                 return -1;
   35901             :                         }
   35902             :                 }
   35903             :         }
   35904           0 :         return 0;
   35905             : }
   35906             : 
   35907           0 : static PyObject *py_srvsvc_NetConnEnum_get_result(PyObject *obj, void *closure)
   35908             : {
   35909           0 :         struct srvsvc_NetConnEnum *object = (struct srvsvc_NetConnEnum *)pytalloc_get_ptr(obj);
   35910             :         PyObject *py_result;
   35911           0 :         py_result = PyErr_FromWERROR(object->out.result);
   35912           0 :         return py_result;
   35913             : }
   35914             : 
   35915           0 : static int py_srvsvc_NetConnEnum_set_result(PyObject *py_obj, PyObject *value, void *closure)
   35916             : {
   35917           0 :         struct srvsvc_NetConnEnum *object = (struct srvsvc_NetConnEnum *)pytalloc_get_ptr(py_obj);
   35918           0 :         if (value == NULL) {
   35919           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   35920           0 :                 return -1;
   35921             :         }
   35922           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   35923           0 :         return 0;
   35924             : }
   35925             : 
   35926             : static PyGetSetDef py_srvsvc_NetConnEnum_getsetters[] = {
   35927             :         {
   35928             :                 .name = discard_const_p(char, "in_server_unc"),
   35929             :                 .get = py_srvsvc_NetConnEnum_in_get_server_unc,
   35930             :                 .set = py_srvsvc_NetConnEnum_in_set_server_unc,
   35931             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   35932             :         },
   35933             :         {
   35934             :                 .name = discard_const_p(char, "in_path"),
   35935             :                 .get = py_srvsvc_NetConnEnum_in_get_path,
   35936             :                 .set = py_srvsvc_NetConnEnum_in_set_path,
   35937             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   35938             :         },
   35939             :         {
   35940             :                 .name = discard_const_p(char, "in_info_ctr"),
   35941             :                 .get = py_srvsvc_NetConnEnum_in_get_info_ctr,
   35942             :                 .set = py_srvsvc_NetConnEnum_in_set_info_ctr,
   35943             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetConnInfoCtr")
   35944             :         },
   35945             :         {
   35946             :                 .name = discard_const_p(char, "out_info_ctr"),
   35947             :                 .get = py_srvsvc_NetConnEnum_out_get_info_ctr,
   35948             :                 .set = py_srvsvc_NetConnEnum_out_set_info_ctr,
   35949             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetConnInfoCtr")
   35950             :         },
   35951             :         {
   35952             :                 .name = discard_const_p(char, "in_max_buffer"),
   35953             :                 .get = py_srvsvc_NetConnEnum_in_get_max_buffer,
   35954             :                 .set = py_srvsvc_NetConnEnum_in_set_max_buffer,
   35955             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35956             :         },
   35957             :         {
   35958             :                 .name = discard_const_p(char, "out_totalentries"),
   35959             :                 .get = py_srvsvc_NetConnEnum_out_get_totalentries,
   35960             :                 .set = py_srvsvc_NetConnEnum_out_set_totalentries,
   35961             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35962             :         },
   35963             :         {
   35964             :                 .name = discard_const_p(char, "in_resume_handle"),
   35965             :                 .get = py_srvsvc_NetConnEnum_in_get_resume_handle,
   35966             :                 .set = py_srvsvc_NetConnEnum_in_set_resume_handle,
   35967             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35968             :         },
   35969             :         {
   35970             :                 .name = discard_const_p(char, "out_resume_handle"),
   35971             :                 .get = py_srvsvc_NetConnEnum_out_get_resume_handle,
   35972             :                 .set = py_srvsvc_NetConnEnum_out_set_resume_handle,
   35973             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35974             :         },
   35975             :         {
   35976             :                 .name = discard_const_p(char, "result"),
   35977             :                 .get = py_srvsvc_NetConnEnum_get_result,
   35978             :                 .set = py_srvsvc_NetConnEnum_set_result,
   35979             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   35980             :         },
   35981             :         { .name = NULL }
   35982             : };
   35983             : 
   35984           0 : static PyObject *py_srvsvc_NetConnEnum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   35985             : {
   35986           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetConnEnum, type);
   35987           0 :         struct srvsvc_NetConnEnum *_self = (struct srvsvc_NetConnEnum *)pytalloc_get_ptr(self);
   35988           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   35989           0 :         _self->in.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetConnInfoCtr);
   35990           0 :         _self->out.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetConnInfoCtr);
   35991           0 :         _self->out.totalentries = talloc_zero(mem_ctx, uint32_t);
   35992           0 :         return self;
   35993             : }
   35994             : 
   35995           0 : static PyObject *py_srvsvc_NetConnEnum_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   35996             : {
   35997             : 
   35998             : 
   35999           0 :         return PyLong_FromLong(8);
   36000             : }
   36001             : 
   36002           0 : static PyObject *py_srvsvc_NetConnEnum_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   36003             : {
   36004           0 :         const struct ndr_interface_call *call = NULL;
   36005           0 :         struct srvsvc_NetConnEnum *object = (struct srvsvc_NetConnEnum *)pytalloc_get_ptr(py_obj);
   36006           0 :         PyObject *ret = NULL;
   36007           0 :         struct ndr_push *push = NULL;
   36008             :         DATA_BLOB blob;
   36009             :         enum ndr_err_code err;
   36010             : 
   36011           0 :         if (ndr_table_srvsvc.num_calls < 9) {
   36012           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetConnEnum_ndr_pack");
   36013           0 :                 return NULL;
   36014             :         }
   36015           0 :         call = &ndr_table_srvsvc.calls[8];
   36016             : 
   36017           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   36018           0 :         if (push == NULL) {
   36019           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   36020           0 :                 return NULL;
   36021             :         }
   36022             : 
   36023           0 :         push->flags |= ndr_push_flags;
   36024             : 
   36025           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   36026           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   36027           0 :                 TALLOC_FREE(push);
   36028           0 :                 PyErr_SetNdrError(err);
   36029           0 :                 return NULL;
   36030             :         }
   36031           0 :         blob = ndr_push_blob(push);
   36032           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   36033           0 :         TALLOC_FREE(push);
   36034           0 :         return ret;
   36035             : }
   36036             : 
   36037           0 : static PyObject *py_srvsvc_NetConnEnum_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36038             : {
   36039           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   36040           0 :         PyObject *bigendian_obj = NULL;
   36041           0 :         PyObject *ndr64_obj = NULL;
   36042           0 :         uint32_t ndr_push_flags = 0;
   36043             : 
   36044           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   36045             :                 discard_const_p(char *, kwnames),
   36046             :                 &bigendian_obj,
   36047             :                 &ndr64_obj)) {
   36048           0 :                 return NULL;
   36049             :         }
   36050             : 
   36051           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36052           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   36053             :         }
   36054           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36055           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   36056             :         }
   36057             : 
   36058           0 :         return py_srvsvc_NetConnEnum_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   36059             : }
   36060             : 
   36061           0 : static PyObject *py_srvsvc_NetConnEnum_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36062             : {
   36063           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   36064           0 :         PyObject *bigendian_obj = NULL;
   36065           0 :         PyObject *ndr64_obj = NULL;
   36066           0 :         uint32_t ndr_push_flags = 0;
   36067             : 
   36068           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   36069             :                 discard_const_p(char *, kwnames),
   36070             :                 &bigendian_obj,
   36071             :                 &ndr64_obj)) {
   36072           0 :                 return NULL;
   36073             :         }
   36074             : 
   36075           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36076           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   36077             :         }
   36078           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36079           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   36080             :         }
   36081             : 
   36082           0 :         return py_srvsvc_NetConnEnum_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   36083             : }
   36084             : 
   36085           0 : static PyObject *py_srvsvc_NetConnEnum_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   36086             : {
   36087           0 :         const struct ndr_interface_call *call = NULL;
   36088           0 :         struct srvsvc_NetConnEnum *object = (struct srvsvc_NetConnEnum *)pytalloc_get_ptr(py_obj);
   36089           0 :         struct ndr_pull *pull = NULL;
   36090             :         enum ndr_err_code err;
   36091             : 
   36092           0 :         if (ndr_table_srvsvc.num_calls < 9) {
   36093           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetConnEnum_ndr_unpack");
   36094           0 :                 return NULL;
   36095             :         }
   36096           0 :         call = &ndr_table_srvsvc.calls[8];
   36097             : 
   36098           0 :         pull = ndr_pull_init_blob(blob, object);
   36099           0 :         if (pull == NULL) {
   36100           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   36101           0 :                 return NULL;
   36102             :         }
   36103             : 
   36104           0 :         pull->flags |= ndr_pull_flags;
   36105             : 
   36106           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   36107           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   36108           0 :                 TALLOC_FREE(pull);
   36109           0 :                 PyErr_SetNdrError(err);
   36110           0 :                 return NULL;
   36111             :         }
   36112           0 :         if (!allow_remaining) {
   36113             :                 uint32_t highest_ofs;
   36114             : 
   36115           0 :                 if (pull->offset > pull->relative_highest_offset) {
   36116           0 :                         highest_ofs = pull->offset;
   36117             :                 } else {
   36118           0 :                         highest_ofs = pull->relative_highest_offset;
   36119             :                 }
   36120           0 :                 if (highest_ofs < pull->data_size) {
   36121           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   36122             :                                 "not all bytes consumed ofs[%u] size[%u]",
   36123             :                                 highest_ofs, pull->data_size);
   36124           0 :                         TALLOC_FREE(pull);
   36125           0 :                         PyErr_SetNdrError(err);
   36126           0 :                         return NULL;
   36127             :                 }
   36128             :         }
   36129             : 
   36130           0 :         TALLOC_FREE(pull);
   36131           0 :         Py_RETURN_NONE;
   36132             : }
   36133             : 
   36134           0 : static PyObject *py_srvsvc_NetConnEnum_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36135             : {
   36136             :         DATA_BLOB blob;
   36137           0 :         Py_ssize_t blob_length = 0;
   36138           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   36139           0 :         PyObject *bigendian_obj = NULL;
   36140           0 :         PyObject *ndr64_obj = NULL;
   36141           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   36142           0 :         PyObject *allow_remaining_obj = NULL;
   36143           0 :         bool allow_remaining = false;
   36144             : 
   36145           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   36146             :                 discard_const_p(char *, kwnames),
   36147             :                 &blob.data, &blob_length,
   36148             :                 &bigendian_obj,
   36149             :                 &ndr64_obj,
   36150             :                 &allow_remaining_obj)) {
   36151           0 :                 return NULL;
   36152             :         }
   36153           0 :         blob.length = blob_length;
   36154             : 
   36155           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36156           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   36157             :         }
   36158           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36159           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   36160             :         }
   36161             : 
   36162           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   36163           0 :                 allow_remaining = true;
   36164             :         }
   36165             : 
   36166           0 :         return py_srvsvc_NetConnEnum_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   36167             : }
   36168             : 
   36169           0 : static PyObject *py_srvsvc_NetConnEnum_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36170             : {
   36171             :         DATA_BLOB blob;
   36172           0 :         Py_ssize_t blob_length = 0;
   36173           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   36174           0 :         PyObject *bigendian_obj = NULL;
   36175           0 :         PyObject *ndr64_obj = NULL;
   36176           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   36177           0 :         PyObject *allow_remaining_obj = NULL;
   36178           0 :         bool allow_remaining = false;
   36179             : 
   36180           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   36181             :                 discard_const_p(char *, kwnames),
   36182             :                 &blob.data, &blob_length,
   36183             :                 &bigendian_obj,
   36184             :                 &ndr64_obj,
   36185             :                 &allow_remaining_obj)) {
   36186           0 :                 return NULL;
   36187             :         }
   36188           0 :         blob.length = blob_length;
   36189             : 
   36190           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36191           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   36192             :         }
   36193           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36194           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   36195             :         }
   36196             : 
   36197           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   36198           0 :                 allow_remaining = true;
   36199             :         }
   36200             : 
   36201           0 :         return py_srvsvc_NetConnEnum_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   36202             : }
   36203             : 
   36204           0 : static PyObject *py_srvsvc_NetConnEnum_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   36205             : {
   36206           0 :         const struct ndr_interface_call *call = NULL;
   36207           0 :         struct srvsvc_NetConnEnum *object = (struct srvsvc_NetConnEnum *)pytalloc_get_ptr(py_obj);
   36208             :         PyObject *ret;
   36209             :         char *retstr;
   36210             : 
   36211           0 :         if (ndr_table_srvsvc.num_calls < 9) {
   36212           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetConnEnum_ndr_print");
   36213           0 :                 return NULL;
   36214             :         }
   36215           0 :         call = &ndr_table_srvsvc.calls[8];
   36216             : 
   36217           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   36218           0 :         ret = PyUnicode_FromString(retstr);
   36219           0 :         TALLOC_FREE(retstr);
   36220             : 
   36221           0 :         return ret;
   36222             : }
   36223             : 
   36224           0 : static PyObject *py_srvsvc_NetConnEnum_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   36225             : {
   36226           0 :         return py_srvsvc_NetConnEnum_ndr_print(py_obj, "srvsvc_NetConnEnum_in", NDR_IN);
   36227             : }
   36228             : 
   36229           0 : static PyObject *py_srvsvc_NetConnEnum_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   36230             : {
   36231           0 :         return py_srvsvc_NetConnEnum_ndr_print(py_obj, "srvsvc_NetConnEnum_out", NDR_OUT);
   36232             : }
   36233             : 
   36234             : static PyMethodDef py_srvsvc_NetConnEnum_methods[] = {
   36235             :         { "opnum", (PyCFunction)py_srvsvc_NetConnEnum_ndr_opnum, METH_NOARGS|METH_CLASS,
   36236             :                 "srvsvc.NetConnEnum.opnum() -> 8 (0x08) " },
   36237             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetConnEnum_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   36238             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   36239             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetConnEnum_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   36240             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   36241             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetConnEnum_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   36242             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   36243             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetConnEnum_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   36244             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   36245             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetConnEnum_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   36246             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetConnEnum_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   36247             :         { NULL, NULL, 0, NULL }
   36248             : };
   36249             : 
   36250             : 
   36251             : static PyTypeObject srvsvc_NetConnEnum_Type = {
   36252             :         PyVarObject_HEAD_INIT(NULL, 0)
   36253             :         .tp_name = "srvsvc.NetConnEnum",
   36254             :         .tp_getset = py_srvsvc_NetConnEnum_getsetters,
   36255             :         .tp_methods = py_srvsvc_NetConnEnum_methods,
   36256             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   36257             :         .tp_new = py_srvsvc_NetConnEnum_new,
   36258             : };
   36259             : 
   36260           0 : static bool pack_py_srvsvc_NetConnEnum_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetConnEnum *r)
   36261             : {
   36262             :         PyObject *py_server_unc;
   36263             :         PyObject *py_path;
   36264             :         PyObject *py_info_ctr;
   36265             :         PyObject *py_max_buffer;
   36266             :         PyObject *py_resume_handle;
   36267           0 :         const char *kwnames[] = {
   36268             :                 "server_unc", "path", "info_ctr", "max_buffer", "resume_handle", NULL
   36269             :         };
   36270             : 
   36271           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:srvsvc_NetConnEnum", discard_const_p(char *, kwnames), &py_server_unc, &py_path, &py_info_ctr, &py_max_buffer, &py_resume_handle)) {
   36272           0 :                 return false;
   36273             :         }
   36274             : 
   36275           0 :         if (py_server_unc == NULL) {
   36276           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   36277           0 :                 return false;
   36278             :         }
   36279           0 :         if (py_server_unc == Py_None) {
   36280           0 :                 r->in.server_unc = NULL;
   36281             :         } else {
   36282           0 :                 r->in.server_unc = NULL;
   36283             :                 {
   36284             :                         const char *test_str;
   36285             :                         const char *talloc_str;
   36286           0 :                         PyObject *unicode = NULL;
   36287           0 :                         if (PyUnicode_Check(py_server_unc)) {
   36288           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   36289           0 :                                 if (unicode == NULL) {
   36290           0 :                                         PyErr_NoMemory();
   36291           0 :                                         return false;
   36292             :                                 }
   36293           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   36294           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   36295           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   36296             :                         } else {
   36297           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   36298           0 :                                 return false;
   36299             :                         }
   36300           0 :                         talloc_str = talloc_strdup(r, test_str);
   36301           0 :                         if (unicode != NULL) {
   36302           0 :                                 Py_DECREF(unicode);
   36303             :                         }
   36304           0 :                         if (talloc_str == NULL) {
   36305           0 :                                 PyErr_NoMemory();
   36306           0 :                                 return false;
   36307             :                         }
   36308           0 :                         r->in.server_unc = talloc_str;
   36309             :                 }
   36310             :         }
   36311           0 :         if (py_path == NULL) {
   36312           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.path");
   36313           0 :                 return false;
   36314             :         }
   36315           0 :         if (py_path == Py_None) {
   36316           0 :                 r->in.path = NULL;
   36317             :         } else {
   36318           0 :                 r->in.path = NULL;
   36319             :                 {
   36320             :                         const char *test_str;
   36321             :                         const char *talloc_str;
   36322           0 :                         PyObject *unicode = NULL;
   36323           0 :                         if (PyUnicode_Check(py_path)) {
   36324           0 :                                 unicode = PyUnicode_AsEncodedString(py_path, "utf-8", "ignore");
   36325           0 :                                 if (unicode == NULL) {
   36326           0 :                                         PyErr_NoMemory();
   36327           0 :                                         return false;
   36328             :                                 }
   36329           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   36330           0 :                         } else if (PyBytes_Check(py_path)) {
   36331           0 :                                 test_str = PyBytes_AS_STRING(py_path);
   36332             :                         } else {
   36333           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_path)->tp_name);
   36334           0 :                                 return false;
   36335             :                         }
   36336           0 :                         talloc_str = talloc_strdup(r, test_str);
   36337           0 :                         if (unicode != NULL) {
   36338           0 :                                 Py_DECREF(unicode);
   36339             :                         }
   36340           0 :                         if (talloc_str == NULL) {
   36341           0 :                                 PyErr_NoMemory();
   36342           0 :                                 return false;
   36343             :                         }
   36344           0 :                         r->in.path = talloc_str;
   36345             :                 }
   36346             :         }
   36347           0 :         if (py_info_ctr == NULL) {
   36348           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info_ctr");
   36349           0 :                 return false;
   36350             :         }
   36351           0 :         r->in.info_ctr = talloc_ptrtype(r, r->in.info_ctr);
   36352           0 :         if (r->in.info_ctr == NULL) {
   36353           0 :                 PyErr_NoMemory();
   36354           0 :                 return false;
   36355             :         }
   36356           0 :         PY_CHECK_TYPE(&srvsvc_NetConnInfoCtr_Type, py_info_ctr, return false;);
   36357           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_info_ctr)) == NULL) {
   36358           0 :                 PyErr_NoMemory();
   36359           0 :                 return false;
   36360             :         }
   36361           0 :         r->in.info_ctr = (struct srvsvc_NetConnInfoCtr *)pytalloc_get_ptr(py_info_ctr);
   36362           0 :         if (py_max_buffer == NULL) {
   36363           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.max_buffer");
   36364           0 :                 return false;
   36365             :         }
   36366             :         {
   36367           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
   36368           0 :                 if (PyLong_Check(py_max_buffer)) {
   36369             :                         unsigned long long test_var;
   36370           0 :                         test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
   36371           0 :                         if (PyErr_Occurred() != NULL) {
   36372           0 :                                 return false;
   36373             :                         }
   36374           0 :                         if (test_var > uint_max) {
   36375           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   36376             :                                   PyLong_Type.tp_name, uint_max, test_var);
   36377           0 :                                 return false;
   36378             :                         }
   36379           0 :                         r->in.max_buffer = test_var;
   36380             :                 } else {
   36381           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   36382             :                           PyLong_Type.tp_name);
   36383           0 :                         return false;
   36384             :                 }
   36385             :         }
   36386           0 :         if (py_resume_handle == NULL) {
   36387           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.resume_handle");
   36388           0 :                 return false;
   36389             :         }
   36390           0 :         if (py_resume_handle == Py_None) {
   36391           0 :                 r->in.resume_handle = NULL;
   36392             :         } else {
   36393           0 :                 r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
   36394           0 :                 if (r->in.resume_handle == NULL) {
   36395           0 :                         PyErr_NoMemory();
   36396           0 :                         return false;
   36397             :                 }
   36398             :                 {
   36399           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
   36400           0 :                         if (PyLong_Check(py_resume_handle)) {
   36401             :                                 unsigned long long test_var;
   36402           0 :                                 test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
   36403           0 :                                 if (PyErr_Occurred() != NULL) {
   36404           0 :                                         return false;
   36405             :                                 }
   36406           0 :                                 if (test_var > uint_max) {
   36407           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   36408             :                                           PyLong_Type.tp_name, uint_max, test_var);
   36409           0 :                                         return false;
   36410             :                                 }
   36411           0 :                                 *r->in.resume_handle = test_var;
   36412             :                         } else {
   36413           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   36414             :                                   PyLong_Type.tp_name);
   36415           0 :                                 return false;
   36416             :                         }
   36417             :                 }
   36418             :         }
   36419           0 :         return true;
   36420             : }
   36421             : 
   36422           0 : static PyObject *unpack_py_srvsvc_NetConnEnum_args_out(struct srvsvc_NetConnEnum *r)
   36423             : {
   36424             :         PyObject *result;
   36425             :         PyObject *py_info_ctr;
   36426             :         PyObject *py_totalentries;
   36427             :         PyObject *py_resume_handle;
   36428           0 :         result = PyTuple_New(3);
   36429           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetConnInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
   36430           0 :         PyTuple_SetItem(result, 0, py_info_ctr);
   36431           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)*r->out.totalentries);
   36432           0 :         PyTuple_SetItem(result, 1, py_totalentries);
   36433           0 :         if (r->out.resume_handle == NULL) {
   36434           0 :                 py_resume_handle = Py_None;
   36435           0 :                 Py_INCREF(py_resume_handle);
   36436             :         } else {
   36437           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)*r->out.resume_handle);
   36438             :         }
   36439           0 :         PyTuple_SetItem(result, 2, py_resume_handle);
   36440           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   36441           0 :                 PyErr_SetWERROR(r->out.result);
   36442           0 :                 return NULL;
   36443             :         }
   36444             : 
   36445           0 :         return result;
   36446             : }
   36447             : 
   36448             : 
   36449           0 : static PyObject *py_srvsvc_NetFileEnum_in_get_server_unc(PyObject *obj, void *closure)
   36450             : {
   36451           0 :         struct srvsvc_NetFileEnum *object = (struct srvsvc_NetFileEnum *)pytalloc_get_ptr(obj);
   36452             :         PyObject *py_server_unc;
   36453           0 :         if (object->in.server_unc == NULL) {
   36454           0 :                 Py_RETURN_NONE;
   36455             :         }
   36456           0 :         if (object->in.server_unc == NULL) {
   36457           0 :                 py_server_unc = Py_None;
   36458           0 :                 Py_INCREF(py_server_unc);
   36459             :         } else {
   36460           0 :                 if (object->in.server_unc == NULL) {
   36461           0 :                         py_server_unc = Py_None;
   36462           0 :                         Py_INCREF(py_server_unc);
   36463             :                 } else {
   36464           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   36465             :                 }
   36466             :         }
   36467           0 :         return py_server_unc;
   36468             : }
   36469             : 
   36470           0 : static int py_srvsvc_NetFileEnum_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   36471             : {
   36472           0 :         struct srvsvc_NetFileEnum *object = (struct srvsvc_NetFileEnum *)pytalloc_get_ptr(py_obj);
   36473           0 :         if (value == NULL) {
   36474           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   36475           0 :                 return -1;
   36476             :         }
   36477           0 :         if (value == Py_None) {
   36478           0 :                 object->in.server_unc = NULL;
   36479             :         } else {
   36480           0 :                 object->in.server_unc = NULL;
   36481             :                 {
   36482             :                         const char *test_str;
   36483             :                         const char *talloc_str;
   36484           0 :                         PyObject *unicode = NULL;
   36485           0 :                         if (PyUnicode_Check(value)) {
   36486           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   36487           0 :                                 if (unicode == NULL) {
   36488           0 :                                         PyErr_NoMemory();
   36489           0 :                                         return -1;
   36490             :                                 }
   36491           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   36492           0 :                         } else if (PyBytes_Check(value)) {
   36493           0 :                                 test_str = PyBytes_AS_STRING(value);
   36494             :                         } else {
   36495           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   36496           0 :                                 return -1;
   36497             :                         }
   36498           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   36499           0 :                         if (unicode != NULL) {
   36500           0 :                                 Py_DECREF(unicode);
   36501             :                         }
   36502           0 :                         if (talloc_str == NULL) {
   36503           0 :                                 PyErr_NoMemory();
   36504           0 :                                 return -1;
   36505             :                         }
   36506           0 :                         object->in.server_unc = talloc_str;
   36507             :                 }
   36508             :         }
   36509           0 :         return 0;
   36510             : }
   36511             : 
   36512           0 : static PyObject *py_srvsvc_NetFileEnum_in_get_path(PyObject *obj, void *closure)
   36513             : {
   36514           0 :         struct srvsvc_NetFileEnum *object = (struct srvsvc_NetFileEnum *)pytalloc_get_ptr(obj);
   36515             :         PyObject *py_path;
   36516           0 :         if (object->in.path == NULL) {
   36517           0 :                 Py_RETURN_NONE;
   36518             :         }
   36519           0 :         if (object->in.path == NULL) {
   36520           0 :                 py_path = Py_None;
   36521           0 :                 Py_INCREF(py_path);
   36522             :         } else {
   36523           0 :                 if (object->in.path == NULL) {
   36524           0 :                         py_path = Py_None;
   36525           0 :                         Py_INCREF(py_path);
   36526             :                 } else {
   36527           0 :                         py_path = PyUnicode_Decode(object->in.path, strlen(object->in.path), "utf-8", "ignore");
   36528             :                 }
   36529             :         }
   36530           0 :         return py_path;
   36531             : }
   36532             : 
   36533           0 : static int py_srvsvc_NetFileEnum_in_set_path(PyObject *py_obj, PyObject *value, void *closure)
   36534             : {
   36535           0 :         struct srvsvc_NetFileEnum *object = (struct srvsvc_NetFileEnum *)pytalloc_get_ptr(py_obj);
   36536           0 :         if (value == NULL) {
   36537           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.path");
   36538           0 :                 return -1;
   36539             :         }
   36540           0 :         if (value == Py_None) {
   36541           0 :                 object->in.path = NULL;
   36542             :         } else {
   36543           0 :                 object->in.path = NULL;
   36544             :                 {
   36545             :                         const char *test_str;
   36546             :                         const char *talloc_str;
   36547           0 :                         PyObject *unicode = NULL;
   36548           0 :                         if (PyUnicode_Check(value)) {
   36549           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   36550           0 :                                 if (unicode == NULL) {
   36551           0 :                                         PyErr_NoMemory();
   36552           0 :                                         return -1;
   36553             :                                 }
   36554           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   36555           0 :                         } else if (PyBytes_Check(value)) {
   36556           0 :                                 test_str = PyBytes_AS_STRING(value);
   36557             :                         } else {
   36558           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   36559           0 :                                 return -1;
   36560             :                         }
   36561           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   36562           0 :                         if (unicode != NULL) {
   36563           0 :                                 Py_DECREF(unicode);
   36564             :                         }
   36565           0 :                         if (talloc_str == NULL) {
   36566           0 :                                 PyErr_NoMemory();
   36567           0 :                                 return -1;
   36568             :                         }
   36569           0 :                         object->in.path = talloc_str;
   36570             :                 }
   36571             :         }
   36572           0 :         return 0;
   36573             : }
   36574             : 
   36575           0 : static PyObject *py_srvsvc_NetFileEnum_in_get_user(PyObject *obj, void *closure)
   36576             : {
   36577           0 :         struct srvsvc_NetFileEnum *object = (struct srvsvc_NetFileEnum *)pytalloc_get_ptr(obj);
   36578             :         PyObject *py_user;
   36579           0 :         if (object->in.user == NULL) {
   36580           0 :                 Py_RETURN_NONE;
   36581             :         }
   36582           0 :         if (object->in.user == NULL) {
   36583           0 :                 py_user = Py_None;
   36584           0 :                 Py_INCREF(py_user);
   36585             :         } else {
   36586           0 :                 if (object->in.user == NULL) {
   36587           0 :                         py_user = Py_None;
   36588           0 :                         Py_INCREF(py_user);
   36589             :                 } else {
   36590           0 :                         py_user = PyUnicode_Decode(object->in.user, strlen(object->in.user), "utf-8", "ignore");
   36591             :                 }
   36592             :         }
   36593           0 :         return py_user;
   36594             : }
   36595             : 
   36596           0 : static int py_srvsvc_NetFileEnum_in_set_user(PyObject *py_obj, PyObject *value, void *closure)
   36597             : {
   36598           0 :         struct srvsvc_NetFileEnum *object = (struct srvsvc_NetFileEnum *)pytalloc_get_ptr(py_obj);
   36599           0 :         if (value == NULL) {
   36600           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.user");
   36601           0 :                 return -1;
   36602             :         }
   36603           0 :         if (value == Py_None) {
   36604           0 :                 object->in.user = NULL;
   36605             :         } else {
   36606           0 :                 object->in.user = NULL;
   36607             :                 {
   36608             :                         const char *test_str;
   36609             :                         const char *talloc_str;
   36610           0 :                         PyObject *unicode = NULL;
   36611           0 :                         if (PyUnicode_Check(value)) {
   36612           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   36613           0 :                                 if (unicode == NULL) {
   36614           0 :                                         PyErr_NoMemory();
   36615           0 :                                         return -1;
   36616             :                                 }
   36617           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   36618           0 :                         } else if (PyBytes_Check(value)) {
   36619           0 :                                 test_str = PyBytes_AS_STRING(value);
   36620             :                         } else {
   36621           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   36622           0 :                                 return -1;
   36623             :                         }
   36624           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   36625           0 :                         if (unicode != NULL) {
   36626           0 :                                 Py_DECREF(unicode);
   36627             :                         }
   36628           0 :                         if (talloc_str == NULL) {
   36629           0 :                                 PyErr_NoMemory();
   36630           0 :                                 return -1;
   36631             :                         }
   36632           0 :                         object->in.user = talloc_str;
   36633             :                 }
   36634             :         }
   36635           0 :         return 0;
   36636             : }
   36637             : 
   36638           0 : static PyObject *py_srvsvc_NetFileEnum_in_get_info_ctr(PyObject *obj, void *closure)
   36639             : {
   36640           0 :         struct srvsvc_NetFileEnum *object = (struct srvsvc_NetFileEnum *)pytalloc_get_ptr(obj);
   36641             :         PyObject *py_info_ctr;
   36642           0 :         if (object->in.info_ctr == NULL) {
   36643           0 :                 Py_RETURN_NONE;
   36644             :         }
   36645           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetFileInfoCtr_Type, object->in.info_ctr, object->in.info_ctr);
   36646           0 :         return py_info_ctr;
   36647             : }
   36648             : 
   36649           0 : static int py_srvsvc_NetFileEnum_in_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   36650             : {
   36651           0 :         struct srvsvc_NetFileEnum *object = (struct srvsvc_NetFileEnum *)pytalloc_get_ptr(py_obj);
   36652           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info_ctr));
   36653           0 :         if (value == NULL) {
   36654           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.info_ctr");
   36655           0 :                 return -1;
   36656             :         }
   36657           0 :         object->in.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info_ctr);
   36658           0 :         if (object->in.info_ctr == NULL) {
   36659           0 :                 PyErr_NoMemory();
   36660           0 :                 return -1;
   36661             :         }
   36662           0 :         PY_CHECK_TYPE(&srvsvc_NetFileInfoCtr_Type, value, return -1;);
   36663           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   36664           0 :                 PyErr_NoMemory();
   36665           0 :                 return -1;
   36666             :         }
   36667           0 :         object->in.info_ctr = (struct srvsvc_NetFileInfoCtr *)pytalloc_get_ptr(value);
   36668           0 :         return 0;
   36669             : }
   36670             : 
   36671           0 : static PyObject *py_srvsvc_NetFileEnum_out_get_info_ctr(PyObject *obj, void *closure)
   36672             : {
   36673           0 :         struct srvsvc_NetFileEnum *object = (struct srvsvc_NetFileEnum *)pytalloc_get_ptr(obj);
   36674             :         PyObject *py_info_ctr;
   36675           0 :         if (object->out.info_ctr == NULL) {
   36676           0 :                 Py_RETURN_NONE;
   36677             :         }
   36678           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetFileInfoCtr_Type, object->out.info_ctr, object->out.info_ctr);
   36679           0 :         return py_info_ctr;
   36680             : }
   36681             : 
   36682           0 : static int py_srvsvc_NetFileEnum_out_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   36683             : {
   36684           0 :         struct srvsvc_NetFileEnum *object = (struct srvsvc_NetFileEnum *)pytalloc_get_ptr(py_obj);
   36685           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info_ctr));
   36686           0 :         if (value == NULL) {
   36687           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info_ctr");
   36688           0 :                 return -1;
   36689             :         }
   36690           0 :         object->out.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info_ctr);
   36691           0 :         if (object->out.info_ctr == NULL) {
   36692           0 :                 PyErr_NoMemory();
   36693           0 :                 return -1;
   36694             :         }
   36695           0 :         PY_CHECK_TYPE(&srvsvc_NetFileInfoCtr_Type, value, return -1;);
   36696           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   36697           0 :                 PyErr_NoMemory();
   36698           0 :                 return -1;
   36699             :         }
   36700           0 :         object->out.info_ctr = (struct srvsvc_NetFileInfoCtr *)pytalloc_get_ptr(value);
   36701           0 :         return 0;
   36702             : }
   36703             : 
   36704           0 : static PyObject *py_srvsvc_NetFileEnum_in_get_max_buffer(PyObject *obj, void *closure)
   36705             : {
   36706           0 :         struct srvsvc_NetFileEnum *object = (struct srvsvc_NetFileEnum *)pytalloc_get_ptr(obj);
   36707             :         PyObject *py_max_buffer;
   36708           0 :         py_max_buffer = PyLong_FromUnsignedLongLong((uint32_t)object->in.max_buffer);
   36709           0 :         return py_max_buffer;
   36710             : }
   36711             : 
   36712           0 : static int py_srvsvc_NetFileEnum_in_set_max_buffer(PyObject *py_obj, PyObject *value, void *closure)
   36713             : {
   36714           0 :         struct srvsvc_NetFileEnum *object = (struct srvsvc_NetFileEnum *)pytalloc_get_ptr(py_obj);
   36715           0 :         if (value == NULL) {
   36716           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.max_buffer");
   36717           0 :                 return -1;
   36718             :         }
   36719             :         {
   36720           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.max_buffer));
   36721           0 :                 if (PyLong_Check(value)) {
   36722             :                         unsigned long long test_var;
   36723           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   36724           0 :                         if (PyErr_Occurred() != NULL) {
   36725           0 :                                 return -1;
   36726             :                         }
   36727           0 :                         if (test_var > uint_max) {
   36728           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   36729             :                                   PyLong_Type.tp_name, uint_max, test_var);
   36730           0 :                                 return -1;
   36731             :                         }
   36732           0 :                         object->in.max_buffer = test_var;
   36733             :                 } else {
   36734           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   36735             :                           PyLong_Type.tp_name);
   36736           0 :                         return -1;
   36737             :                 }
   36738             :         }
   36739           0 :         return 0;
   36740             : }
   36741             : 
   36742           0 : static PyObject *py_srvsvc_NetFileEnum_out_get_totalentries(PyObject *obj, void *closure)
   36743             : {
   36744           0 :         struct srvsvc_NetFileEnum *object = (struct srvsvc_NetFileEnum *)pytalloc_get_ptr(obj);
   36745             :         PyObject *py_totalentries;
   36746           0 :         if (object->out.totalentries == NULL) {
   36747           0 :                 Py_RETURN_NONE;
   36748             :         }
   36749           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)*object->out.totalentries);
   36750           0 :         return py_totalentries;
   36751             : }
   36752             : 
   36753           0 : static int py_srvsvc_NetFileEnum_out_set_totalentries(PyObject *py_obj, PyObject *value, void *closure)
   36754             : {
   36755           0 :         struct srvsvc_NetFileEnum *object = (struct srvsvc_NetFileEnum *)pytalloc_get_ptr(py_obj);
   36756           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.totalentries));
   36757           0 :         if (value == NULL) {
   36758           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.totalentries");
   36759           0 :                 return -1;
   36760             :         }
   36761           0 :         object->out.totalentries = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.totalentries);
   36762           0 :         if (object->out.totalentries == NULL) {
   36763           0 :                 PyErr_NoMemory();
   36764           0 :                 return -1;
   36765             :         }
   36766             :         {
   36767           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.totalentries));
   36768           0 :                 if (PyLong_Check(value)) {
   36769             :                         unsigned long long test_var;
   36770           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   36771           0 :                         if (PyErr_Occurred() != NULL) {
   36772           0 :                                 return -1;
   36773             :                         }
   36774           0 :                         if (test_var > uint_max) {
   36775           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   36776             :                                   PyLong_Type.tp_name, uint_max, test_var);
   36777           0 :                                 return -1;
   36778             :                         }
   36779           0 :                         *object->out.totalentries = test_var;
   36780             :                 } else {
   36781           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   36782             :                           PyLong_Type.tp_name);
   36783           0 :                         return -1;
   36784             :                 }
   36785             :         }
   36786           0 :         return 0;
   36787             : }
   36788             : 
   36789           0 : static PyObject *py_srvsvc_NetFileEnum_in_get_resume_handle(PyObject *obj, void *closure)
   36790             : {
   36791           0 :         struct srvsvc_NetFileEnum *object = (struct srvsvc_NetFileEnum *)pytalloc_get_ptr(obj);
   36792             :         PyObject *py_resume_handle;
   36793           0 :         if (object->in.resume_handle == NULL) {
   36794           0 :                 Py_RETURN_NONE;
   36795             :         }
   36796           0 :         if (object->in.resume_handle == NULL) {
   36797           0 :                 py_resume_handle = Py_None;
   36798           0 :                 Py_INCREF(py_resume_handle);
   36799             :         } else {
   36800           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)*object->in.resume_handle);
   36801             :         }
   36802           0 :         return py_resume_handle;
   36803             : }
   36804             : 
   36805           0 : static int py_srvsvc_NetFileEnum_in_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   36806             : {
   36807           0 :         struct srvsvc_NetFileEnum *object = (struct srvsvc_NetFileEnum *)pytalloc_get_ptr(py_obj);
   36808           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.resume_handle));
   36809           0 :         if (value == NULL) {
   36810           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.resume_handle");
   36811           0 :                 return -1;
   36812             :         }
   36813           0 :         if (value == Py_None) {
   36814           0 :                 object->in.resume_handle = NULL;
   36815             :         } else {
   36816           0 :                 object->in.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.resume_handle);
   36817           0 :                 if (object->in.resume_handle == NULL) {
   36818           0 :                         PyErr_NoMemory();
   36819           0 :                         return -1;
   36820             :                 }
   36821             :                 {
   36822           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.resume_handle));
   36823           0 :                         if (PyLong_Check(value)) {
   36824             :                                 unsigned long long test_var;
   36825           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   36826           0 :                                 if (PyErr_Occurred() != NULL) {
   36827           0 :                                         return -1;
   36828             :                                 }
   36829           0 :                                 if (test_var > uint_max) {
   36830           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   36831             :                                           PyLong_Type.tp_name, uint_max, test_var);
   36832           0 :                                         return -1;
   36833             :                                 }
   36834           0 :                                 *object->in.resume_handle = test_var;
   36835             :                         } else {
   36836           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   36837             :                                   PyLong_Type.tp_name);
   36838           0 :                                 return -1;
   36839             :                         }
   36840             :                 }
   36841             :         }
   36842           0 :         return 0;
   36843             : }
   36844             : 
   36845           0 : static PyObject *py_srvsvc_NetFileEnum_out_get_resume_handle(PyObject *obj, void *closure)
   36846             : {
   36847           0 :         struct srvsvc_NetFileEnum *object = (struct srvsvc_NetFileEnum *)pytalloc_get_ptr(obj);
   36848             :         PyObject *py_resume_handle;
   36849           0 :         if (object->out.resume_handle == NULL) {
   36850           0 :                 Py_RETURN_NONE;
   36851             :         }
   36852           0 :         if (object->out.resume_handle == NULL) {
   36853           0 :                 py_resume_handle = Py_None;
   36854           0 :                 Py_INCREF(py_resume_handle);
   36855             :         } else {
   36856           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)*object->out.resume_handle);
   36857             :         }
   36858           0 :         return py_resume_handle;
   36859             : }
   36860             : 
   36861           0 : static int py_srvsvc_NetFileEnum_out_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   36862             : {
   36863           0 :         struct srvsvc_NetFileEnum *object = (struct srvsvc_NetFileEnum *)pytalloc_get_ptr(py_obj);
   36864           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.resume_handle));
   36865           0 :         if (value == NULL) {
   36866           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.resume_handle");
   36867           0 :                 return -1;
   36868             :         }
   36869           0 :         if (value == Py_None) {
   36870           0 :                 object->out.resume_handle = NULL;
   36871             :         } else {
   36872           0 :                 object->out.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.resume_handle);
   36873           0 :                 if (object->out.resume_handle == NULL) {
   36874           0 :                         PyErr_NoMemory();
   36875           0 :                         return -1;
   36876             :                 }
   36877             :                 {
   36878           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.resume_handle));
   36879           0 :                         if (PyLong_Check(value)) {
   36880             :                                 unsigned long long test_var;
   36881           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   36882           0 :                                 if (PyErr_Occurred() != NULL) {
   36883           0 :                                         return -1;
   36884             :                                 }
   36885           0 :                                 if (test_var > uint_max) {
   36886           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   36887             :                                           PyLong_Type.tp_name, uint_max, test_var);
   36888           0 :                                         return -1;
   36889             :                                 }
   36890           0 :                                 *object->out.resume_handle = test_var;
   36891             :                         } else {
   36892           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   36893             :                                   PyLong_Type.tp_name);
   36894           0 :                                 return -1;
   36895             :                         }
   36896             :                 }
   36897             :         }
   36898           0 :         return 0;
   36899             : }
   36900             : 
   36901           0 : static PyObject *py_srvsvc_NetFileEnum_get_result(PyObject *obj, void *closure)
   36902             : {
   36903           0 :         struct srvsvc_NetFileEnum *object = (struct srvsvc_NetFileEnum *)pytalloc_get_ptr(obj);
   36904             :         PyObject *py_result;
   36905           0 :         py_result = PyErr_FromWERROR(object->out.result);
   36906           0 :         return py_result;
   36907             : }
   36908             : 
   36909           0 : static int py_srvsvc_NetFileEnum_set_result(PyObject *py_obj, PyObject *value, void *closure)
   36910             : {
   36911           0 :         struct srvsvc_NetFileEnum *object = (struct srvsvc_NetFileEnum *)pytalloc_get_ptr(py_obj);
   36912           0 :         if (value == NULL) {
   36913           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   36914           0 :                 return -1;
   36915             :         }
   36916           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   36917           0 :         return 0;
   36918             : }
   36919             : 
   36920             : static PyGetSetDef py_srvsvc_NetFileEnum_getsetters[] = {
   36921             :         {
   36922             :                 .name = discard_const_p(char, "in_server_unc"),
   36923             :                 .get = py_srvsvc_NetFileEnum_in_get_server_unc,
   36924             :                 .set = py_srvsvc_NetFileEnum_in_set_server_unc,
   36925             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   36926             :         },
   36927             :         {
   36928             :                 .name = discard_const_p(char, "in_path"),
   36929             :                 .get = py_srvsvc_NetFileEnum_in_get_path,
   36930             :                 .set = py_srvsvc_NetFileEnum_in_set_path,
   36931             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   36932             :         },
   36933             :         {
   36934             :                 .name = discard_const_p(char, "in_user"),
   36935             :                 .get = py_srvsvc_NetFileEnum_in_get_user,
   36936             :                 .set = py_srvsvc_NetFileEnum_in_set_user,
   36937             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   36938             :         },
   36939             :         {
   36940             :                 .name = discard_const_p(char, "in_info_ctr"),
   36941             :                 .get = py_srvsvc_NetFileEnum_in_get_info_ctr,
   36942             :                 .set = py_srvsvc_NetFileEnum_in_set_info_ctr,
   36943             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetFileInfoCtr")
   36944             :         },
   36945             :         {
   36946             :                 .name = discard_const_p(char, "out_info_ctr"),
   36947             :                 .get = py_srvsvc_NetFileEnum_out_get_info_ctr,
   36948             :                 .set = py_srvsvc_NetFileEnum_out_set_info_ctr,
   36949             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetFileInfoCtr")
   36950             :         },
   36951             :         {
   36952             :                 .name = discard_const_p(char, "in_max_buffer"),
   36953             :                 .get = py_srvsvc_NetFileEnum_in_get_max_buffer,
   36954             :                 .set = py_srvsvc_NetFileEnum_in_set_max_buffer,
   36955             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   36956             :         },
   36957             :         {
   36958             :                 .name = discard_const_p(char, "out_totalentries"),
   36959             :                 .get = py_srvsvc_NetFileEnum_out_get_totalentries,
   36960             :                 .set = py_srvsvc_NetFileEnum_out_set_totalentries,
   36961             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   36962             :         },
   36963             :         {
   36964             :                 .name = discard_const_p(char, "in_resume_handle"),
   36965             :                 .get = py_srvsvc_NetFileEnum_in_get_resume_handle,
   36966             :                 .set = py_srvsvc_NetFileEnum_in_set_resume_handle,
   36967             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   36968             :         },
   36969             :         {
   36970             :                 .name = discard_const_p(char, "out_resume_handle"),
   36971             :                 .get = py_srvsvc_NetFileEnum_out_get_resume_handle,
   36972             :                 .set = py_srvsvc_NetFileEnum_out_set_resume_handle,
   36973             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   36974             :         },
   36975             :         {
   36976             :                 .name = discard_const_p(char, "result"),
   36977             :                 .get = py_srvsvc_NetFileEnum_get_result,
   36978             :                 .set = py_srvsvc_NetFileEnum_set_result,
   36979             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   36980             :         },
   36981             :         { .name = NULL }
   36982             : };
   36983             : 
   36984           0 : static PyObject *py_srvsvc_NetFileEnum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   36985             : {
   36986           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetFileEnum, type);
   36987           0 :         struct srvsvc_NetFileEnum *_self = (struct srvsvc_NetFileEnum *)pytalloc_get_ptr(self);
   36988           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   36989           0 :         _self->in.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetFileInfoCtr);
   36990           0 :         _self->out.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetFileInfoCtr);
   36991           0 :         _self->out.totalentries = talloc_zero(mem_ctx, uint32_t);
   36992           0 :         return self;
   36993             : }
   36994             : 
   36995           0 : static PyObject *py_srvsvc_NetFileEnum_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   36996             : {
   36997             : 
   36998             : 
   36999           0 :         return PyLong_FromLong(9);
   37000             : }
   37001             : 
   37002           0 : static PyObject *py_srvsvc_NetFileEnum_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   37003             : {
   37004           0 :         const struct ndr_interface_call *call = NULL;
   37005           0 :         struct srvsvc_NetFileEnum *object = (struct srvsvc_NetFileEnum *)pytalloc_get_ptr(py_obj);
   37006           0 :         PyObject *ret = NULL;
   37007           0 :         struct ndr_push *push = NULL;
   37008             :         DATA_BLOB blob;
   37009             :         enum ndr_err_code err;
   37010             : 
   37011           0 :         if (ndr_table_srvsvc.num_calls < 10) {
   37012           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetFileEnum_ndr_pack");
   37013           0 :                 return NULL;
   37014             :         }
   37015           0 :         call = &ndr_table_srvsvc.calls[9];
   37016             : 
   37017           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   37018           0 :         if (push == NULL) {
   37019           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   37020           0 :                 return NULL;
   37021             :         }
   37022             : 
   37023           0 :         push->flags |= ndr_push_flags;
   37024             : 
   37025           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   37026           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   37027           0 :                 TALLOC_FREE(push);
   37028           0 :                 PyErr_SetNdrError(err);
   37029           0 :                 return NULL;
   37030             :         }
   37031           0 :         blob = ndr_push_blob(push);
   37032           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   37033           0 :         TALLOC_FREE(push);
   37034           0 :         return ret;
   37035             : }
   37036             : 
   37037           0 : static PyObject *py_srvsvc_NetFileEnum_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37038             : {
   37039           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   37040           0 :         PyObject *bigendian_obj = NULL;
   37041           0 :         PyObject *ndr64_obj = NULL;
   37042           0 :         uint32_t ndr_push_flags = 0;
   37043             : 
   37044           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   37045             :                 discard_const_p(char *, kwnames),
   37046             :                 &bigendian_obj,
   37047             :                 &ndr64_obj)) {
   37048           0 :                 return NULL;
   37049             :         }
   37050             : 
   37051           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37052           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   37053             :         }
   37054           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37055           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   37056             :         }
   37057             : 
   37058           0 :         return py_srvsvc_NetFileEnum_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   37059             : }
   37060             : 
   37061           0 : static PyObject *py_srvsvc_NetFileEnum_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37062             : {
   37063           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   37064           0 :         PyObject *bigendian_obj = NULL;
   37065           0 :         PyObject *ndr64_obj = NULL;
   37066           0 :         uint32_t ndr_push_flags = 0;
   37067             : 
   37068           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   37069             :                 discard_const_p(char *, kwnames),
   37070             :                 &bigendian_obj,
   37071             :                 &ndr64_obj)) {
   37072           0 :                 return NULL;
   37073             :         }
   37074             : 
   37075           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37076           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   37077             :         }
   37078           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37079           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   37080             :         }
   37081             : 
   37082           0 :         return py_srvsvc_NetFileEnum_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   37083             : }
   37084             : 
   37085           0 : static PyObject *py_srvsvc_NetFileEnum_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   37086             : {
   37087           0 :         const struct ndr_interface_call *call = NULL;
   37088           0 :         struct srvsvc_NetFileEnum *object = (struct srvsvc_NetFileEnum *)pytalloc_get_ptr(py_obj);
   37089           0 :         struct ndr_pull *pull = NULL;
   37090             :         enum ndr_err_code err;
   37091             : 
   37092           0 :         if (ndr_table_srvsvc.num_calls < 10) {
   37093           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetFileEnum_ndr_unpack");
   37094           0 :                 return NULL;
   37095             :         }
   37096           0 :         call = &ndr_table_srvsvc.calls[9];
   37097             : 
   37098           0 :         pull = ndr_pull_init_blob(blob, object);
   37099           0 :         if (pull == NULL) {
   37100           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   37101           0 :                 return NULL;
   37102             :         }
   37103             : 
   37104           0 :         pull->flags |= ndr_pull_flags;
   37105             : 
   37106           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   37107           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   37108           0 :                 TALLOC_FREE(pull);
   37109           0 :                 PyErr_SetNdrError(err);
   37110           0 :                 return NULL;
   37111             :         }
   37112           0 :         if (!allow_remaining) {
   37113             :                 uint32_t highest_ofs;
   37114             : 
   37115           0 :                 if (pull->offset > pull->relative_highest_offset) {
   37116           0 :                         highest_ofs = pull->offset;
   37117             :                 } else {
   37118           0 :                         highest_ofs = pull->relative_highest_offset;
   37119             :                 }
   37120           0 :                 if (highest_ofs < pull->data_size) {
   37121           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   37122             :                                 "not all bytes consumed ofs[%u] size[%u]",
   37123             :                                 highest_ofs, pull->data_size);
   37124           0 :                         TALLOC_FREE(pull);
   37125           0 :                         PyErr_SetNdrError(err);
   37126           0 :                         return NULL;
   37127             :                 }
   37128             :         }
   37129             : 
   37130           0 :         TALLOC_FREE(pull);
   37131           0 :         Py_RETURN_NONE;
   37132             : }
   37133             : 
   37134           0 : static PyObject *py_srvsvc_NetFileEnum_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37135             : {
   37136             :         DATA_BLOB blob;
   37137           0 :         Py_ssize_t blob_length = 0;
   37138           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   37139           0 :         PyObject *bigendian_obj = NULL;
   37140           0 :         PyObject *ndr64_obj = NULL;
   37141           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   37142           0 :         PyObject *allow_remaining_obj = NULL;
   37143           0 :         bool allow_remaining = false;
   37144             : 
   37145           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   37146             :                 discard_const_p(char *, kwnames),
   37147             :                 &blob.data, &blob_length,
   37148             :                 &bigendian_obj,
   37149             :                 &ndr64_obj,
   37150             :                 &allow_remaining_obj)) {
   37151           0 :                 return NULL;
   37152             :         }
   37153           0 :         blob.length = blob_length;
   37154             : 
   37155           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37156           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   37157             :         }
   37158           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37159           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   37160             :         }
   37161             : 
   37162           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   37163           0 :                 allow_remaining = true;
   37164             :         }
   37165             : 
   37166           0 :         return py_srvsvc_NetFileEnum_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   37167             : }
   37168             : 
   37169           0 : static PyObject *py_srvsvc_NetFileEnum_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37170             : {
   37171             :         DATA_BLOB blob;
   37172           0 :         Py_ssize_t blob_length = 0;
   37173           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   37174           0 :         PyObject *bigendian_obj = NULL;
   37175           0 :         PyObject *ndr64_obj = NULL;
   37176           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   37177           0 :         PyObject *allow_remaining_obj = NULL;
   37178           0 :         bool allow_remaining = false;
   37179             : 
   37180           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   37181             :                 discard_const_p(char *, kwnames),
   37182             :                 &blob.data, &blob_length,
   37183             :                 &bigendian_obj,
   37184             :                 &ndr64_obj,
   37185             :                 &allow_remaining_obj)) {
   37186           0 :                 return NULL;
   37187             :         }
   37188           0 :         blob.length = blob_length;
   37189             : 
   37190           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37191           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   37192             :         }
   37193           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37194           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   37195             :         }
   37196             : 
   37197           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   37198           0 :                 allow_remaining = true;
   37199             :         }
   37200             : 
   37201           0 :         return py_srvsvc_NetFileEnum_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   37202             : }
   37203             : 
   37204           0 : static PyObject *py_srvsvc_NetFileEnum_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   37205             : {
   37206           0 :         const struct ndr_interface_call *call = NULL;
   37207           0 :         struct srvsvc_NetFileEnum *object = (struct srvsvc_NetFileEnum *)pytalloc_get_ptr(py_obj);
   37208             :         PyObject *ret;
   37209             :         char *retstr;
   37210             : 
   37211           0 :         if (ndr_table_srvsvc.num_calls < 10) {
   37212           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetFileEnum_ndr_print");
   37213           0 :                 return NULL;
   37214             :         }
   37215           0 :         call = &ndr_table_srvsvc.calls[9];
   37216             : 
   37217           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   37218           0 :         ret = PyUnicode_FromString(retstr);
   37219           0 :         TALLOC_FREE(retstr);
   37220             : 
   37221           0 :         return ret;
   37222             : }
   37223             : 
   37224           0 : static PyObject *py_srvsvc_NetFileEnum_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   37225             : {
   37226           0 :         return py_srvsvc_NetFileEnum_ndr_print(py_obj, "srvsvc_NetFileEnum_in", NDR_IN);
   37227             : }
   37228             : 
   37229           0 : static PyObject *py_srvsvc_NetFileEnum_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   37230             : {
   37231           0 :         return py_srvsvc_NetFileEnum_ndr_print(py_obj, "srvsvc_NetFileEnum_out", NDR_OUT);
   37232             : }
   37233             : 
   37234             : static PyMethodDef py_srvsvc_NetFileEnum_methods[] = {
   37235             :         { "opnum", (PyCFunction)py_srvsvc_NetFileEnum_ndr_opnum, METH_NOARGS|METH_CLASS,
   37236             :                 "srvsvc.NetFileEnum.opnum() -> 9 (0x09) " },
   37237             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileEnum_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   37238             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   37239             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileEnum_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   37240             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   37241             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileEnum_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   37242             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   37243             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileEnum_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   37244             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   37245             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetFileEnum_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   37246             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetFileEnum_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   37247             :         { NULL, NULL, 0, NULL }
   37248             : };
   37249             : 
   37250             : 
   37251             : static PyTypeObject srvsvc_NetFileEnum_Type = {
   37252             :         PyVarObject_HEAD_INIT(NULL, 0)
   37253             :         .tp_name = "srvsvc.NetFileEnum",
   37254             :         .tp_getset = py_srvsvc_NetFileEnum_getsetters,
   37255             :         .tp_methods = py_srvsvc_NetFileEnum_methods,
   37256             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   37257             :         .tp_new = py_srvsvc_NetFileEnum_new,
   37258             : };
   37259             : 
   37260           0 : static bool pack_py_srvsvc_NetFileEnum_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetFileEnum *r)
   37261             : {
   37262             :         PyObject *py_server_unc;
   37263             :         PyObject *py_path;
   37264             :         PyObject *py_user;
   37265             :         PyObject *py_info_ctr;
   37266             :         PyObject *py_max_buffer;
   37267             :         PyObject *py_resume_handle;
   37268           0 :         const char *kwnames[] = {
   37269             :                 "server_unc", "path", "user", "info_ctr", "max_buffer", "resume_handle", NULL
   37270             :         };
   37271             : 
   37272           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:srvsvc_NetFileEnum", discard_const_p(char *, kwnames), &py_server_unc, &py_path, &py_user, &py_info_ctr, &py_max_buffer, &py_resume_handle)) {
   37273           0 :                 return false;
   37274             :         }
   37275             : 
   37276           0 :         if (py_server_unc == NULL) {
   37277           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   37278           0 :                 return false;
   37279             :         }
   37280           0 :         if (py_server_unc == Py_None) {
   37281           0 :                 r->in.server_unc = NULL;
   37282             :         } else {
   37283           0 :                 r->in.server_unc = NULL;
   37284             :                 {
   37285             :                         const char *test_str;
   37286             :                         const char *talloc_str;
   37287           0 :                         PyObject *unicode = NULL;
   37288           0 :                         if (PyUnicode_Check(py_server_unc)) {
   37289           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   37290           0 :                                 if (unicode == NULL) {
   37291           0 :                                         PyErr_NoMemory();
   37292           0 :                                         return false;
   37293             :                                 }
   37294           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   37295           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   37296           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   37297             :                         } else {
   37298           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   37299           0 :                                 return false;
   37300             :                         }
   37301           0 :                         talloc_str = talloc_strdup(r, test_str);
   37302           0 :                         if (unicode != NULL) {
   37303           0 :                                 Py_DECREF(unicode);
   37304             :                         }
   37305           0 :                         if (talloc_str == NULL) {
   37306           0 :                                 PyErr_NoMemory();
   37307           0 :                                 return false;
   37308             :                         }
   37309           0 :                         r->in.server_unc = talloc_str;
   37310             :                 }
   37311             :         }
   37312           0 :         if (py_path == NULL) {
   37313           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.path");
   37314           0 :                 return false;
   37315             :         }
   37316           0 :         if (py_path == Py_None) {
   37317           0 :                 r->in.path = NULL;
   37318             :         } else {
   37319           0 :                 r->in.path = NULL;
   37320             :                 {
   37321             :                         const char *test_str;
   37322             :                         const char *talloc_str;
   37323           0 :                         PyObject *unicode = NULL;
   37324           0 :                         if (PyUnicode_Check(py_path)) {
   37325           0 :                                 unicode = PyUnicode_AsEncodedString(py_path, "utf-8", "ignore");
   37326           0 :                                 if (unicode == NULL) {
   37327           0 :                                         PyErr_NoMemory();
   37328           0 :                                         return false;
   37329             :                                 }
   37330           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   37331           0 :                         } else if (PyBytes_Check(py_path)) {
   37332           0 :                                 test_str = PyBytes_AS_STRING(py_path);
   37333             :                         } else {
   37334           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_path)->tp_name);
   37335           0 :                                 return false;
   37336             :                         }
   37337           0 :                         talloc_str = talloc_strdup(r, test_str);
   37338           0 :                         if (unicode != NULL) {
   37339           0 :                                 Py_DECREF(unicode);
   37340             :                         }
   37341           0 :                         if (talloc_str == NULL) {
   37342           0 :                                 PyErr_NoMemory();
   37343           0 :                                 return false;
   37344             :                         }
   37345           0 :                         r->in.path = talloc_str;
   37346             :                 }
   37347             :         }
   37348           0 :         if (py_user == NULL) {
   37349           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.user");
   37350           0 :                 return false;
   37351             :         }
   37352           0 :         if (py_user == Py_None) {
   37353           0 :                 r->in.user = NULL;
   37354             :         } else {
   37355           0 :                 r->in.user = NULL;
   37356             :                 {
   37357             :                         const char *test_str;
   37358             :                         const char *talloc_str;
   37359           0 :                         PyObject *unicode = NULL;
   37360           0 :                         if (PyUnicode_Check(py_user)) {
   37361           0 :                                 unicode = PyUnicode_AsEncodedString(py_user, "utf-8", "ignore");
   37362           0 :                                 if (unicode == NULL) {
   37363           0 :                                         PyErr_NoMemory();
   37364           0 :                                         return false;
   37365             :                                 }
   37366           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   37367           0 :                         } else if (PyBytes_Check(py_user)) {
   37368           0 :                                 test_str = PyBytes_AS_STRING(py_user);
   37369             :                         } else {
   37370           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_user)->tp_name);
   37371           0 :                                 return false;
   37372             :                         }
   37373           0 :                         talloc_str = talloc_strdup(r, test_str);
   37374           0 :                         if (unicode != NULL) {
   37375           0 :                                 Py_DECREF(unicode);
   37376             :                         }
   37377           0 :                         if (talloc_str == NULL) {
   37378           0 :                                 PyErr_NoMemory();
   37379           0 :                                 return false;
   37380             :                         }
   37381           0 :                         r->in.user = talloc_str;
   37382             :                 }
   37383             :         }
   37384           0 :         if (py_info_ctr == NULL) {
   37385           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info_ctr");
   37386           0 :                 return false;
   37387             :         }
   37388           0 :         r->in.info_ctr = talloc_ptrtype(r, r->in.info_ctr);
   37389           0 :         if (r->in.info_ctr == NULL) {
   37390           0 :                 PyErr_NoMemory();
   37391           0 :                 return false;
   37392             :         }
   37393           0 :         PY_CHECK_TYPE(&srvsvc_NetFileInfoCtr_Type, py_info_ctr, return false;);
   37394           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_info_ctr)) == NULL) {
   37395           0 :                 PyErr_NoMemory();
   37396           0 :                 return false;
   37397             :         }
   37398           0 :         r->in.info_ctr = (struct srvsvc_NetFileInfoCtr *)pytalloc_get_ptr(py_info_ctr);
   37399           0 :         if (py_max_buffer == NULL) {
   37400           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.max_buffer");
   37401           0 :                 return false;
   37402             :         }
   37403             :         {
   37404           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
   37405           0 :                 if (PyLong_Check(py_max_buffer)) {
   37406             :                         unsigned long long test_var;
   37407           0 :                         test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
   37408           0 :                         if (PyErr_Occurred() != NULL) {
   37409           0 :                                 return false;
   37410             :                         }
   37411           0 :                         if (test_var > uint_max) {
   37412           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   37413             :                                   PyLong_Type.tp_name, uint_max, test_var);
   37414           0 :                                 return false;
   37415             :                         }
   37416           0 :                         r->in.max_buffer = test_var;
   37417             :                 } else {
   37418           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   37419             :                           PyLong_Type.tp_name);
   37420           0 :                         return false;
   37421             :                 }
   37422             :         }
   37423           0 :         if (py_resume_handle == NULL) {
   37424           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.resume_handle");
   37425           0 :                 return false;
   37426             :         }
   37427           0 :         if (py_resume_handle == Py_None) {
   37428           0 :                 r->in.resume_handle = NULL;
   37429             :         } else {
   37430           0 :                 r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
   37431           0 :                 if (r->in.resume_handle == NULL) {
   37432           0 :                         PyErr_NoMemory();
   37433           0 :                         return false;
   37434             :                 }
   37435             :                 {
   37436           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
   37437           0 :                         if (PyLong_Check(py_resume_handle)) {
   37438             :                                 unsigned long long test_var;
   37439           0 :                                 test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
   37440           0 :                                 if (PyErr_Occurred() != NULL) {
   37441           0 :                                         return false;
   37442             :                                 }
   37443           0 :                                 if (test_var > uint_max) {
   37444           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   37445             :                                           PyLong_Type.tp_name, uint_max, test_var);
   37446           0 :                                         return false;
   37447             :                                 }
   37448           0 :                                 *r->in.resume_handle = test_var;
   37449             :                         } else {
   37450           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   37451             :                                   PyLong_Type.tp_name);
   37452           0 :                                 return false;
   37453             :                         }
   37454             :                 }
   37455             :         }
   37456           0 :         return true;
   37457             : }
   37458             : 
   37459           0 : static PyObject *unpack_py_srvsvc_NetFileEnum_args_out(struct srvsvc_NetFileEnum *r)
   37460             : {
   37461             :         PyObject *result;
   37462             :         PyObject *py_info_ctr;
   37463             :         PyObject *py_totalentries;
   37464             :         PyObject *py_resume_handle;
   37465           0 :         result = PyTuple_New(3);
   37466           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetFileInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
   37467           0 :         PyTuple_SetItem(result, 0, py_info_ctr);
   37468           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)*r->out.totalentries);
   37469           0 :         PyTuple_SetItem(result, 1, py_totalentries);
   37470           0 :         if (r->out.resume_handle == NULL) {
   37471           0 :                 py_resume_handle = Py_None;
   37472           0 :                 Py_INCREF(py_resume_handle);
   37473             :         } else {
   37474           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)*r->out.resume_handle);
   37475             :         }
   37476           0 :         PyTuple_SetItem(result, 2, py_resume_handle);
   37477           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   37478           0 :                 PyErr_SetWERROR(r->out.result);
   37479           0 :                 return NULL;
   37480             :         }
   37481             : 
   37482           0 :         return result;
   37483             : }
   37484             : 
   37485             : 
   37486           0 : static PyObject *py_srvsvc_NetFileGetInfo_in_get_server_unc(PyObject *obj, void *closure)
   37487             : {
   37488           0 :         struct srvsvc_NetFileGetInfo *object = (struct srvsvc_NetFileGetInfo *)pytalloc_get_ptr(obj);
   37489             :         PyObject *py_server_unc;
   37490           0 :         if (object->in.server_unc == NULL) {
   37491           0 :                 Py_RETURN_NONE;
   37492             :         }
   37493           0 :         if (object->in.server_unc == NULL) {
   37494           0 :                 py_server_unc = Py_None;
   37495           0 :                 Py_INCREF(py_server_unc);
   37496             :         } else {
   37497           0 :                 if (object->in.server_unc == NULL) {
   37498           0 :                         py_server_unc = Py_None;
   37499           0 :                         Py_INCREF(py_server_unc);
   37500             :                 } else {
   37501           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   37502             :                 }
   37503             :         }
   37504           0 :         return py_server_unc;
   37505             : }
   37506             : 
   37507           0 : static int py_srvsvc_NetFileGetInfo_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   37508             : {
   37509           0 :         struct srvsvc_NetFileGetInfo *object = (struct srvsvc_NetFileGetInfo *)pytalloc_get_ptr(py_obj);
   37510           0 :         if (value == NULL) {
   37511           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   37512           0 :                 return -1;
   37513             :         }
   37514           0 :         if (value == Py_None) {
   37515           0 :                 object->in.server_unc = NULL;
   37516             :         } else {
   37517           0 :                 object->in.server_unc = NULL;
   37518             :                 {
   37519             :                         const char *test_str;
   37520             :                         const char *talloc_str;
   37521           0 :                         PyObject *unicode = NULL;
   37522           0 :                         if (PyUnicode_Check(value)) {
   37523           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   37524           0 :                                 if (unicode == NULL) {
   37525           0 :                                         PyErr_NoMemory();
   37526           0 :                                         return -1;
   37527             :                                 }
   37528           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   37529           0 :                         } else if (PyBytes_Check(value)) {
   37530           0 :                                 test_str = PyBytes_AS_STRING(value);
   37531             :                         } else {
   37532           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   37533           0 :                                 return -1;
   37534             :                         }
   37535           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   37536           0 :                         if (unicode != NULL) {
   37537           0 :                                 Py_DECREF(unicode);
   37538             :                         }
   37539           0 :                         if (talloc_str == NULL) {
   37540           0 :                                 PyErr_NoMemory();
   37541           0 :                                 return -1;
   37542             :                         }
   37543           0 :                         object->in.server_unc = talloc_str;
   37544             :                 }
   37545             :         }
   37546           0 :         return 0;
   37547             : }
   37548             : 
   37549           0 : static PyObject *py_srvsvc_NetFileGetInfo_in_get_fid(PyObject *obj, void *closure)
   37550             : {
   37551           0 :         struct srvsvc_NetFileGetInfo *object = (struct srvsvc_NetFileGetInfo *)pytalloc_get_ptr(obj);
   37552             :         PyObject *py_fid;
   37553           0 :         py_fid = PyLong_FromUnsignedLongLong((uint32_t)object->in.fid);
   37554           0 :         return py_fid;
   37555             : }
   37556             : 
   37557           0 : static int py_srvsvc_NetFileGetInfo_in_set_fid(PyObject *py_obj, PyObject *value, void *closure)
   37558             : {
   37559           0 :         struct srvsvc_NetFileGetInfo *object = (struct srvsvc_NetFileGetInfo *)pytalloc_get_ptr(py_obj);
   37560           0 :         if (value == NULL) {
   37561           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.fid");
   37562           0 :                 return -1;
   37563             :         }
   37564             :         {
   37565           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.fid));
   37566           0 :                 if (PyLong_Check(value)) {
   37567             :                         unsigned long long test_var;
   37568           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   37569           0 :                         if (PyErr_Occurred() != NULL) {
   37570           0 :                                 return -1;
   37571             :                         }
   37572           0 :                         if (test_var > uint_max) {
   37573           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   37574             :                                   PyLong_Type.tp_name, uint_max, test_var);
   37575           0 :                                 return -1;
   37576             :                         }
   37577           0 :                         object->in.fid = test_var;
   37578             :                 } else {
   37579           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   37580             :                           PyLong_Type.tp_name);
   37581           0 :                         return -1;
   37582             :                 }
   37583             :         }
   37584           0 :         return 0;
   37585             : }
   37586             : 
   37587           0 : static PyObject *py_srvsvc_NetFileGetInfo_in_get_level(PyObject *obj, void *closure)
   37588             : {
   37589           0 :         struct srvsvc_NetFileGetInfo *object = (struct srvsvc_NetFileGetInfo *)pytalloc_get_ptr(obj);
   37590             :         PyObject *py_level;
   37591           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   37592           0 :         return py_level;
   37593             : }
   37594             : 
   37595           0 : static int py_srvsvc_NetFileGetInfo_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   37596             : {
   37597           0 :         struct srvsvc_NetFileGetInfo *object = (struct srvsvc_NetFileGetInfo *)pytalloc_get_ptr(py_obj);
   37598           0 :         if (value == NULL) {
   37599           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   37600           0 :                 return -1;
   37601             :         }
   37602             :         {
   37603           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   37604           0 :                 if (PyLong_Check(value)) {
   37605             :                         unsigned long long test_var;
   37606           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   37607           0 :                         if (PyErr_Occurred() != NULL) {
   37608           0 :                                 return -1;
   37609             :                         }
   37610           0 :                         if (test_var > uint_max) {
   37611           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   37612             :                                   PyLong_Type.tp_name, uint_max, test_var);
   37613           0 :                                 return -1;
   37614             :                         }
   37615           0 :                         object->in.level = test_var;
   37616             :                 } else {
   37617           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   37618             :                           PyLong_Type.tp_name);
   37619           0 :                         return -1;
   37620             :                 }
   37621             :         }
   37622           0 :         return 0;
   37623             : }
   37624             : 
   37625           0 : static PyObject *py_srvsvc_NetFileGetInfo_out_get_info(PyObject *obj, void *closure)
   37626             : {
   37627           0 :         struct srvsvc_NetFileGetInfo *object = (struct srvsvc_NetFileGetInfo *)pytalloc_get_ptr(obj);
   37628             :         PyObject *py_info;
   37629           0 :         if (object->out.info == NULL) {
   37630           0 :                 Py_RETURN_NONE;
   37631             :         }
   37632           0 :         py_info = pyrpc_import_union(&srvsvc_NetFileInfo_Type, object->out.info, object->in.level, object->out.info, "union srvsvc_NetFileInfo");
   37633           0 :         if (py_info == NULL) {
   37634           0 :                 return NULL;
   37635             :         }
   37636           0 :         return py_info;
   37637             : }
   37638             : 
   37639           0 : static int py_srvsvc_NetFileGetInfo_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   37640             : {
   37641           0 :         struct srvsvc_NetFileGetInfo *object = (struct srvsvc_NetFileGetInfo *)pytalloc_get_ptr(py_obj);
   37642           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   37643           0 :         if (value == NULL) {
   37644           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info");
   37645           0 :                 return -1;
   37646             :         }
   37647           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   37648           0 :         if (object->out.info == NULL) {
   37649           0 :                 PyErr_NoMemory();
   37650           0 :                 return -1;
   37651             :         }
   37652             :         {
   37653             :                 union srvsvc_NetFileInfo *info_switch_1;
   37654           0 :                 info_switch_1 = (union srvsvc_NetFileInfo *)pyrpc_export_union(&srvsvc_NetFileInfo_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union srvsvc_NetFileInfo");
   37655           0 :                 if (info_switch_1 == NULL) {
   37656           0 :                         return -1;
   37657             :                 }
   37658           0 :                 object->out.info = info_switch_1;
   37659             :         }
   37660           0 :         return 0;
   37661             : }
   37662             : 
   37663           0 : static PyObject *py_srvsvc_NetFileGetInfo_get_result(PyObject *obj, void *closure)
   37664             : {
   37665           0 :         struct srvsvc_NetFileGetInfo *object = (struct srvsvc_NetFileGetInfo *)pytalloc_get_ptr(obj);
   37666             :         PyObject *py_result;
   37667           0 :         py_result = PyErr_FromWERROR(object->out.result);
   37668           0 :         return py_result;
   37669             : }
   37670             : 
   37671           0 : static int py_srvsvc_NetFileGetInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
   37672             : {
   37673           0 :         struct srvsvc_NetFileGetInfo *object = (struct srvsvc_NetFileGetInfo *)pytalloc_get_ptr(py_obj);
   37674           0 :         if (value == NULL) {
   37675           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   37676           0 :                 return -1;
   37677             :         }
   37678           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   37679           0 :         return 0;
   37680             : }
   37681             : 
   37682             : static PyGetSetDef py_srvsvc_NetFileGetInfo_getsetters[] = {
   37683             :         {
   37684             :                 .name = discard_const_p(char, "in_server_unc"),
   37685             :                 .get = py_srvsvc_NetFileGetInfo_in_get_server_unc,
   37686             :                 .set = py_srvsvc_NetFileGetInfo_in_set_server_unc,
   37687             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   37688             :         },
   37689             :         {
   37690             :                 .name = discard_const_p(char, "in_fid"),
   37691             :                 .get = py_srvsvc_NetFileGetInfo_in_get_fid,
   37692             :                 .set = py_srvsvc_NetFileGetInfo_in_set_fid,
   37693             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   37694             :         },
   37695             :         {
   37696             :                 .name = discard_const_p(char, "in_level"),
   37697             :                 .get = py_srvsvc_NetFileGetInfo_in_get_level,
   37698             :                 .set = py_srvsvc_NetFileGetInfo_in_set_level,
   37699             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   37700             :         },
   37701             :         {
   37702             :                 .name = discard_const_p(char, "out_info"),
   37703             :                 .get = py_srvsvc_NetFileGetInfo_out_get_info,
   37704             :                 .set = py_srvsvc_NetFileGetInfo_out_set_info,
   37705             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetFileInfo")
   37706             :         },
   37707             :         {
   37708             :                 .name = discard_const_p(char, "result"),
   37709             :                 .get = py_srvsvc_NetFileGetInfo_get_result,
   37710             :                 .set = py_srvsvc_NetFileGetInfo_set_result,
   37711             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   37712             :         },
   37713             :         { .name = NULL }
   37714             : };
   37715             : 
   37716           0 : static PyObject *py_srvsvc_NetFileGetInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   37717             : {
   37718           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetFileGetInfo, type);
   37719           0 :         struct srvsvc_NetFileGetInfo *_self = (struct srvsvc_NetFileGetInfo *)pytalloc_get_ptr(self);
   37720           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   37721           0 :         _self->out.info = talloc_zero(mem_ctx, union srvsvc_NetFileInfo);
   37722           0 :         return self;
   37723             : }
   37724             : 
   37725           0 : static PyObject *py_srvsvc_NetFileGetInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   37726             : {
   37727             : 
   37728             : 
   37729           0 :         return PyLong_FromLong(10);
   37730             : }
   37731             : 
   37732           0 : static PyObject *py_srvsvc_NetFileGetInfo_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   37733             : {
   37734           0 :         const struct ndr_interface_call *call = NULL;
   37735           0 :         struct srvsvc_NetFileGetInfo *object = (struct srvsvc_NetFileGetInfo *)pytalloc_get_ptr(py_obj);
   37736           0 :         PyObject *ret = NULL;
   37737           0 :         struct ndr_push *push = NULL;
   37738             :         DATA_BLOB blob;
   37739             :         enum ndr_err_code err;
   37740             : 
   37741           0 :         if (ndr_table_srvsvc.num_calls < 11) {
   37742           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetFileGetInfo_ndr_pack");
   37743           0 :                 return NULL;
   37744             :         }
   37745           0 :         call = &ndr_table_srvsvc.calls[10];
   37746             : 
   37747           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   37748           0 :         if (push == NULL) {
   37749           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   37750           0 :                 return NULL;
   37751             :         }
   37752             : 
   37753           0 :         push->flags |= ndr_push_flags;
   37754             : 
   37755           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   37756           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   37757           0 :                 TALLOC_FREE(push);
   37758           0 :                 PyErr_SetNdrError(err);
   37759           0 :                 return NULL;
   37760             :         }
   37761           0 :         blob = ndr_push_blob(push);
   37762           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   37763           0 :         TALLOC_FREE(push);
   37764           0 :         return ret;
   37765             : }
   37766             : 
   37767           0 : static PyObject *py_srvsvc_NetFileGetInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37768             : {
   37769           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   37770           0 :         PyObject *bigendian_obj = NULL;
   37771           0 :         PyObject *ndr64_obj = NULL;
   37772           0 :         uint32_t ndr_push_flags = 0;
   37773             : 
   37774           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   37775             :                 discard_const_p(char *, kwnames),
   37776             :                 &bigendian_obj,
   37777             :                 &ndr64_obj)) {
   37778           0 :                 return NULL;
   37779             :         }
   37780             : 
   37781           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37782           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   37783             :         }
   37784           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37785           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   37786             :         }
   37787             : 
   37788           0 :         return py_srvsvc_NetFileGetInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   37789             : }
   37790             : 
   37791           0 : static PyObject *py_srvsvc_NetFileGetInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37792             : {
   37793           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   37794           0 :         PyObject *bigendian_obj = NULL;
   37795           0 :         PyObject *ndr64_obj = NULL;
   37796           0 :         uint32_t ndr_push_flags = 0;
   37797             : 
   37798           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   37799             :                 discard_const_p(char *, kwnames),
   37800             :                 &bigendian_obj,
   37801             :                 &ndr64_obj)) {
   37802           0 :                 return NULL;
   37803             :         }
   37804             : 
   37805           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37806           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   37807             :         }
   37808           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37809           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   37810             :         }
   37811             : 
   37812           0 :         return py_srvsvc_NetFileGetInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   37813             : }
   37814             : 
   37815           0 : static PyObject *py_srvsvc_NetFileGetInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   37816             : {
   37817           0 :         const struct ndr_interface_call *call = NULL;
   37818           0 :         struct srvsvc_NetFileGetInfo *object = (struct srvsvc_NetFileGetInfo *)pytalloc_get_ptr(py_obj);
   37819           0 :         struct ndr_pull *pull = NULL;
   37820             :         enum ndr_err_code err;
   37821             : 
   37822           0 :         if (ndr_table_srvsvc.num_calls < 11) {
   37823           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetFileGetInfo_ndr_unpack");
   37824           0 :                 return NULL;
   37825             :         }
   37826           0 :         call = &ndr_table_srvsvc.calls[10];
   37827             : 
   37828           0 :         pull = ndr_pull_init_blob(blob, object);
   37829           0 :         if (pull == NULL) {
   37830           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   37831           0 :                 return NULL;
   37832             :         }
   37833             : 
   37834           0 :         pull->flags |= ndr_pull_flags;
   37835             : 
   37836           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   37837           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   37838           0 :                 TALLOC_FREE(pull);
   37839           0 :                 PyErr_SetNdrError(err);
   37840           0 :                 return NULL;
   37841             :         }
   37842           0 :         if (!allow_remaining) {
   37843             :                 uint32_t highest_ofs;
   37844             : 
   37845           0 :                 if (pull->offset > pull->relative_highest_offset) {
   37846           0 :                         highest_ofs = pull->offset;
   37847             :                 } else {
   37848           0 :                         highest_ofs = pull->relative_highest_offset;
   37849             :                 }
   37850           0 :                 if (highest_ofs < pull->data_size) {
   37851           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   37852             :                                 "not all bytes consumed ofs[%u] size[%u]",
   37853             :                                 highest_ofs, pull->data_size);
   37854           0 :                         TALLOC_FREE(pull);
   37855           0 :                         PyErr_SetNdrError(err);
   37856           0 :                         return NULL;
   37857             :                 }
   37858             :         }
   37859             : 
   37860           0 :         TALLOC_FREE(pull);
   37861           0 :         Py_RETURN_NONE;
   37862             : }
   37863             : 
   37864           0 : static PyObject *py_srvsvc_NetFileGetInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37865             : {
   37866             :         DATA_BLOB blob;
   37867           0 :         Py_ssize_t blob_length = 0;
   37868           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   37869           0 :         PyObject *bigendian_obj = NULL;
   37870           0 :         PyObject *ndr64_obj = NULL;
   37871           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   37872           0 :         PyObject *allow_remaining_obj = NULL;
   37873           0 :         bool allow_remaining = false;
   37874             : 
   37875           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   37876             :                 discard_const_p(char *, kwnames),
   37877             :                 &blob.data, &blob_length,
   37878             :                 &bigendian_obj,
   37879             :                 &ndr64_obj,
   37880             :                 &allow_remaining_obj)) {
   37881           0 :                 return NULL;
   37882             :         }
   37883           0 :         blob.length = blob_length;
   37884             : 
   37885           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37886           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   37887             :         }
   37888           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37889           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   37890             :         }
   37891             : 
   37892           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   37893           0 :                 allow_remaining = true;
   37894             :         }
   37895             : 
   37896           0 :         return py_srvsvc_NetFileGetInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   37897             : }
   37898             : 
   37899           0 : static PyObject *py_srvsvc_NetFileGetInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37900             : {
   37901             :         DATA_BLOB blob;
   37902           0 :         Py_ssize_t blob_length = 0;
   37903           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   37904           0 :         PyObject *bigendian_obj = NULL;
   37905           0 :         PyObject *ndr64_obj = NULL;
   37906           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   37907           0 :         PyObject *allow_remaining_obj = NULL;
   37908           0 :         bool allow_remaining = false;
   37909             : 
   37910           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   37911             :                 discard_const_p(char *, kwnames),
   37912             :                 &blob.data, &blob_length,
   37913             :                 &bigendian_obj,
   37914             :                 &ndr64_obj,
   37915             :                 &allow_remaining_obj)) {
   37916           0 :                 return NULL;
   37917             :         }
   37918           0 :         blob.length = blob_length;
   37919             : 
   37920           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37921           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   37922             :         }
   37923           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37924           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   37925             :         }
   37926             : 
   37927           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   37928           0 :                 allow_remaining = true;
   37929             :         }
   37930             : 
   37931           0 :         return py_srvsvc_NetFileGetInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   37932             : }
   37933             : 
   37934           0 : static PyObject *py_srvsvc_NetFileGetInfo_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   37935             : {
   37936           0 :         const struct ndr_interface_call *call = NULL;
   37937           0 :         struct srvsvc_NetFileGetInfo *object = (struct srvsvc_NetFileGetInfo *)pytalloc_get_ptr(py_obj);
   37938             :         PyObject *ret;
   37939             :         char *retstr;
   37940             : 
   37941           0 :         if (ndr_table_srvsvc.num_calls < 11) {
   37942           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetFileGetInfo_ndr_print");
   37943           0 :                 return NULL;
   37944             :         }
   37945           0 :         call = &ndr_table_srvsvc.calls[10];
   37946             : 
   37947           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   37948           0 :         ret = PyUnicode_FromString(retstr);
   37949           0 :         TALLOC_FREE(retstr);
   37950             : 
   37951           0 :         return ret;
   37952             : }
   37953             : 
   37954           0 : static PyObject *py_srvsvc_NetFileGetInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   37955             : {
   37956           0 :         return py_srvsvc_NetFileGetInfo_ndr_print(py_obj, "srvsvc_NetFileGetInfo_in", NDR_IN);
   37957             : }
   37958             : 
   37959           0 : static PyObject *py_srvsvc_NetFileGetInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   37960             : {
   37961           0 :         return py_srvsvc_NetFileGetInfo_ndr_print(py_obj, "srvsvc_NetFileGetInfo_out", NDR_OUT);
   37962             : }
   37963             : 
   37964             : static PyMethodDef py_srvsvc_NetFileGetInfo_methods[] = {
   37965             :         { "opnum", (PyCFunction)py_srvsvc_NetFileGetInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
   37966             :                 "srvsvc.NetFileGetInfo.opnum() -> 10 (0x0a) " },
   37967             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileGetInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   37968             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   37969             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileGetInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   37970             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   37971             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileGetInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   37972             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   37973             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileGetInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   37974             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   37975             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetFileGetInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   37976             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetFileGetInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   37977             :         { NULL, NULL, 0, NULL }
   37978             : };
   37979             : 
   37980             : 
   37981             : static PyTypeObject srvsvc_NetFileGetInfo_Type = {
   37982             :         PyVarObject_HEAD_INIT(NULL, 0)
   37983             :         .tp_name = "srvsvc.NetFileGetInfo",
   37984             :         .tp_getset = py_srvsvc_NetFileGetInfo_getsetters,
   37985             :         .tp_methods = py_srvsvc_NetFileGetInfo_methods,
   37986             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   37987             :         .tp_new = py_srvsvc_NetFileGetInfo_new,
   37988             : };
   37989             : 
   37990           0 : static bool pack_py_srvsvc_NetFileGetInfo_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetFileGetInfo *r)
   37991             : {
   37992             :         PyObject *py_server_unc;
   37993             :         PyObject *py_fid;
   37994             :         PyObject *py_level;
   37995           0 :         const char *kwnames[] = {
   37996             :                 "server_unc", "fid", "level", NULL
   37997             :         };
   37998             : 
   37999           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetFileGetInfo", discard_const_p(char *, kwnames), &py_server_unc, &py_fid, &py_level)) {
   38000           0 :                 return false;
   38001             :         }
   38002             : 
   38003           0 :         if (py_server_unc == NULL) {
   38004           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   38005           0 :                 return false;
   38006             :         }
   38007           0 :         if (py_server_unc == Py_None) {
   38008           0 :                 r->in.server_unc = NULL;
   38009             :         } else {
   38010           0 :                 r->in.server_unc = NULL;
   38011             :                 {
   38012             :                         const char *test_str;
   38013             :                         const char *talloc_str;
   38014           0 :                         PyObject *unicode = NULL;
   38015           0 :                         if (PyUnicode_Check(py_server_unc)) {
   38016           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   38017           0 :                                 if (unicode == NULL) {
   38018           0 :                                         PyErr_NoMemory();
   38019           0 :                                         return false;
   38020             :                                 }
   38021           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   38022           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   38023           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   38024             :                         } else {
   38025           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   38026           0 :                                 return false;
   38027             :                         }
   38028           0 :                         talloc_str = talloc_strdup(r, test_str);
   38029           0 :                         if (unicode != NULL) {
   38030           0 :                                 Py_DECREF(unicode);
   38031             :                         }
   38032           0 :                         if (talloc_str == NULL) {
   38033           0 :                                 PyErr_NoMemory();
   38034           0 :                                 return false;
   38035             :                         }
   38036           0 :                         r->in.server_unc = talloc_str;
   38037             :                 }
   38038             :         }
   38039           0 :         if (py_fid == NULL) {
   38040           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.fid");
   38041           0 :                 return false;
   38042             :         }
   38043             :         {
   38044           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.fid));
   38045           0 :                 if (PyLong_Check(py_fid)) {
   38046             :                         unsigned long long test_var;
   38047           0 :                         test_var = PyLong_AsUnsignedLongLong(py_fid);
   38048           0 :                         if (PyErr_Occurred() != NULL) {
   38049           0 :                                 return false;
   38050             :                         }
   38051           0 :                         if (test_var > uint_max) {
   38052           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38053             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38054           0 :                                 return false;
   38055             :                         }
   38056           0 :                         r->in.fid = test_var;
   38057             :                 } else {
   38058           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   38059             :                           PyLong_Type.tp_name);
   38060           0 :                         return false;
   38061             :                 }
   38062             :         }
   38063           0 :         if (py_level == NULL) {
   38064           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   38065           0 :                 return false;
   38066             :         }
   38067             :         {
   38068           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   38069           0 :                 if (PyLong_Check(py_level)) {
   38070             :                         unsigned long long test_var;
   38071           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   38072           0 :                         if (PyErr_Occurred() != NULL) {
   38073           0 :                                 return false;
   38074             :                         }
   38075           0 :                         if (test_var > uint_max) {
   38076           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38077             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38078           0 :                                 return false;
   38079             :                         }
   38080           0 :                         r->in.level = test_var;
   38081             :                 } else {
   38082           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   38083             :                           PyLong_Type.tp_name);
   38084           0 :                         return false;
   38085             :                 }
   38086             :         }
   38087           0 :         return true;
   38088             : }
   38089             : 
   38090           0 : static PyObject *unpack_py_srvsvc_NetFileGetInfo_args_out(struct srvsvc_NetFileGetInfo *r)
   38091             : {
   38092             :         PyObject *result;
   38093             :         PyObject *py_info;
   38094           0 :         py_info = pyrpc_import_union(&srvsvc_NetFileInfo_Type, r->out.info, r->in.level, r->out.info, "union srvsvc_NetFileInfo");
   38095           0 :         if (py_info == NULL) {
   38096           0 :                 return NULL;
   38097             :         }
   38098           0 :         result = py_info;
   38099           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   38100           0 :                 PyErr_SetWERROR(r->out.result);
   38101           0 :                 return NULL;
   38102             :         }
   38103             : 
   38104           0 :         return result;
   38105             : }
   38106             : 
   38107             : 
   38108           0 : static PyObject *py_srvsvc_NetFileClose_in_get_server_unc(PyObject *obj, void *closure)
   38109             : {
   38110           0 :         struct srvsvc_NetFileClose *object = (struct srvsvc_NetFileClose *)pytalloc_get_ptr(obj);
   38111             :         PyObject *py_server_unc;
   38112           0 :         if (object->in.server_unc == NULL) {
   38113           0 :                 Py_RETURN_NONE;
   38114             :         }
   38115           0 :         if (object->in.server_unc == NULL) {
   38116           0 :                 py_server_unc = Py_None;
   38117           0 :                 Py_INCREF(py_server_unc);
   38118             :         } else {
   38119           0 :                 if (object->in.server_unc == NULL) {
   38120           0 :                         py_server_unc = Py_None;
   38121           0 :                         Py_INCREF(py_server_unc);
   38122             :                 } else {
   38123           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   38124             :                 }
   38125             :         }
   38126           0 :         return py_server_unc;
   38127             : }
   38128             : 
   38129           0 : static int py_srvsvc_NetFileClose_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   38130             : {
   38131           0 :         struct srvsvc_NetFileClose *object = (struct srvsvc_NetFileClose *)pytalloc_get_ptr(py_obj);
   38132           0 :         if (value == NULL) {
   38133           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   38134           0 :                 return -1;
   38135             :         }
   38136           0 :         if (value == Py_None) {
   38137           0 :                 object->in.server_unc = NULL;
   38138             :         } else {
   38139           0 :                 object->in.server_unc = NULL;
   38140             :                 {
   38141             :                         const char *test_str;
   38142             :                         const char *talloc_str;
   38143           0 :                         PyObject *unicode = NULL;
   38144           0 :                         if (PyUnicode_Check(value)) {
   38145           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   38146           0 :                                 if (unicode == NULL) {
   38147           0 :                                         PyErr_NoMemory();
   38148           0 :                                         return -1;
   38149             :                                 }
   38150           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   38151           0 :                         } else if (PyBytes_Check(value)) {
   38152           0 :                                 test_str = PyBytes_AS_STRING(value);
   38153             :                         } else {
   38154           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   38155           0 :                                 return -1;
   38156             :                         }
   38157           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   38158           0 :                         if (unicode != NULL) {
   38159           0 :                                 Py_DECREF(unicode);
   38160             :                         }
   38161           0 :                         if (talloc_str == NULL) {
   38162           0 :                                 PyErr_NoMemory();
   38163           0 :                                 return -1;
   38164             :                         }
   38165           0 :                         object->in.server_unc = talloc_str;
   38166             :                 }
   38167             :         }
   38168           0 :         return 0;
   38169             : }
   38170             : 
   38171           0 : static PyObject *py_srvsvc_NetFileClose_in_get_fid(PyObject *obj, void *closure)
   38172             : {
   38173           0 :         struct srvsvc_NetFileClose *object = (struct srvsvc_NetFileClose *)pytalloc_get_ptr(obj);
   38174             :         PyObject *py_fid;
   38175           0 :         py_fid = PyLong_FromUnsignedLongLong((uint32_t)object->in.fid);
   38176           0 :         return py_fid;
   38177             : }
   38178             : 
   38179           0 : static int py_srvsvc_NetFileClose_in_set_fid(PyObject *py_obj, PyObject *value, void *closure)
   38180             : {
   38181           0 :         struct srvsvc_NetFileClose *object = (struct srvsvc_NetFileClose *)pytalloc_get_ptr(py_obj);
   38182           0 :         if (value == NULL) {
   38183           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.fid");
   38184           0 :                 return -1;
   38185             :         }
   38186             :         {
   38187           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.fid));
   38188           0 :                 if (PyLong_Check(value)) {
   38189             :                         unsigned long long test_var;
   38190           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   38191           0 :                         if (PyErr_Occurred() != NULL) {
   38192           0 :                                 return -1;
   38193             :                         }
   38194           0 :                         if (test_var > uint_max) {
   38195           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38196             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38197           0 :                                 return -1;
   38198             :                         }
   38199           0 :                         object->in.fid = test_var;
   38200             :                 } else {
   38201           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   38202             :                           PyLong_Type.tp_name);
   38203           0 :                         return -1;
   38204             :                 }
   38205             :         }
   38206           0 :         return 0;
   38207             : }
   38208             : 
   38209           0 : static PyObject *py_srvsvc_NetFileClose_get_result(PyObject *obj, void *closure)
   38210             : {
   38211           0 :         struct srvsvc_NetFileClose *object = (struct srvsvc_NetFileClose *)pytalloc_get_ptr(obj);
   38212             :         PyObject *py_result;
   38213           0 :         py_result = PyErr_FromWERROR(object->out.result);
   38214           0 :         return py_result;
   38215             : }
   38216             : 
   38217           0 : static int py_srvsvc_NetFileClose_set_result(PyObject *py_obj, PyObject *value, void *closure)
   38218             : {
   38219           0 :         struct srvsvc_NetFileClose *object = (struct srvsvc_NetFileClose *)pytalloc_get_ptr(py_obj);
   38220           0 :         if (value == NULL) {
   38221           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   38222           0 :                 return -1;
   38223             :         }
   38224           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   38225           0 :         return 0;
   38226             : }
   38227             : 
   38228             : static PyGetSetDef py_srvsvc_NetFileClose_getsetters[] = {
   38229             :         {
   38230             :                 .name = discard_const_p(char, "in_server_unc"),
   38231             :                 .get = py_srvsvc_NetFileClose_in_get_server_unc,
   38232             :                 .set = py_srvsvc_NetFileClose_in_set_server_unc,
   38233             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   38234             :         },
   38235             :         {
   38236             :                 .name = discard_const_p(char, "in_fid"),
   38237             :                 .get = py_srvsvc_NetFileClose_in_get_fid,
   38238             :                 .set = py_srvsvc_NetFileClose_in_set_fid,
   38239             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   38240             :         },
   38241             :         {
   38242             :                 .name = discard_const_p(char, "result"),
   38243             :                 .get = py_srvsvc_NetFileClose_get_result,
   38244             :                 .set = py_srvsvc_NetFileClose_set_result,
   38245             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   38246             :         },
   38247             :         { .name = NULL }
   38248             : };
   38249             : 
   38250           0 : static PyObject *py_srvsvc_NetFileClose_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   38251             : {
   38252           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetFileClose, type);
   38253           0 :         return self;
   38254             : }
   38255             : 
   38256           0 : static PyObject *py_srvsvc_NetFileClose_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   38257             : {
   38258             : 
   38259             : 
   38260           0 :         return PyLong_FromLong(11);
   38261             : }
   38262             : 
   38263           0 : static PyObject *py_srvsvc_NetFileClose_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   38264             : {
   38265           0 :         const struct ndr_interface_call *call = NULL;
   38266           0 :         struct srvsvc_NetFileClose *object = (struct srvsvc_NetFileClose *)pytalloc_get_ptr(py_obj);
   38267           0 :         PyObject *ret = NULL;
   38268           0 :         struct ndr_push *push = NULL;
   38269             :         DATA_BLOB blob;
   38270             :         enum ndr_err_code err;
   38271             : 
   38272           0 :         if (ndr_table_srvsvc.num_calls < 12) {
   38273           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetFileClose_ndr_pack");
   38274           0 :                 return NULL;
   38275             :         }
   38276           0 :         call = &ndr_table_srvsvc.calls[11];
   38277             : 
   38278           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   38279           0 :         if (push == NULL) {
   38280           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   38281           0 :                 return NULL;
   38282             :         }
   38283             : 
   38284           0 :         push->flags |= ndr_push_flags;
   38285             : 
   38286           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   38287           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   38288           0 :                 TALLOC_FREE(push);
   38289           0 :                 PyErr_SetNdrError(err);
   38290           0 :                 return NULL;
   38291             :         }
   38292           0 :         blob = ndr_push_blob(push);
   38293           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   38294           0 :         TALLOC_FREE(push);
   38295           0 :         return ret;
   38296             : }
   38297             : 
   38298           0 : static PyObject *py_srvsvc_NetFileClose_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38299             : {
   38300           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   38301           0 :         PyObject *bigendian_obj = NULL;
   38302           0 :         PyObject *ndr64_obj = NULL;
   38303           0 :         uint32_t ndr_push_flags = 0;
   38304             : 
   38305           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   38306             :                 discard_const_p(char *, kwnames),
   38307             :                 &bigendian_obj,
   38308             :                 &ndr64_obj)) {
   38309           0 :                 return NULL;
   38310             :         }
   38311             : 
   38312           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   38313           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   38314             :         }
   38315           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   38316           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   38317             :         }
   38318             : 
   38319           0 :         return py_srvsvc_NetFileClose_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   38320             : }
   38321             : 
   38322           0 : static PyObject *py_srvsvc_NetFileClose_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38323             : {
   38324           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   38325           0 :         PyObject *bigendian_obj = NULL;
   38326           0 :         PyObject *ndr64_obj = NULL;
   38327           0 :         uint32_t ndr_push_flags = 0;
   38328             : 
   38329           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   38330             :                 discard_const_p(char *, kwnames),
   38331             :                 &bigendian_obj,
   38332             :                 &ndr64_obj)) {
   38333           0 :                 return NULL;
   38334             :         }
   38335             : 
   38336           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   38337           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   38338             :         }
   38339           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   38340           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   38341             :         }
   38342             : 
   38343           0 :         return py_srvsvc_NetFileClose_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   38344             : }
   38345             : 
   38346           0 : static PyObject *py_srvsvc_NetFileClose_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   38347             : {
   38348           0 :         const struct ndr_interface_call *call = NULL;
   38349           0 :         struct srvsvc_NetFileClose *object = (struct srvsvc_NetFileClose *)pytalloc_get_ptr(py_obj);
   38350           0 :         struct ndr_pull *pull = NULL;
   38351             :         enum ndr_err_code err;
   38352             : 
   38353           0 :         if (ndr_table_srvsvc.num_calls < 12) {
   38354           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetFileClose_ndr_unpack");
   38355           0 :                 return NULL;
   38356             :         }
   38357           0 :         call = &ndr_table_srvsvc.calls[11];
   38358             : 
   38359           0 :         pull = ndr_pull_init_blob(blob, object);
   38360           0 :         if (pull == NULL) {
   38361           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   38362           0 :                 return NULL;
   38363             :         }
   38364             : 
   38365           0 :         pull->flags |= ndr_pull_flags;
   38366             : 
   38367           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   38368           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   38369           0 :                 TALLOC_FREE(pull);
   38370           0 :                 PyErr_SetNdrError(err);
   38371           0 :                 return NULL;
   38372             :         }
   38373           0 :         if (!allow_remaining) {
   38374             :                 uint32_t highest_ofs;
   38375             : 
   38376           0 :                 if (pull->offset > pull->relative_highest_offset) {
   38377           0 :                         highest_ofs = pull->offset;
   38378             :                 } else {
   38379           0 :                         highest_ofs = pull->relative_highest_offset;
   38380             :                 }
   38381           0 :                 if (highest_ofs < pull->data_size) {
   38382           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   38383             :                                 "not all bytes consumed ofs[%u] size[%u]",
   38384             :                                 highest_ofs, pull->data_size);
   38385           0 :                         TALLOC_FREE(pull);
   38386           0 :                         PyErr_SetNdrError(err);
   38387           0 :                         return NULL;
   38388             :                 }
   38389             :         }
   38390             : 
   38391           0 :         TALLOC_FREE(pull);
   38392           0 :         Py_RETURN_NONE;
   38393             : }
   38394             : 
   38395           0 : static PyObject *py_srvsvc_NetFileClose_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38396             : {
   38397             :         DATA_BLOB blob;
   38398           0 :         Py_ssize_t blob_length = 0;
   38399           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   38400           0 :         PyObject *bigendian_obj = NULL;
   38401           0 :         PyObject *ndr64_obj = NULL;
   38402           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   38403           0 :         PyObject *allow_remaining_obj = NULL;
   38404           0 :         bool allow_remaining = false;
   38405             : 
   38406           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   38407             :                 discard_const_p(char *, kwnames),
   38408             :                 &blob.data, &blob_length,
   38409             :                 &bigendian_obj,
   38410             :                 &ndr64_obj,
   38411             :                 &allow_remaining_obj)) {
   38412           0 :                 return NULL;
   38413             :         }
   38414           0 :         blob.length = blob_length;
   38415             : 
   38416           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   38417           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   38418             :         }
   38419           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   38420           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   38421             :         }
   38422             : 
   38423           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   38424           0 :                 allow_remaining = true;
   38425             :         }
   38426             : 
   38427           0 :         return py_srvsvc_NetFileClose_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   38428             : }
   38429             : 
   38430           0 : static PyObject *py_srvsvc_NetFileClose_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38431             : {
   38432             :         DATA_BLOB blob;
   38433           0 :         Py_ssize_t blob_length = 0;
   38434           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   38435           0 :         PyObject *bigendian_obj = NULL;
   38436           0 :         PyObject *ndr64_obj = NULL;
   38437           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   38438           0 :         PyObject *allow_remaining_obj = NULL;
   38439           0 :         bool allow_remaining = false;
   38440             : 
   38441           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   38442             :                 discard_const_p(char *, kwnames),
   38443             :                 &blob.data, &blob_length,
   38444             :                 &bigendian_obj,
   38445             :                 &ndr64_obj,
   38446             :                 &allow_remaining_obj)) {
   38447           0 :                 return NULL;
   38448             :         }
   38449           0 :         blob.length = blob_length;
   38450             : 
   38451           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   38452           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   38453             :         }
   38454           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   38455           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   38456             :         }
   38457             : 
   38458           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   38459           0 :                 allow_remaining = true;
   38460             :         }
   38461             : 
   38462           0 :         return py_srvsvc_NetFileClose_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   38463             : }
   38464             : 
   38465           0 : static PyObject *py_srvsvc_NetFileClose_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   38466             : {
   38467           0 :         const struct ndr_interface_call *call = NULL;
   38468           0 :         struct srvsvc_NetFileClose *object = (struct srvsvc_NetFileClose *)pytalloc_get_ptr(py_obj);
   38469             :         PyObject *ret;
   38470             :         char *retstr;
   38471             : 
   38472           0 :         if (ndr_table_srvsvc.num_calls < 12) {
   38473           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetFileClose_ndr_print");
   38474           0 :                 return NULL;
   38475             :         }
   38476           0 :         call = &ndr_table_srvsvc.calls[11];
   38477             : 
   38478           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   38479           0 :         ret = PyUnicode_FromString(retstr);
   38480           0 :         TALLOC_FREE(retstr);
   38481             : 
   38482           0 :         return ret;
   38483             : }
   38484             : 
   38485           0 : static PyObject *py_srvsvc_NetFileClose_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   38486             : {
   38487           0 :         return py_srvsvc_NetFileClose_ndr_print(py_obj, "srvsvc_NetFileClose_in", NDR_IN);
   38488             : }
   38489             : 
   38490           0 : static PyObject *py_srvsvc_NetFileClose_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   38491             : {
   38492           0 :         return py_srvsvc_NetFileClose_ndr_print(py_obj, "srvsvc_NetFileClose_out", NDR_OUT);
   38493             : }
   38494             : 
   38495             : static PyMethodDef py_srvsvc_NetFileClose_methods[] = {
   38496             :         { "opnum", (PyCFunction)py_srvsvc_NetFileClose_ndr_opnum, METH_NOARGS|METH_CLASS,
   38497             :                 "srvsvc.NetFileClose.opnum() -> 11 (0x0b) " },
   38498             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileClose_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   38499             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   38500             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileClose_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   38501             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   38502             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileClose_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   38503             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   38504             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetFileClose_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   38505             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   38506             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetFileClose_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   38507             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetFileClose_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   38508             :         { NULL, NULL, 0, NULL }
   38509             : };
   38510             : 
   38511             : 
   38512             : static PyTypeObject srvsvc_NetFileClose_Type = {
   38513             :         PyVarObject_HEAD_INIT(NULL, 0)
   38514             :         .tp_name = "srvsvc.NetFileClose",
   38515             :         .tp_getset = py_srvsvc_NetFileClose_getsetters,
   38516             :         .tp_methods = py_srvsvc_NetFileClose_methods,
   38517             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   38518             :         .tp_new = py_srvsvc_NetFileClose_new,
   38519             : };
   38520             : 
   38521           0 : static bool pack_py_srvsvc_NetFileClose_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetFileClose *r)
   38522             : {
   38523             :         PyObject *py_server_unc;
   38524             :         PyObject *py_fid;
   38525           0 :         const char *kwnames[] = {
   38526             :                 "server_unc", "fid", NULL
   38527             :         };
   38528             : 
   38529           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:srvsvc_NetFileClose", discard_const_p(char *, kwnames), &py_server_unc, &py_fid)) {
   38530           0 :                 return false;
   38531             :         }
   38532             : 
   38533           0 :         if (py_server_unc == NULL) {
   38534           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   38535           0 :                 return false;
   38536             :         }
   38537           0 :         if (py_server_unc == Py_None) {
   38538           0 :                 r->in.server_unc = NULL;
   38539             :         } else {
   38540           0 :                 r->in.server_unc = NULL;
   38541             :                 {
   38542             :                         const char *test_str;
   38543             :                         const char *talloc_str;
   38544           0 :                         PyObject *unicode = NULL;
   38545           0 :                         if (PyUnicode_Check(py_server_unc)) {
   38546           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   38547           0 :                                 if (unicode == NULL) {
   38548           0 :                                         PyErr_NoMemory();
   38549           0 :                                         return false;
   38550             :                                 }
   38551           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   38552           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   38553           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   38554             :                         } else {
   38555           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   38556           0 :                                 return false;
   38557             :                         }
   38558           0 :                         talloc_str = talloc_strdup(r, test_str);
   38559           0 :                         if (unicode != NULL) {
   38560           0 :                                 Py_DECREF(unicode);
   38561             :                         }
   38562           0 :                         if (talloc_str == NULL) {
   38563           0 :                                 PyErr_NoMemory();
   38564           0 :                                 return false;
   38565             :                         }
   38566           0 :                         r->in.server_unc = talloc_str;
   38567             :                 }
   38568             :         }
   38569           0 :         if (py_fid == NULL) {
   38570           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.fid");
   38571           0 :                 return false;
   38572             :         }
   38573             :         {
   38574           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.fid));
   38575           0 :                 if (PyLong_Check(py_fid)) {
   38576             :                         unsigned long long test_var;
   38577           0 :                         test_var = PyLong_AsUnsignedLongLong(py_fid);
   38578           0 :                         if (PyErr_Occurred() != NULL) {
   38579           0 :                                 return false;
   38580             :                         }
   38581           0 :                         if (test_var > uint_max) {
   38582           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38583             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38584           0 :                                 return false;
   38585             :                         }
   38586           0 :                         r->in.fid = test_var;
   38587             :                 } else {
   38588           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   38589             :                           PyLong_Type.tp_name);
   38590           0 :                         return false;
   38591             :                 }
   38592             :         }
   38593           0 :         return true;
   38594             : }
   38595             : 
   38596           0 : static PyObject *unpack_py_srvsvc_NetFileClose_args_out(struct srvsvc_NetFileClose *r)
   38597             : {
   38598             :         PyObject *result;
   38599           0 :         result = Py_None;
   38600           0 :         Py_INCREF(result);
   38601           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   38602           0 :                 PyErr_SetWERROR(r->out.result);
   38603           0 :                 return NULL;
   38604             :         }
   38605             : 
   38606           0 :         return result;
   38607             : }
   38608             : 
   38609             : 
   38610           0 : static PyObject *py_srvsvc_NetSessEnum_in_get_server_unc(PyObject *obj, void *closure)
   38611             : {
   38612           0 :         struct srvsvc_NetSessEnum *object = (struct srvsvc_NetSessEnum *)pytalloc_get_ptr(obj);
   38613             :         PyObject *py_server_unc;
   38614           0 :         if (object->in.server_unc == NULL) {
   38615           0 :                 Py_RETURN_NONE;
   38616             :         }
   38617           0 :         if (object->in.server_unc == NULL) {
   38618           0 :                 py_server_unc = Py_None;
   38619           0 :                 Py_INCREF(py_server_unc);
   38620             :         } else {
   38621           0 :                 if (object->in.server_unc == NULL) {
   38622           0 :                         py_server_unc = Py_None;
   38623           0 :                         Py_INCREF(py_server_unc);
   38624             :                 } else {
   38625           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   38626             :                 }
   38627             :         }
   38628           0 :         return py_server_unc;
   38629             : }
   38630             : 
   38631           0 : static int py_srvsvc_NetSessEnum_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   38632             : {
   38633           0 :         struct srvsvc_NetSessEnum *object = (struct srvsvc_NetSessEnum *)pytalloc_get_ptr(py_obj);
   38634           0 :         if (value == NULL) {
   38635           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   38636           0 :                 return -1;
   38637             :         }
   38638           0 :         if (value == Py_None) {
   38639           0 :                 object->in.server_unc = NULL;
   38640             :         } else {
   38641           0 :                 object->in.server_unc = NULL;
   38642             :                 {
   38643             :                         const char *test_str;
   38644             :                         const char *talloc_str;
   38645           0 :                         PyObject *unicode = NULL;
   38646           0 :                         if (PyUnicode_Check(value)) {
   38647           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   38648           0 :                                 if (unicode == NULL) {
   38649           0 :                                         PyErr_NoMemory();
   38650           0 :                                         return -1;
   38651             :                                 }
   38652           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   38653           0 :                         } else if (PyBytes_Check(value)) {
   38654           0 :                                 test_str = PyBytes_AS_STRING(value);
   38655             :                         } else {
   38656           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   38657           0 :                                 return -1;
   38658             :                         }
   38659           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   38660           0 :                         if (unicode != NULL) {
   38661           0 :                                 Py_DECREF(unicode);
   38662             :                         }
   38663           0 :                         if (talloc_str == NULL) {
   38664           0 :                                 PyErr_NoMemory();
   38665           0 :                                 return -1;
   38666             :                         }
   38667           0 :                         object->in.server_unc = talloc_str;
   38668             :                 }
   38669             :         }
   38670           0 :         return 0;
   38671             : }
   38672             : 
   38673           0 : static PyObject *py_srvsvc_NetSessEnum_in_get_client(PyObject *obj, void *closure)
   38674             : {
   38675           0 :         struct srvsvc_NetSessEnum *object = (struct srvsvc_NetSessEnum *)pytalloc_get_ptr(obj);
   38676             :         PyObject *py_client;
   38677           0 :         if (object->in.client == NULL) {
   38678           0 :                 Py_RETURN_NONE;
   38679             :         }
   38680           0 :         if (object->in.client == NULL) {
   38681           0 :                 py_client = Py_None;
   38682           0 :                 Py_INCREF(py_client);
   38683             :         } else {
   38684           0 :                 if (object->in.client == NULL) {
   38685           0 :                         py_client = Py_None;
   38686           0 :                         Py_INCREF(py_client);
   38687             :                 } else {
   38688           0 :                         py_client = PyUnicode_Decode(object->in.client, strlen(object->in.client), "utf-8", "ignore");
   38689             :                 }
   38690             :         }
   38691           0 :         return py_client;
   38692             : }
   38693             : 
   38694           0 : static int py_srvsvc_NetSessEnum_in_set_client(PyObject *py_obj, PyObject *value, void *closure)
   38695             : {
   38696           0 :         struct srvsvc_NetSessEnum *object = (struct srvsvc_NetSessEnum *)pytalloc_get_ptr(py_obj);
   38697           0 :         if (value == NULL) {
   38698           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client");
   38699           0 :                 return -1;
   38700             :         }
   38701           0 :         if (value == Py_None) {
   38702           0 :                 object->in.client = NULL;
   38703             :         } else {
   38704           0 :                 object->in.client = NULL;
   38705             :                 {
   38706             :                         const char *test_str;
   38707             :                         const char *talloc_str;
   38708           0 :                         PyObject *unicode = NULL;
   38709           0 :                         if (PyUnicode_Check(value)) {
   38710           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   38711           0 :                                 if (unicode == NULL) {
   38712           0 :                                         PyErr_NoMemory();
   38713           0 :                                         return -1;
   38714             :                                 }
   38715           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   38716           0 :                         } else if (PyBytes_Check(value)) {
   38717           0 :                                 test_str = PyBytes_AS_STRING(value);
   38718             :                         } else {
   38719           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   38720           0 :                                 return -1;
   38721             :                         }
   38722           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   38723           0 :                         if (unicode != NULL) {
   38724           0 :                                 Py_DECREF(unicode);
   38725             :                         }
   38726           0 :                         if (talloc_str == NULL) {
   38727           0 :                                 PyErr_NoMemory();
   38728           0 :                                 return -1;
   38729             :                         }
   38730           0 :                         object->in.client = talloc_str;
   38731             :                 }
   38732             :         }
   38733           0 :         return 0;
   38734             : }
   38735             : 
   38736           0 : static PyObject *py_srvsvc_NetSessEnum_in_get_user(PyObject *obj, void *closure)
   38737             : {
   38738           0 :         struct srvsvc_NetSessEnum *object = (struct srvsvc_NetSessEnum *)pytalloc_get_ptr(obj);
   38739             :         PyObject *py_user;
   38740           0 :         if (object->in.user == NULL) {
   38741           0 :                 Py_RETURN_NONE;
   38742             :         }
   38743           0 :         if (object->in.user == NULL) {
   38744           0 :                 py_user = Py_None;
   38745           0 :                 Py_INCREF(py_user);
   38746             :         } else {
   38747           0 :                 if (object->in.user == NULL) {
   38748           0 :                         py_user = Py_None;
   38749           0 :                         Py_INCREF(py_user);
   38750             :                 } else {
   38751           0 :                         py_user = PyUnicode_Decode(object->in.user, strlen(object->in.user), "utf-8", "ignore");
   38752             :                 }
   38753             :         }
   38754           0 :         return py_user;
   38755             : }
   38756             : 
   38757           0 : static int py_srvsvc_NetSessEnum_in_set_user(PyObject *py_obj, PyObject *value, void *closure)
   38758             : {
   38759           0 :         struct srvsvc_NetSessEnum *object = (struct srvsvc_NetSessEnum *)pytalloc_get_ptr(py_obj);
   38760           0 :         if (value == NULL) {
   38761           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.user");
   38762           0 :                 return -1;
   38763             :         }
   38764           0 :         if (value == Py_None) {
   38765           0 :                 object->in.user = NULL;
   38766             :         } else {
   38767           0 :                 object->in.user = NULL;
   38768             :                 {
   38769             :                         const char *test_str;
   38770             :                         const char *talloc_str;
   38771           0 :                         PyObject *unicode = NULL;
   38772           0 :                         if (PyUnicode_Check(value)) {
   38773           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   38774           0 :                                 if (unicode == NULL) {
   38775           0 :                                         PyErr_NoMemory();
   38776           0 :                                         return -1;
   38777             :                                 }
   38778           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   38779           0 :                         } else if (PyBytes_Check(value)) {
   38780           0 :                                 test_str = PyBytes_AS_STRING(value);
   38781             :                         } else {
   38782           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   38783           0 :                                 return -1;
   38784             :                         }
   38785           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   38786           0 :                         if (unicode != NULL) {
   38787           0 :                                 Py_DECREF(unicode);
   38788             :                         }
   38789           0 :                         if (talloc_str == NULL) {
   38790           0 :                                 PyErr_NoMemory();
   38791           0 :                                 return -1;
   38792             :                         }
   38793           0 :                         object->in.user = talloc_str;
   38794             :                 }
   38795             :         }
   38796           0 :         return 0;
   38797             : }
   38798             : 
   38799           0 : static PyObject *py_srvsvc_NetSessEnum_in_get_info_ctr(PyObject *obj, void *closure)
   38800             : {
   38801           0 :         struct srvsvc_NetSessEnum *object = (struct srvsvc_NetSessEnum *)pytalloc_get_ptr(obj);
   38802             :         PyObject *py_info_ctr;
   38803           0 :         if (object->in.info_ctr == NULL) {
   38804           0 :                 Py_RETURN_NONE;
   38805             :         }
   38806           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetSessInfoCtr_Type, object->in.info_ctr, object->in.info_ctr);
   38807           0 :         return py_info_ctr;
   38808             : }
   38809             : 
   38810           0 : static int py_srvsvc_NetSessEnum_in_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   38811             : {
   38812           0 :         struct srvsvc_NetSessEnum *object = (struct srvsvc_NetSessEnum *)pytalloc_get_ptr(py_obj);
   38813           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info_ctr));
   38814           0 :         if (value == NULL) {
   38815           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.info_ctr");
   38816           0 :                 return -1;
   38817             :         }
   38818           0 :         object->in.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info_ctr);
   38819           0 :         if (object->in.info_ctr == NULL) {
   38820           0 :                 PyErr_NoMemory();
   38821           0 :                 return -1;
   38822             :         }
   38823           0 :         PY_CHECK_TYPE(&srvsvc_NetSessInfoCtr_Type, value, return -1;);
   38824           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   38825           0 :                 PyErr_NoMemory();
   38826           0 :                 return -1;
   38827             :         }
   38828           0 :         object->in.info_ctr = (struct srvsvc_NetSessInfoCtr *)pytalloc_get_ptr(value);
   38829           0 :         return 0;
   38830             : }
   38831             : 
   38832           0 : static PyObject *py_srvsvc_NetSessEnum_out_get_info_ctr(PyObject *obj, void *closure)
   38833             : {
   38834           0 :         struct srvsvc_NetSessEnum *object = (struct srvsvc_NetSessEnum *)pytalloc_get_ptr(obj);
   38835             :         PyObject *py_info_ctr;
   38836           0 :         if (object->out.info_ctr == NULL) {
   38837           0 :                 Py_RETURN_NONE;
   38838             :         }
   38839           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetSessInfoCtr_Type, object->out.info_ctr, object->out.info_ctr);
   38840           0 :         return py_info_ctr;
   38841             : }
   38842             : 
   38843           0 : static int py_srvsvc_NetSessEnum_out_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   38844             : {
   38845           0 :         struct srvsvc_NetSessEnum *object = (struct srvsvc_NetSessEnum *)pytalloc_get_ptr(py_obj);
   38846           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info_ctr));
   38847           0 :         if (value == NULL) {
   38848           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info_ctr");
   38849           0 :                 return -1;
   38850             :         }
   38851           0 :         object->out.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info_ctr);
   38852           0 :         if (object->out.info_ctr == NULL) {
   38853           0 :                 PyErr_NoMemory();
   38854           0 :                 return -1;
   38855             :         }
   38856           0 :         PY_CHECK_TYPE(&srvsvc_NetSessInfoCtr_Type, value, return -1;);
   38857           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   38858           0 :                 PyErr_NoMemory();
   38859           0 :                 return -1;
   38860             :         }
   38861           0 :         object->out.info_ctr = (struct srvsvc_NetSessInfoCtr *)pytalloc_get_ptr(value);
   38862           0 :         return 0;
   38863             : }
   38864             : 
   38865           0 : static PyObject *py_srvsvc_NetSessEnum_in_get_max_buffer(PyObject *obj, void *closure)
   38866             : {
   38867           0 :         struct srvsvc_NetSessEnum *object = (struct srvsvc_NetSessEnum *)pytalloc_get_ptr(obj);
   38868             :         PyObject *py_max_buffer;
   38869           0 :         py_max_buffer = PyLong_FromUnsignedLongLong((uint32_t)object->in.max_buffer);
   38870           0 :         return py_max_buffer;
   38871             : }
   38872             : 
   38873           0 : static int py_srvsvc_NetSessEnum_in_set_max_buffer(PyObject *py_obj, PyObject *value, void *closure)
   38874             : {
   38875           0 :         struct srvsvc_NetSessEnum *object = (struct srvsvc_NetSessEnum *)pytalloc_get_ptr(py_obj);
   38876           0 :         if (value == NULL) {
   38877           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.max_buffer");
   38878           0 :                 return -1;
   38879             :         }
   38880             :         {
   38881           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.max_buffer));
   38882           0 :                 if (PyLong_Check(value)) {
   38883             :                         unsigned long long test_var;
   38884           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   38885           0 :                         if (PyErr_Occurred() != NULL) {
   38886           0 :                                 return -1;
   38887             :                         }
   38888           0 :                         if (test_var > uint_max) {
   38889           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38890             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38891           0 :                                 return -1;
   38892             :                         }
   38893           0 :                         object->in.max_buffer = test_var;
   38894             :                 } else {
   38895           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   38896             :                           PyLong_Type.tp_name);
   38897           0 :                         return -1;
   38898             :                 }
   38899             :         }
   38900           0 :         return 0;
   38901             : }
   38902             : 
   38903           0 : static PyObject *py_srvsvc_NetSessEnum_out_get_totalentries(PyObject *obj, void *closure)
   38904             : {
   38905           0 :         struct srvsvc_NetSessEnum *object = (struct srvsvc_NetSessEnum *)pytalloc_get_ptr(obj);
   38906             :         PyObject *py_totalentries;
   38907           0 :         if (object->out.totalentries == NULL) {
   38908           0 :                 Py_RETURN_NONE;
   38909             :         }
   38910           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)*object->out.totalentries);
   38911           0 :         return py_totalentries;
   38912             : }
   38913             : 
   38914           0 : static int py_srvsvc_NetSessEnum_out_set_totalentries(PyObject *py_obj, PyObject *value, void *closure)
   38915             : {
   38916           0 :         struct srvsvc_NetSessEnum *object = (struct srvsvc_NetSessEnum *)pytalloc_get_ptr(py_obj);
   38917           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.totalentries));
   38918           0 :         if (value == NULL) {
   38919           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.totalentries");
   38920           0 :                 return -1;
   38921             :         }
   38922           0 :         object->out.totalentries = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.totalentries);
   38923           0 :         if (object->out.totalentries == NULL) {
   38924           0 :                 PyErr_NoMemory();
   38925           0 :                 return -1;
   38926             :         }
   38927             :         {
   38928           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.totalentries));
   38929           0 :                 if (PyLong_Check(value)) {
   38930             :                         unsigned long long test_var;
   38931           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   38932           0 :                         if (PyErr_Occurred() != NULL) {
   38933           0 :                                 return -1;
   38934             :                         }
   38935           0 :                         if (test_var > uint_max) {
   38936           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38937             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38938           0 :                                 return -1;
   38939             :                         }
   38940           0 :                         *object->out.totalentries = test_var;
   38941             :                 } else {
   38942           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   38943             :                           PyLong_Type.tp_name);
   38944           0 :                         return -1;
   38945             :                 }
   38946             :         }
   38947           0 :         return 0;
   38948             : }
   38949             : 
   38950           0 : static PyObject *py_srvsvc_NetSessEnum_in_get_resume_handle(PyObject *obj, void *closure)
   38951             : {
   38952           0 :         struct srvsvc_NetSessEnum *object = (struct srvsvc_NetSessEnum *)pytalloc_get_ptr(obj);
   38953             :         PyObject *py_resume_handle;
   38954           0 :         if (object->in.resume_handle == NULL) {
   38955           0 :                 Py_RETURN_NONE;
   38956             :         }
   38957           0 :         if (object->in.resume_handle == NULL) {
   38958           0 :                 py_resume_handle = Py_None;
   38959           0 :                 Py_INCREF(py_resume_handle);
   38960             :         } else {
   38961           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)*object->in.resume_handle);
   38962             :         }
   38963           0 :         return py_resume_handle;
   38964             : }
   38965             : 
   38966           0 : static int py_srvsvc_NetSessEnum_in_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   38967             : {
   38968           0 :         struct srvsvc_NetSessEnum *object = (struct srvsvc_NetSessEnum *)pytalloc_get_ptr(py_obj);
   38969           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.resume_handle));
   38970           0 :         if (value == NULL) {
   38971           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.resume_handle");
   38972           0 :                 return -1;
   38973             :         }
   38974           0 :         if (value == Py_None) {
   38975           0 :                 object->in.resume_handle = NULL;
   38976             :         } else {
   38977           0 :                 object->in.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.resume_handle);
   38978           0 :                 if (object->in.resume_handle == NULL) {
   38979           0 :                         PyErr_NoMemory();
   38980           0 :                         return -1;
   38981             :                 }
   38982             :                 {
   38983           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.resume_handle));
   38984           0 :                         if (PyLong_Check(value)) {
   38985             :                                 unsigned long long test_var;
   38986           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   38987           0 :                                 if (PyErr_Occurred() != NULL) {
   38988           0 :                                         return -1;
   38989             :                                 }
   38990           0 :                                 if (test_var > uint_max) {
   38991           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38992             :                                           PyLong_Type.tp_name, uint_max, test_var);
   38993           0 :                                         return -1;
   38994             :                                 }
   38995           0 :                                 *object->in.resume_handle = test_var;
   38996             :                         } else {
   38997           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   38998             :                                   PyLong_Type.tp_name);
   38999           0 :                                 return -1;
   39000             :                         }
   39001             :                 }
   39002             :         }
   39003           0 :         return 0;
   39004             : }
   39005             : 
   39006           0 : static PyObject *py_srvsvc_NetSessEnum_out_get_resume_handle(PyObject *obj, void *closure)
   39007             : {
   39008           0 :         struct srvsvc_NetSessEnum *object = (struct srvsvc_NetSessEnum *)pytalloc_get_ptr(obj);
   39009             :         PyObject *py_resume_handle;
   39010           0 :         if (object->out.resume_handle == NULL) {
   39011           0 :                 Py_RETURN_NONE;
   39012             :         }
   39013           0 :         if (object->out.resume_handle == NULL) {
   39014           0 :                 py_resume_handle = Py_None;
   39015           0 :                 Py_INCREF(py_resume_handle);
   39016             :         } else {
   39017           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)*object->out.resume_handle);
   39018             :         }
   39019           0 :         return py_resume_handle;
   39020             : }
   39021             : 
   39022           0 : static int py_srvsvc_NetSessEnum_out_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   39023             : {
   39024           0 :         struct srvsvc_NetSessEnum *object = (struct srvsvc_NetSessEnum *)pytalloc_get_ptr(py_obj);
   39025           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.resume_handle));
   39026           0 :         if (value == NULL) {
   39027           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.resume_handle");
   39028           0 :                 return -1;
   39029             :         }
   39030           0 :         if (value == Py_None) {
   39031           0 :                 object->out.resume_handle = NULL;
   39032             :         } else {
   39033           0 :                 object->out.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.resume_handle);
   39034           0 :                 if (object->out.resume_handle == NULL) {
   39035           0 :                         PyErr_NoMemory();
   39036           0 :                         return -1;
   39037             :                 }
   39038             :                 {
   39039           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.resume_handle));
   39040           0 :                         if (PyLong_Check(value)) {
   39041             :                                 unsigned long long test_var;
   39042           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   39043           0 :                                 if (PyErr_Occurred() != NULL) {
   39044           0 :                                         return -1;
   39045             :                                 }
   39046           0 :                                 if (test_var > uint_max) {
   39047           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   39048             :                                           PyLong_Type.tp_name, uint_max, test_var);
   39049           0 :                                         return -1;
   39050             :                                 }
   39051           0 :                                 *object->out.resume_handle = test_var;
   39052             :                         } else {
   39053           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   39054             :                                   PyLong_Type.tp_name);
   39055           0 :                                 return -1;
   39056             :                         }
   39057             :                 }
   39058             :         }
   39059           0 :         return 0;
   39060             : }
   39061             : 
   39062           0 : static PyObject *py_srvsvc_NetSessEnum_get_result(PyObject *obj, void *closure)
   39063             : {
   39064           0 :         struct srvsvc_NetSessEnum *object = (struct srvsvc_NetSessEnum *)pytalloc_get_ptr(obj);
   39065             :         PyObject *py_result;
   39066           0 :         py_result = PyErr_FromWERROR(object->out.result);
   39067           0 :         return py_result;
   39068             : }
   39069             : 
   39070           0 : static int py_srvsvc_NetSessEnum_set_result(PyObject *py_obj, PyObject *value, void *closure)
   39071             : {
   39072           0 :         struct srvsvc_NetSessEnum *object = (struct srvsvc_NetSessEnum *)pytalloc_get_ptr(py_obj);
   39073           0 :         if (value == NULL) {
   39074           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   39075           0 :                 return -1;
   39076             :         }
   39077           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   39078           0 :         return 0;
   39079             : }
   39080             : 
   39081             : static PyGetSetDef py_srvsvc_NetSessEnum_getsetters[] = {
   39082             :         {
   39083             :                 .name = discard_const_p(char, "in_server_unc"),
   39084             :                 .get = py_srvsvc_NetSessEnum_in_get_server_unc,
   39085             :                 .set = py_srvsvc_NetSessEnum_in_set_server_unc,
   39086             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   39087             :         },
   39088             :         {
   39089             :                 .name = discard_const_p(char, "in_client"),
   39090             :                 .get = py_srvsvc_NetSessEnum_in_get_client,
   39091             :                 .set = py_srvsvc_NetSessEnum_in_set_client,
   39092             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   39093             :         },
   39094             :         {
   39095             :                 .name = discard_const_p(char, "in_user"),
   39096             :                 .get = py_srvsvc_NetSessEnum_in_get_user,
   39097             :                 .set = py_srvsvc_NetSessEnum_in_set_user,
   39098             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   39099             :         },
   39100             :         {
   39101             :                 .name = discard_const_p(char, "in_info_ctr"),
   39102             :                 .get = py_srvsvc_NetSessEnum_in_get_info_ctr,
   39103             :                 .set = py_srvsvc_NetSessEnum_in_set_info_ctr,
   39104             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetSessInfoCtr")
   39105             :         },
   39106             :         {
   39107             :                 .name = discard_const_p(char, "out_info_ctr"),
   39108             :                 .get = py_srvsvc_NetSessEnum_out_get_info_ctr,
   39109             :                 .set = py_srvsvc_NetSessEnum_out_set_info_ctr,
   39110             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetSessInfoCtr")
   39111             :         },
   39112             :         {
   39113             :                 .name = discard_const_p(char, "in_max_buffer"),
   39114             :                 .get = py_srvsvc_NetSessEnum_in_get_max_buffer,
   39115             :                 .set = py_srvsvc_NetSessEnum_in_set_max_buffer,
   39116             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   39117             :         },
   39118             :         {
   39119             :                 .name = discard_const_p(char, "out_totalentries"),
   39120             :                 .get = py_srvsvc_NetSessEnum_out_get_totalentries,
   39121             :                 .set = py_srvsvc_NetSessEnum_out_set_totalentries,
   39122             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   39123             :         },
   39124             :         {
   39125             :                 .name = discard_const_p(char, "in_resume_handle"),
   39126             :                 .get = py_srvsvc_NetSessEnum_in_get_resume_handle,
   39127             :                 .set = py_srvsvc_NetSessEnum_in_set_resume_handle,
   39128             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   39129             :         },
   39130             :         {
   39131             :                 .name = discard_const_p(char, "out_resume_handle"),
   39132             :                 .get = py_srvsvc_NetSessEnum_out_get_resume_handle,
   39133             :                 .set = py_srvsvc_NetSessEnum_out_set_resume_handle,
   39134             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   39135             :         },
   39136             :         {
   39137             :                 .name = discard_const_p(char, "result"),
   39138             :                 .get = py_srvsvc_NetSessEnum_get_result,
   39139             :                 .set = py_srvsvc_NetSessEnum_set_result,
   39140             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   39141             :         },
   39142             :         { .name = NULL }
   39143             : };
   39144             : 
   39145           0 : static PyObject *py_srvsvc_NetSessEnum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   39146             : {
   39147           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetSessEnum, type);
   39148           0 :         struct srvsvc_NetSessEnum *_self = (struct srvsvc_NetSessEnum *)pytalloc_get_ptr(self);
   39149           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   39150           0 :         _self->in.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetSessInfoCtr);
   39151           0 :         _self->out.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetSessInfoCtr);
   39152           0 :         _self->out.totalentries = talloc_zero(mem_ctx, uint32_t);
   39153           0 :         return self;
   39154             : }
   39155             : 
   39156           0 : static PyObject *py_srvsvc_NetSessEnum_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   39157             : {
   39158             : 
   39159             : 
   39160           0 :         return PyLong_FromLong(12);
   39161             : }
   39162             : 
   39163           0 : static PyObject *py_srvsvc_NetSessEnum_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   39164             : {
   39165           0 :         const struct ndr_interface_call *call = NULL;
   39166           0 :         struct srvsvc_NetSessEnum *object = (struct srvsvc_NetSessEnum *)pytalloc_get_ptr(py_obj);
   39167           0 :         PyObject *ret = NULL;
   39168           0 :         struct ndr_push *push = NULL;
   39169             :         DATA_BLOB blob;
   39170             :         enum ndr_err_code err;
   39171             : 
   39172           0 :         if (ndr_table_srvsvc.num_calls < 13) {
   39173           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSessEnum_ndr_pack");
   39174           0 :                 return NULL;
   39175             :         }
   39176           0 :         call = &ndr_table_srvsvc.calls[12];
   39177             : 
   39178           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   39179           0 :         if (push == NULL) {
   39180           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   39181           0 :                 return NULL;
   39182             :         }
   39183             : 
   39184           0 :         push->flags |= ndr_push_flags;
   39185             : 
   39186           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   39187           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   39188           0 :                 TALLOC_FREE(push);
   39189           0 :                 PyErr_SetNdrError(err);
   39190           0 :                 return NULL;
   39191             :         }
   39192           0 :         blob = ndr_push_blob(push);
   39193           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   39194           0 :         TALLOC_FREE(push);
   39195           0 :         return ret;
   39196             : }
   39197             : 
   39198           0 : static PyObject *py_srvsvc_NetSessEnum_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39199             : {
   39200           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   39201           0 :         PyObject *bigendian_obj = NULL;
   39202           0 :         PyObject *ndr64_obj = NULL;
   39203           0 :         uint32_t ndr_push_flags = 0;
   39204             : 
   39205           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   39206             :                 discard_const_p(char *, kwnames),
   39207             :                 &bigendian_obj,
   39208             :                 &ndr64_obj)) {
   39209           0 :                 return NULL;
   39210             :         }
   39211             : 
   39212           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39213           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   39214             :         }
   39215           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39216           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   39217             :         }
   39218             : 
   39219           0 :         return py_srvsvc_NetSessEnum_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   39220             : }
   39221             : 
   39222           0 : static PyObject *py_srvsvc_NetSessEnum_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39223             : {
   39224           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   39225           0 :         PyObject *bigendian_obj = NULL;
   39226           0 :         PyObject *ndr64_obj = NULL;
   39227           0 :         uint32_t ndr_push_flags = 0;
   39228             : 
   39229           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   39230             :                 discard_const_p(char *, kwnames),
   39231             :                 &bigendian_obj,
   39232             :                 &ndr64_obj)) {
   39233           0 :                 return NULL;
   39234             :         }
   39235             : 
   39236           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39237           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   39238             :         }
   39239           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39240           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   39241             :         }
   39242             : 
   39243           0 :         return py_srvsvc_NetSessEnum_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   39244             : }
   39245             : 
   39246           0 : static PyObject *py_srvsvc_NetSessEnum_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   39247             : {
   39248           0 :         const struct ndr_interface_call *call = NULL;
   39249           0 :         struct srvsvc_NetSessEnum *object = (struct srvsvc_NetSessEnum *)pytalloc_get_ptr(py_obj);
   39250           0 :         struct ndr_pull *pull = NULL;
   39251             :         enum ndr_err_code err;
   39252             : 
   39253           0 :         if (ndr_table_srvsvc.num_calls < 13) {
   39254           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSessEnum_ndr_unpack");
   39255           0 :                 return NULL;
   39256             :         }
   39257           0 :         call = &ndr_table_srvsvc.calls[12];
   39258             : 
   39259           0 :         pull = ndr_pull_init_blob(blob, object);
   39260           0 :         if (pull == NULL) {
   39261           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   39262           0 :                 return NULL;
   39263             :         }
   39264             : 
   39265           0 :         pull->flags |= ndr_pull_flags;
   39266             : 
   39267           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   39268           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   39269           0 :                 TALLOC_FREE(pull);
   39270           0 :                 PyErr_SetNdrError(err);
   39271           0 :                 return NULL;
   39272             :         }
   39273           0 :         if (!allow_remaining) {
   39274             :                 uint32_t highest_ofs;
   39275             : 
   39276           0 :                 if (pull->offset > pull->relative_highest_offset) {
   39277           0 :                         highest_ofs = pull->offset;
   39278             :                 } else {
   39279           0 :                         highest_ofs = pull->relative_highest_offset;
   39280             :                 }
   39281           0 :                 if (highest_ofs < pull->data_size) {
   39282           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   39283             :                                 "not all bytes consumed ofs[%u] size[%u]",
   39284             :                                 highest_ofs, pull->data_size);
   39285           0 :                         TALLOC_FREE(pull);
   39286           0 :                         PyErr_SetNdrError(err);
   39287           0 :                         return NULL;
   39288             :                 }
   39289             :         }
   39290             : 
   39291           0 :         TALLOC_FREE(pull);
   39292           0 :         Py_RETURN_NONE;
   39293             : }
   39294             : 
   39295           0 : static PyObject *py_srvsvc_NetSessEnum_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39296             : {
   39297             :         DATA_BLOB blob;
   39298           0 :         Py_ssize_t blob_length = 0;
   39299           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   39300           0 :         PyObject *bigendian_obj = NULL;
   39301           0 :         PyObject *ndr64_obj = NULL;
   39302           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   39303           0 :         PyObject *allow_remaining_obj = NULL;
   39304           0 :         bool allow_remaining = false;
   39305             : 
   39306           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   39307             :                 discard_const_p(char *, kwnames),
   39308             :                 &blob.data, &blob_length,
   39309             :                 &bigendian_obj,
   39310             :                 &ndr64_obj,
   39311             :                 &allow_remaining_obj)) {
   39312           0 :                 return NULL;
   39313             :         }
   39314           0 :         blob.length = blob_length;
   39315             : 
   39316           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39317           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   39318             :         }
   39319           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39320           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   39321             :         }
   39322             : 
   39323           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   39324           0 :                 allow_remaining = true;
   39325             :         }
   39326             : 
   39327           0 :         return py_srvsvc_NetSessEnum_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   39328             : }
   39329             : 
   39330           0 : static PyObject *py_srvsvc_NetSessEnum_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39331             : {
   39332             :         DATA_BLOB blob;
   39333           0 :         Py_ssize_t blob_length = 0;
   39334           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   39335           0 :         PyObject *bigendian_obj = NULL;
   39336           0 :         PyObject *ndr64_obj = NULL;
   39337           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   39338           0 :         PyObject *allow_remaining_obj = NULL;
   39339           0 :         bool allow_remaining = false;
   39340             : 
   39341           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   39342             :                 discard_const_p(char *, kwnames),
   39343             :                 &blob.data, &blob_length,
   39344             :                 &bigendian_obj,
   39345             :                 &ndr64_obj,
   39346             :                 &allow_remaining_obj)) {
   39347           0 :                 return NULL;
   39348             :         }
   39349           0 :         blob.length = blob_length;
   39350             : 
   39351           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39352           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   39353             :         }
   39354           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39355           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   39356             :         }
   39357             : 
   39358           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   39359           0 :                 allow_remaining = true;
   39360             :         }
   39361             : 
   39362           0 :         return py_srvsvc_NetSessEnum_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   39363             : }
   39364             : 
   39365           0 : static PyObject *py_srvsvc_NetSessEnum_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   39366             : {
   39367           0 :         const struct ndr_interface_call *call = NULL;
   39368           0 :         struct srvsvc_NetSessEnum *object = (struct srvsvc_NetSessEnum *)pytalloc_get_ptr(py_obj);
   39369             :         PyObject *ret;
   39370             :         char *retstr;
   39371             : 
   39372           0 :         if (ndr_table_srvsvc.num_calls < 13) {
   39373           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSessEnum_ndr_print");
   39374           0 :                 return NULL;
   39375             :         }
   39376           0 :         call = &ndr_table_srvsvc.calls[12];
   39377             : 
   39378           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   39379           0 :         ret = PyUnicode_FromString(retstr);
   39380           0 :         TALLOC_FREE(retstr);
   39381             : 
   39382           0 :         return ret;
   39383             : }
   39384             : 
   39385           0 : static PyObject *py_srvsvc_NetSessEnum_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   39386             : {
   39387           0 :         return py_srvsvc_NetSessEnum_ndr_print(py_obj, "srvsvc_NetSessEnum_in", NDR_IN);
   39388             : }
   39389             : 
   39390           0 : static PyObject *py_srvsvc_NetSessEnum_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   39391             : {
   39392           0 :         return py_srvsvc_NetSessEnum_ndr_print(py_obj, "srvsvc_NetSessEnum_out", NDR_OUT);
   39393             : }
   39394             : 
   39395             : static PyMethodDef py_srvsvc_NetSessEnum_methods[] = {
   39396             :         { "opnum", (PyCFunction)py_srvsvc_NetSessEnum_ndr_opnum, METH_NOARGS|METH_CLASS,
   39397             :                 "srvsvc.NetSessEnum.opnum() -> 12 (0x0c) " },
   39398             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSessEnum_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   39399             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   39400             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSessEnum_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   39401             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   39402             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSessEnum_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   39403             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   39404             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSessEnum_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   39405             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   39406             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetSessEnum_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   39407             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetSessEnum_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   39408             :         { NULL, NULL, 0, NULL }
   39409             : };
   39410             : 
   39411             : 
   39412             : static PyTypeObject srvsvc_NetSessEnum_Type = {
   39413             :         PyVarObject_HEAD_INIT(NULL, 0)
   39414             :         .tp_name = "srvsvc.NetSessEnum",
   39415             :         .tp_getset = py_srvsvc_NetSessEnum_getsetters,
   39416             :         .tp_methods = py_srvsvc_NetSessEnum_methods,
   39417             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   39418             :         .tp_new = py_srvsvc_NetSessEnum_new,
   39419             : };
   39420             : 
   39421           0 : static bool pack_py_srvsvc_NetSessEnum_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetSessEnum *r)
   39422             : {
   39423             :         PyObject *py_server_unc;
   39424             :         PyObject *py_client;
   39425             :         PyObject *py_user;
   39426             :         PyObject *py_info_ctr;
   39427             :         PyObject *py_max_buffer;
   39428             :         PyObject *py_resume_handle;
   39429           0 :         const char *kwnames[] = {
   39430             :                 "server_unc", "client", "user", "info_ctr", "max_buffer", "resume_handle", NULL
   39431             :         };
   39432             : 
   39433           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:srvsvc_NetSessEnum", discard_const_p(char *, kwnames), &py_server_unc, &py_client, &py_user, &py_info_ctr, &py_max_buffer, &py_resume_handle)) {
   39434           0 :                 return false;
   39435             :         }
   39436             : 
   39437           0 :         if (py_server_unc == NULL) {
   39438           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   39439           0 :                 return false;
   39440             :         }
   39441           0 :         if (py_server_unc == Py_None) {
   39442           0 :                 r->in.server_unc = NULL;
   39443             :         } else {
   39444           0 :                 r->in.server_unc = NULL;
   39445             :                 {
   39446             :                         const char *test_str;
   39447             :                         const char *talloc_str;
   39448           0 :                         PyObject *unicode = NULL;
   39449           0 :                         if (PyUnicode_Check(py_server_unc)) {
   39450           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   39451           0 :                                 if (unicode == NULL) {
   39452           0 :                                         PyErr_NoMemory();
   39453           0 :                                         return false;
   39454             :                                 }
   39455           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   39456           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   39457           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   39458             :                         } else {
   39459           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   39460           0 :                                 return false;
   39461             :                         }
   39462           0 :                         talloc_str = talloc_strdup(r, test_str);
   39463           0 :                         if (unicode != NULL) {
   39464           0 :                                 Py_DECREF(unicode);
   39465             :                         }
   39466           0 :                         if (talloc_str == NULL) {
   39467           0 :                                 PyErr_NoMemory();
   39468           0 :                                 return false;
   39469             :                         }
   39470           0 :                         r->in.server_unc = talloc_str;
   39471             :                 }
   39472             :         }
   39473           0 :         if (py_client == NULL) {
   39474           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client");
   39475           0 :                 return false;
   39476             :         }
   39477           0 :         if (py_client == Py_None) {
   39478           0 :                 r->in.client = NULL;
   39479             :         } else {
   39480           0 :                 r->in.client = NULL;
   39481             :                 {
   39482             :                         const char *test_str;
   39483             :                         const char *talloc_str;
   39484           0 :                         PyObject *unicode = NULL;
   39485           0 :                         if (PyUnicode_Check(py_client)) {
   39486           0 :                                 unicode = PyUnicode_AsEncodedString(py_client, "utf-8", "ignore");
   39487           0 :                                 if (unicode == NULL) {
   39488           0 :                                         PyErr_NoMemory();
   39489           0 :                                         return false;
   39490             :                                 }
   39491           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   39492           0 :                         } else if (PyBytes_Check(py_client)) {
   39493           0 :                                 test_str = PyBytes_AS_STRING(py_client);
   39494             :                         } else {
   39495           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_client)->tp_name);
   39496           0 :                                 return false;
   39497             :                         }
   39498           0 :                         talloc_str = talloc_strdup(r, test_str);
   39499           0 :                         if (unicode != NULL) {
   39500           0 :                                 Py_DECREF(unicode);
   39501             :                         }
   39502           0 :                         if (talloc_str == NULL) {
   39503           0 :                                 PyErr_NoMemory();
   39504           0 :                                 return false;
   39505             :                         }
   39506           0 :                         r->in.client = talloc_str;
   39507             :                 }
   39508             :         }
   39509           0 :         if (py_user == NULL) {
   39510           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.user");
   39511           0 :                 return false;
   39512             :         }
   39513           0 :         if (py_user == Py_None) {
   39514           0 :                 r->in.user = NULL;
   39515             :         } else {
   39516           0 :                 r->in.user = NULL;
   39517             :                 {
   39518             :                         const char *test_str;
   39519             :                         const char *talloc_str;
   39520           0 :                         PyObject *unicode = NULL;
   39521           0 :                         if (PyUnicode_Check(py_user)) {
   39522           0 :                                 unicode = PyUnicode_AsEncodedString(py_user, "utf-8", "ignore");
   39523           0 :                                 if (unicode == NULL) {
   39524           0 :                                         PyErr_NoMemory();
   39525           0 :                                         return false;
   39526             :                                 }
   39527           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   39528           0 :                         } else if (PyBytes_Check(py_user)) {
   39529           0 :                                 test_str = PyBytes_AS_STRING(py_user);
   39530             :                         } else {
   39531           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_user)->tp_name);
   39532           0 :                                 return false;
   39533             :                         }
   39534           0 :                         talloc_str = talloc_strdup(r, test_str);
   39535           0 :                         if (unicode != NULL) {
   39536           0 :                                 Py_DECREF(unicode);
   39537             :                         }
   39538           0 :                         if (talloc_str == NULL) {
   39539           0 :                                 PyErr_NoMemory();
   39540           0 :                                 return false;
   39541             :                         }
   39542           0 :                         r->in.user = talloc_str;
   39543             :                 }
   39544             :         }
   39545           0 :         if (py_info_ctr == NULL) {
   39546           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info_ctr");
   39547           0 :                 return false;
   39548             :         }
   39549           0 :         r->in.info_ctr = talloc_ptrtype(r, r->in.info_ctr);
   39550           0 :         if (r->in.info_ctr == NULL) {
   39551           0 :                 PyErr_NoMemory();
   39552           0 :                 return false;
   39553             :         }
   39554           0 :         PY_CHECK_TYPE(&srvsvc_NetSessInfoCtr_Type, py_info_ctr, return false;);
   39555           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_info_ctr)) == NULL) {
   39556           0 :                 PyErr_NoMemory();
   39557           0 :                 return false;
   39558             :         }
   39559           0 :         r->in.info_ctr = (struct srvsvc_NetSessInfoCtr *)pytalloc_get_ptr(py_info_ctr);
   39560           0 :         if (py_max_buffer == NULL) {
   39561           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.max_buffer");
   39562           0 :                 return false;
   39563             :         }
   39564             :         {
   39565           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
   39566           0 :                 if (PyLong_Check(py_max_buffer)) {
   39567             :                         unsigned long long test_var;
   39568           0 :                         test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
   39569           0 :                         if (PyErr_Occurred() != NULL) {
   39570           0 :                                 return false;
   39571             :                         }
   39572           0 :                         if (test_var > uint_max) {
   39573           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   39574             :                                   PyLong_Type.tp_name, uint_max, test_var);
   39575           0 :                                 return false;
   39576             :                         }
   39577           0 :                         r->in.max_buffer = test_var;
   39578             :                 } else {
   39579           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   39580             :                           PyLong_Type.tp_name);
   39581           0 :                         return false;
   39582             :                 }
   39583             :         }
   39584           0 :         if (py_resume_handle == NULL) {
   39585           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.resume_handle");
   39586           0 :                 return false;
   39587             :         }
   39588           0 :         if (py_resume_handle == Py_None) {
   39589           0 :                 r->in.resume_handle = NULL;
   39590             :         } else {
   39591           0 :                 r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
   39592           0 :                 if (r->in.resume_handle == NULL) {
   39593           0 :                         PyErr_NoMemory();
   39594           0 :                         return false;
   39595             :                 }
   39596             :                 {
   39597           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
   39598           0 :                         if (PyLong_Check(py_resume_handle)) {
   39599             :                                 unsigned long long test_var;
   39600           0 :                                 test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
   39601           0 :                                 if (PyErr_Occurred() != NULL) {
   39602           0 :                                         return false;
   39603             :                                 }
   39604           0 :                                 if (test_var > uint_max) {
   39605           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   39606             :                                           PyLong_Type.tp_name, uint_max, test_var);
   39607           0 :                                         return false;
   39608             :                                 }
   39609           0 :                                 *r->in.resume_handle = test_var;
   39610             :                         } else {
   39611           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   39612             :                                   PyLong_Type.tp_name);
   39613           0 :                                 return false;
   39614             :                         }
   39615             :                 }
   39616             :         }
   39617           0 :         return true;
   39618             : }
   39619             : 
   39620           0 : static PyObject *unpack_py_srvsvc_NetSessEnum_args_out(struct srvsvc_NetSessEnum *r)
   39621             : {
   39622             :         PyObject *result;
   39623             :         PyObject *py_info_ctr;
   39624             :         PyObject *py_totalentries;
   39625             :         PyObject *py_resume_handle;
   39626           0 :         result = PyTuple_New(3);
   39627           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetSessInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
   39628           0 :         PyTuple_SetItem(result, 0, py_info_ctr);
   39629           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)*r->out.totalentries);
   39630           0 :         PyTuple_SetItem(result, 1, py_totalentries);
   39631           0 :         if (r->out.resume_handle == NULL) {
   39632           0 :                 py_resume_handle = Py_None;
   39633           0 :                 Py_INCREF(py_resume_handle);
   39634             :         } else {
   39635           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)*r->out.resume_handle);
   39636             :         }
   39637           0 :         PyTuple_SetItem(result, 2, py_resume_handle);
   39638           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   39639           0 :                 PyErr_SetWERROR(r->out.result);
   39640           0 :                 return NULL;
   39641             :         }
   39642             : 
   39643           0 :         return result;
   39644             : }
   39645             : 
   39646             : 
   39647           0 : static PyObject *py_srvsvc_NetSessDel_in_get_server_unc(PyObject *obj, void *closure)
   39648             : {
   39649           0 :         struct srvsvc_NetSessDel *object = (struct srvsvc_NetSessDel *)pytalloc_get_ptr(obj);
   39650             :         PyObject *py_server_unc;
   39651           0 :         if (object->in.server_unc == NULL) {
   39652           0 :                 Py_RETURN_NONE;
   39653             :         }
   39654           0 :         if (object->in.server_unc == NULL) {
   39655           0 :                 py_server_unc = Py_None;
   39656           0 :                 Py_INCREF(py_server_unc);
   39657             :         } else {
   39658           0 :                 if (object->in.server_unc == NULL) {
   39659           0 :                         py_server_unc = Py_None;
   39660           0 :                         Py_INCREF(py_server_unc);
   39661             :                 } else {
   39662           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   39663             :                 }
   39664             :         }
   39665           0 :         return py_server_unc;
   39666             : }
   39667             : 
   39668           0 : static int py_srvsvc_NetSessDel_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   39669             : {
   39670           0 :         struct srvsvc_NetSessDel *object = (struct srvsvc_NetSessDel *)pytalloc_get_ptr(py_obj);
   39671           0 :         if (value == NULL) {
   39672           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   39673           0 :                 return -1;
   39674             :         }
   39675           0 :         if (value == Py_None) {
   39676           0 :                 object->in.server_unc = NULL;
   39677             :         } else {
   39678           0 :                 object->in.server_unc = NULL;
   39679             :                 {
   39680             :                         const char *test_str;
   39681             :                         const char *talloc_str;
   39682           0 :                         PyObject *unicode = NULL;
   39683           0 :                         if (PyUnicode_Check(value)) {
   39684           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   39685           0 :                                 if (unicode == NULL) {
   39686           0 :                                         PyErr_NoMemory();
   39687           0 :                                         return -1;
   39688             :                                 }
   39689           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   39690           0 :                         } else if (PyBytes_Check(value)) {
   39691           0 :                                 test_str = PyBytes_AS_STRING(value);
   39692             :                         } else {
   39693           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   39694           0 :                                 return -1;
   39695             :                         }
   39696           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   39697           0 :                         if (unicode != NULL) {
   39698           0 :                                 Py_DECREF(unicode);
   39699             :                         }
   39700           0 :                         if (talloc_str == NULL) {
   39701           0 :                                 PyErr_NoMemory();
   39702           0 :                                 return -1;
   39703             :                         }
   39704           0 :                         object->in.server_unc = talloc_str;
   39705             :                 }
   39706             :         }
   39707           0 :         return 0;
   39708             : }
   39709             : 
   39710           0 : static PyObject *py_srvsvc_NetSessDel_in_get_client(PyObject *obj, void *closure)
   39711             : {
   39712           0 :         struct srvsvc_NetSessDel *object = (struct srvsvc_NetSessDel *)pytalloc_get_ptr(obj);
   39713             :         PyObject *py_client;
   39714           0 :         if (object->in.client == NULL) {
   39715           0 :                 Py_RETURN_NONE;
   39716             :         }
   39717           0 :         if (object->in.client == NULL) {
   39718           0 :                 py_client = Py_None;
   39719           0 :                 Py_INCREF(py_client);
   39720             :         } else {
   39721           0 :                 if (object->in.client == NULL) {
   39722           0 :                         py_client = Py_None;
   39723           0 :                         Py_INCREF(py_client);
   39724             :                 } else {
   39725           0 :                         py_client = PyUnicode_Decode(object->in.client, strlen(object->in.client), "utf-8", "ignore");
   39726             :                 }
   39727             :         }
   39728           0 :         return py_client;
   39729             : }
   39730             : 
   39731           0 : static int py_srvsvc_NetSessDel_in_set_client(PyObject *py_obj, PyObject *value, void *closure)
   39732             : {
   39733           0 :         struct srvsvc_NetSessDel *object = (struct srvsvc_NetSessDel *)pytalloc_get_ptr(py_obj);
   39734           0 :         if (value == NULL) {
   39735           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client");
   39736           0 :                 return -1;
   39737             :         }
   39738           0 :         if (value == Py_None) {
   39739           0 :                 object->in.client = NULL;
   39740             :         } else {
   39741           0 :                 object->in.client = NULL;
   39742             :                 {
   39743             :                         const char *test_str;
   39744             :                         const char *talloc_str;
   39745           0 :                         PyObject *unicode = NULL;
   39746           0 :                         if (PyUnicode_Check(value)) {
   39747           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   39748           0 :                                 if (unicode == NULL) {
   39749           0 :                                         PyErr_NoMemory();
   39750           0 :                                         return -1;
   39751             :                                 }
   39752           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   39753           0 :                         } else if (PyBytes_Check(value)) {
   39754           0 :                                 test_str = PyBytes_AS_STRING(value);
   39755             :                         } else {
   39756           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   39757           0 :                                 return -1;
   39758             :                         }
   39759           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   39760           0 :                         if (unicode != NULL) {
   39761           0 :                                 Py_DECREF(unicode);
   39762             :                         }
   39763           0 :                         if (talloc_str == NULL) {
   39764           0 :                                 PyErr_NoMemory();
   39765           0 :                                 return -1;
   39766             :                         }
   39767           0 :                         object->in.client = talloc_str;
   39768             :                 }
   39769             :         }
   39770           0 :         return 0;
   39771             : }
   39772             : 
   39773           0 : static PyObject *py_srvsvc_NetSessDel_in_get_user(PyObject *obj, void *closure)
   39774             : {
   39775           0 :         struct srvsvc_NetSessDel *object = (struct srvsvc_NetSessDel *)pytalloc_get_ptr(obj);
   39776             :         PyObject *py_user;
   39777           0 :         if (object->in.user == NULL) {
   39778           0 :                 Py_RETURN_NONE;
   39779             :         }
   39780           0 :         if (object->in.user == NULL) {
   39781           0 :                 py_user = Py_None;
   39782           0 :                 Py_INCREF(py_user);
   39783             :         } else {
   39784           0 :                 if (object->in.user == NULL) {
   39785           0 :                         py_user = Py_None;
   39786           0 :                         Py_INCREF(py_user);
   39787             :                 } else {
   39788           0 :                         py_user = PyUnicode_Decode(object->in.user, strlen(object->in.user), "utf-8", "ignore");
   39789             :                 }
   39790             :         }
   39791           0 :         return py_user;
   39792             : }
   39793             : 
   39794           0 : static int py_srvsvc_NetSessDel_in_set_user(PyObject *py_obj, PyObject *value, void *closure)
   39795             : {
   39796           0 :         struct srvsvc_NetSessDel *object = (struct srvsvc_NetSessDel *)pytalloc_get_ptr(py_obj);
   39797           0 :         if (value == NULL) {
   39798           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.user");
   39799           0 :                 return -1;
   39800             :         }
   39801           0 :         if (value == Py_None) {
   39802           0 :                 object->in.user = NULL;
   39803             :         } else {
   39804           0 :                 object->in.user = NULL;
   39805             :                 {
   39806             :                         const char *test_str;
   39807             :                         const char *talloc_str;
   39808           0 :                         PyObject *unicode = NULL;
   39809           0 :                         if (PyUnicode_Check(value)) {
   39810           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   39811           0 :                                 if (unicode == NULL) {
   39812           0 :                                         PyErr_NoMemory();
   39813           0 :                                         return -1;
   39814             :                                 }
   39815           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   39816           0 :                         } else if (PyBytes_Check(value)) {
   39817           0 :                                 test_str = PyBytes_AS_STRING(value);
   39818             :                         } else {
   39819           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   39820           0 :                                 return -1;
   39821             :                         }
   39822           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   39823           0 :                         if (unicode != NULL) {
   39824           0 :                                 Py_DECREF(unicode);
   39825             :                         }
   39826           0 :                         if (talloc_str == NULL) {
   39827           0 :                                 PyErr_NoMemory();
   39828           0 :                                 return -1;
   39829             :                         }
   39830           0 :                         object->in.user = talloc_str;
   39831             :                 }
   39832             :         }
   39833           0 :         return 0;
   39834             : }
   39835             : 
   39836           0 : static PyObject *py_srvsvc_NetSessDel_get_result(PyObject *obj, void *closure)
   39837             : {
   39838           0 :         struct srvsvc_NetSessDel *object = (struct srvsvc_NetSessDel *)pytalloc_get_ptr(obj);
   39839             :         PyObject *py_result;
   39840           0 :         py_result = PyErr_FromWERROR(object->out.result);
   39841           0 :         return py_result;
   39842             : }
   39843             : 
   39844           0 : static int py_srvsvc_NetSessDel_set_result(PyObject *py_obj, PyObject *value, void *closure)
   39845             : {
   39846           0 :         struct srvsvc_NetSessDel *object = (struct srvsvc_NetSessDel *)pytalloc_get_ptr(py_obj);
   39847           0 :         if (value == NULL) {
   39848           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   39849           0 :                 return -1;
   39850             :         }
   39851           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   39852           0 :         return 0;
   39853             : }
   39854             : 
   39855             : static PyGetSetDef py_srvsvc_NetSessDel_getsetters[] = {
   39856             :         {
   39857             :                 .name = discard_const_p(char, "in_server_unc"),
   39858             :                 .get = py_srvsvc_NetSessDel_in_get_server_unc,
   39859             :                 .set = py_srvsvc_NetSessDel_in_set_server_unc,
   39860             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   39861             :         },
   39862             :         {
   39863             :                 .name = discard_const_p(char, "in_client"),
   39864             :                 .get = py_srvsvc_NetSessDel_in_get_client,
   39865             :                 .set = py_srvsvc_NetSessDel_in_set_client,
   39866             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   39867             :         },
   39868             :         {
   39869             :                 .name = discard_const_p(char, "in_user"),
   39870             :                 .get = py_srvsvc_NetSessDel_in_get_user,
   39871             :                 .set = py_srvsvc_NetSessDel_in_set_user,
   39872             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   39873             :         },
   39874             :         {
   39875             :                 .name = discard_const_p(char, "result"),
   39876             :                 .get = py_srvsvc_NetSessDel_get_result,
   39877             :                 .set = py_srvsvc_NetSessDel_set_result,
   39878             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   39879             :         },
   39880             :         { .name = NULL }
   39881             : };
   39882             : 
   39883           0 : static PyObject *py_srvsvc_NetSessDel_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   39884             : {
   39885           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetSessDel, type);
   39886           0 :         return self;
   39887             : }
   39888             : 
   39889           0 : static PyObject *py_srvsvc_NetSessDel_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   39890             : {
   39891             : 
   39892             : 
   39893           0 :         return PyLong_FromLong(13);
   39894             : }
   39895             : 
   39896           0 : static PyObject *py_srvsvc_NetSessDel_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   39897             : {
   39898           0 :         const struct ndr_interface_call *call = NULL;
   39899           0 :         struct srvsvc_NetSessDel *object = (struct srvsvc_NetSessDel *)pytalloc_get_ptr(py_obj);
   39900           0 :         PyObject *ret = NULL;
   39901           0 :         struct ndr_push *push = NULL;
   39902             :         DATA_BLOB blob;
   39903             :         enum ndr_err_code err;
   39904             : 
   39905           0 :         if (ndr_table_srvsvc.num_calls < 14) {
   39906           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSessDel_ndr_pack");
   39907           0 :                 return NULL;
   39908             :         }
   39909           0 :         call = &ndr_table_srvsvc.calls[13];
   39910             : 
   39911           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   39912           0 :         if (push == NULL) {
   39913           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   39914           0 :                 return NULL;
   39915             :         }
   39916             : 
   39917           0 :         push->flags |= ndr_push_flags;
   39918             : 
   39919           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   39920           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   39921           0 :                 TALLOC_FREE(push);
   39922           0 :                 PyErr_SetNdrError(err);
   39923           0 :                 return NULL;
   39924             :         }
   39925           0 :         blob = ndr_push_blob(push);
   39926           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   39927           0 :         TALLOC_FREE(push);
   39928           0 :         return ret;
   39929             : }
   39930             : 
   39931           0 : static PyObject *py_srvsvc_NetSessDel_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39932             : {
   39933           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   39934           0 :         PyObject *bigendian_obj = NULL;
   39935           0 :         PyObject *ndr64_obj = NULL;
   39936           0 :         uint32_t ndr_push_flags = 0;
   39937             : 
   39938           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   39939             :                 discard_const_p(char *, kwnames),
   39940             :                 &bigendian_obj,
   39941             :                 &ndr64_obj)) {
   39942           0 :                 return NULL;
   39943             :         }
   39944             : 
   39945           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39946           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   39947             :         }
   39948           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39949           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   39950             :         }
   39951             : 
   39952           0 :         return py_srvsvc_NetSessDel_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   39953             : }
   39954             : 
   39955           0 : static PyObject *py_srvsvc_NetSessDel_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39956             : {
   39957           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   39958           0 :         PyObject *bigendian_obj = NULL;
   39959           0 :         PyObject *ndr64_obj = NULL;
   39960           0 :         uint32_t ndr_push_flags = 0;
   39961             : 
   39962           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   39963             :                 discard_const_p(char *, kwnames),
   39964             :                 &bigendian_obj,
   39965             :                 &ndr64_obj)) {
   39966           0 :                 return NULL;
   39967             :         }
   39968             : 
   39969           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39970           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   39971             :         }
   39972           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39973           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   39974             :         }
   39975             : 
   39976           0 :         return py_srvsvc_NetSessDel_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   39977             : }
   39978             : 
   39979           0 : static PyObject *py_srvsvc_NetSessDel_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   39980             : {
   39981           0 :         const struct ndr_interface_call *call = NULL;
   39982           0 :         struct srvsvc_NetSessDel *object = (struct srvsvc_NetSessDel *)pytalloc_get_ptr(py_obj);
   39983           0 :         struct ndr_pull *pull = NULL;
   39984             :         enum ndr_err_code err;
   39985             : 
   39986           0 :         if (ndr_table_srvsvc.num_calls < 14) {
   39987           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSessDel_ndr_unpack");
   39988           0 :                 return NULL;
   39989             :         }
   39990           0 :         call = &ndr_table_srvsvc.calls[13];
   39991             : 
   39992           0 :         pull = ndr_pull_init_blob(blob, object);
   39993           0 :         if (pull == NULL) {
   39994           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   39995           0 :                 return NULL;
   39996             :         }
   39997             : 
   39998           0 :         pull->flags |= ndr_pull_flags;
   39999             : 
   40000           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   40001           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   40002           0 :                 TALLOC_FREE(pull);
   40003           0 :                 PyErr_SetNdrError(err);
   40004           0 :                 return NULL;
   40005             :         }
   40006           0 :         if (!allow_remaining) {
   40007             :                 uint32_t highest_ofs;
   40008             : 
   40009           0 :                 if (pull->offset > pull->relative_highest_offset) {
   40010           0 :                         highest_ofs = pull->offset;
   40011             :                 } else {
   40012           0 :                         highest_ofs = pull->relative_highest_offset;
   40013             :                 }
   40014           0 :                 if (highest_ofs < pull->data_size) {
   40015           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   40016             :                                 "not all bytes consumed ofs[%u] size[%u]",
   40017             :                                 highest_ofs, pull->data_size);
   40018           0 :                         TALLOC_FREE(pull);
   40019           0 :                         PyErr_SetNdrError(err);
   40020           0 :                         return NULL;
   40021             :                 }
   40022             :         }
   40023             : 
   40024           0 :         TALLOC_FREE(pull);
   40025           0 :         Py_RETURN_NONE;
   40026             : }
   40027             : 
   40028           0 : static PyObject *py_srvsvc_NetSessDel_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40029             : {
   40030             :         DATA_BLOB blob;
   40031           0 :         Py_ssize_t blob_length = 0;
   40032           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   40033           0 :         PyObject *bigendian_obj = NULL;
   40034           0 :         PyObject *ndr64_obj = NULL;
   40035           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   40036           0 :         PyObject *allow_remaining_obj = NULL;
   40037           0 :         bool allow_remaining = false;
   40038             : 
   40039           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   40040             :                 discard_const_p(char *, kwnames),
   40041             :                 &blob.data, &blob_length,
   40042             :                 &bigendian_obj,
   40043             :                 &ndr64_obj,
   40044             :                 &allow_remaining_obj)) {
   40045           0 :                 return NULL;
   40046             :         }
   40047           0 :         blob.length = blob_length;
   40048             : 
   40049           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40050           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   40051             :         }
   40052           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40053           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   40054             :         }
   40055             : 
   40056           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   40057           0 :                 allow_remaining = true;
   40058             :         }
   40059             : 
   40060           0 :         return py_srvsvc_NetSessDel_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   40061             : }
   40062             : 
   40063           0 : static PyObject *py_srvsvc_NetSessDel_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40064             : {
   40065             :         DATA_BLOB blob;
   40066           0 :         Py_ssize_t blob_length = 0;
   40067           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   40068           0 :         PyObject *bigendian_obj = NULL;
   40069           0 :         PyObject *ndr64_obj = NULL;
   40070           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   40071           0 :         PyObject *allow_remaining_obj = NULL;
   40072           0 :         bool allow_remaining = false;
   40073             : 
   40074           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   40075             :                 discard_const_p(char *, kwnames),
   40076             :                 &blob.data, &blob_length,
   40077             :                 &bigendian_obj,
   40078             :                 &ndr64_obj,
   40079             :                 &allow_remaining_obj)) {
   40080           0 :                 return NULL;
   40081             :         }
   40082           0 :         blob.length = blob_length;
   40083             : 
   40084           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40085           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   40086             :         }
   40087           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40088           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   40089             :         }
   40090             : 
   40091           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   40092           0 :                 allow_remaining = true;
   40093             :         }
   40094             : 
   40095           0 :         return py_srvsvc_NetSessDel_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   40096             : }
   40097             : 
   40098           0 : static PyObject *py_srvsvc_NetSessDel_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   40099             : {
   40100           0 :         const struct ndr_interface_call *call = NULL;
   40101           0 :         struct srvsvc_NetSessDel *object = (struct srvsvc_NetSessDel *)pytalloc_get_ptr(py_obj);
   40102             :         PyObject *ret;
   40103             :         char *retstr;
   40104             : 
   40105           0 :         if (ndr_table_srvsvc.num_calls < 14) {
   40106           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSessDel_ndr_print");
   40107           0 :                 return NULL;
   40108             :         }
   40109           0 :         call = &ndr_table_srvsvc.calls[13];
   40110             : 
   40111           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   40112           0 :         ret = PyUnicode_FromString(retstr);
   40113           0 :         TALLOC_FREE(retstr);
   40114             : 
   40115           0 :         return ret;
   40116             : }
   40117             : 
   40118           0 : static PyObject *py_srvsvc_NetSessDel_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   40119             : {
   40120           0 :         return py_srvsvc_NetSessDel_ndr_print(py_obj, "srvsvc_NetSessDel_in", NDR_IN);
   40121             : }
   40122             : 
   40123           0 : static PyObject *py_srvsvc_NetSessDel_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   40124             : {
   40125           0 :         return py_srvsvc_NetSessDel_ndr_print(py_obj, "srvsvc_NetSessDel_out", NDR_OUT);
   40126             : }
   40127             : 
   40128             : static PyMethodDef py_srvsvc_NetSessDel_methods[] = {
   40129             :         { "opnum", (PyCFunction)py_srvsvc_NetSessDel_ndr_opnum, METH_NOARGS|METH_CLASS,
   40130             :                 "srvsvc.NetSessDel.opnum() -> 13 (0x0d) " },
   40131             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSessDel_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   40132             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   40133             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSessDel_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   40134             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   40135             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSessDel_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   40136             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   40137             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSessDel_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   40138             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   40139             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetSessDel_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   40140             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetSessDel_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   40141             :         { NULL, NULL, 0, NULL }
   40142             : };
   40143             : 
   40144             : 
   40145             : static PyTypeObject srvsvc_NetSessDel_Type = {
   40146             :         PyVarObject_HEAD_INIT(NULL, 0)
   40147             :         .tp_name = "srvsvc.NetSessDel",
   40148             :         .tp_getset = py_srvsvc_NetSessDel_getsetters,
   40149             :         .tp_methods = py_srvsvc_NetSessDel_methods,
   40150             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   40151             :         .tp_new = py_srvsvc_NetSessDel_new,
   40152             : };
   40153             : 
   40154           0 : static bool pack_py_srvsvc_NetSessDel_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetSessDel *r)
   40155             : {
   40156             :         PyObject *py_server_unc;
   40157             :         PyObject *py_client;
   40158             :         PyObject *py_user;
   40159           0 :         const char *kwnames[] = {
   40160             :                 "server_unc", "client", "user", NULL
   40161             :         };
   40162             : 
   40163           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetSessDel", discard_const_p(char *, kwnames), &py_server_unc, &py_client, &py_user)) {
   40164           0 :                 return false;
   40165             :         }
   40166             : 
   40167           0 :         if (py_server_unc == NULL) {
   40168           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   40169           0 :                 return false;
   40170             :         }
   40171           0 :         if (py_server_unc == Py_None) {
   40172           0 :                 r->in.server_unc = NULL;
   40173             :         } else {
   40174           0 :                 r->in.server_unc = NULL;
   40175             :                 {
   40176             :                         const char *test_str;
   40177             :                         const char *talloc_str;
   40178           0 :                         PyObject *unicode = NULL;
   40179           0 :                         if (PyUnicode_Check(py_server_unc)) {
   40180           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   40181           0 :                                 if (unicode == NULL) {
   40182           0 :                                         PyErr_NoMemory();
   40183           0 :                                         return false;
   40184             :                                 }
   40185           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   40186           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   40187           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   40188             :                         } else {
   40189           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   40190           0 :                                 return false;
   40191             :                         }
   40192           0 :                         talloc_str = talloc_strdup(r, test_str);
   40193           0 :                         if (unicode != NULL) {
   40194           0 :                                 Py_DECREF(unicode);
   40195             :                         }
   40196           0 :                         if (talloc_str == NULL) {
   40197           0 :                                 PyErr_NoMemory();
   40198           0 :                                 return false;
   40199             :                         }
   40200           0 :                         r->in.server_unc = talloc_str;
   40201             :                 }
   40202             :         }
   40203           0 :         if (py_client == NULL) {
   40204           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client");
   40205           0 :                 return false;
   40206             :         }
   40207           0 :         if (py_client == Py_None) {
   40208           0 :                 r->in.client = NULL;
   40209             :         } else {
   40210           0 :                 r->in.client = NULL;
   40211             :                 {
   40212             :                         const char *test_str;
   40213             :                         const char *talloc_str;
   40214           0 :                         PyObject *unicode = NULL;
   40215           0 :                         if (PyUnicode_Check(py_client)) {
   40216           0 :                                 unicode = PyUnicode_AsEncodedString(py_client, "utf-8", "ignore");
   40217           0 :                                 if (unicode == NULL) {
   40218           0 :                                         PyErr_NoMemory();
   40219           0 :                                         return false;
   40220             :                                 }
   40221           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   40222           0 :                         } else if (PyBytes_Check(py_client)) {
   40223           0 :                                 test_str = PyBytes_AS_STRING(py_client);
   40224             :                         } else {
   40225           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_client)->tp_name);
   40226           0 :                                 return false;
   40227             :                         }
   40228           0 :                         talloc_str = talloc_strdup(r, test_str);
   40229           0 :                         if (unicode != NULL) {
   40230           0 :                                 Py_DECREF(unicode);
   40231             :                         }
   40232           0 :                         if (talloc_str == NULL) {
   40233           0 :                                 PyErr_NoMemory();
   40234           0 :                                 return false;
   40235             :                         }
   40236           0 :                         r->in.client = talloc_str;
   40237             :                 }
   40238             :         }
   40239           0 :         if (py_user == NULL) {
   40240           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.user");
   40241           0 :                 return false;
   40242             :         }
   40243           0 :         if (py_user == Py_None) {
   40244           0 :                 r->in.user = NULL;
   40245             :         } else {
   40246           0 :                 r->in.user = NULL;
   40247             :                 {
   40248             :                         const char *test_str;
   40249             :                         const char *talloc_str;
   40250           0 :                         PyObject *unicode = NULL;
   40251           0 :                         if (PyUnicode_Check(py_user)) {
   40252           0 :                                 unicode = PyUnicode_AsEncodedString(py_user, "utf-8", "ignore");
   40253           0 :                                 if (unicode == NULL) {
   40254           0 :                                         PyErr_NoMemory();
   40255           0 :                                         return false;
   40256             :                                 }
   40257           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   40258           0 :                         } else if (PyBytes_Check(py_user)) {
   40259           0 :                                 test_str = PyBytes_AS_STRING(py_user);
   40260             :                         } else {
   40261           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_user)->tp_name);
   40262           0 :                                 return false;
   40263             :                         }
   40264           0 :                         talloc_str = talloc_strdup(r, test_str);
   40265           0 :                         if (unicode != NULL) {
   40266           0 :                                 Py_DECREF(unicode);
   40267             :                         }
   40268           0 :                         if (talloc_str == NULL) {
   40269           0 :                                 PyErr_NoMemory();
   40270           0 :                                 return false;
   40271             :                         }
   40272           0 :                         r->in.user = talloc_str;
   40273             :                 }
   40274             :         }
   40275           0 :         return true;
   40276             : }
   40277             : 
   40278           0 : static PyObject *unpack_py_srvsvc_NetSessDel_args_out(struct srvsvc_NetSessDel *r)
   40279             : {
   40280             :         PyObject *result;
   40281           0 :         result = Py_None;
   40282           0 :         Py_INCREF(result);
   40283           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   40284           0 :                 PyErr_SetWERROR(r->out.result);
   40285           0 :                 return NULL;
   40286             :         }
   40287             : 
   40288           0 :         return result;
   40289             : }
   40290             : 
   40291             : 
   40292           0 : static PyObject *py_srvsvc_NetShareAdd_in_get_server_unc(PyObject *obj, void *closure)
   40293             : {
   40294           0 :         struct srvsvc_NetShareAdd *object = (struct srvsvc_NetShareAdd *)pytalloc_get_ptr(obj);
   40295             :         PyObject *py_server_unc;
   40296           0 :         if (object->in.server_unc == NULL) {
   40297           0 :                 Py_RETURN_NONE;
   40298             :         }
   40299           0 :         if (object->in.server_unc == NULL) {
   40300           0 :                 py_server_unc = Py_None;
   40301           0 :                 Py_INCREF(py_server_unc);
   40302             :         } else {
   40303           0 :                 if (object->in.server_unc == NULL) {
   40304           0 :                         py_server_unc = Py_None;
   40305           0 :                         Py_INCREF(py_server_unc);
   40306             :                 } else {
   40307           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   40308             :                 }
   40309             :         }
   40310           0 :         return py_server_unc;
   40311             : }
   40312             : 
   40313           0 : static int py_srvsvc_NetShareAdd_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   40314             : {
   40315           0 :         struct srvsvc_NetShareAdd *object = (struct srvsvc_NetShareAdd *)pytalloc_get_ptr(py_obj);
   40316           0 :         if (value == NULL) {
   40317           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   40318           0 :                 return -1;
   40319             :         }
   40320           0 :         if (value == Py_None) {
   40321           0 :                 object->in.server_unc = NULL;
   40322             :         } else {
   40323           0 :                 object->in.server_unc = NULL;
   40324             :                 {
   40325             :                         const char *test_str;
   40326             :                         const char *talloc_str;
   40327           0 :                         PyObject *unicode = NULL;
   40328           0 :                         if (PyUnicode_Check(value)) {
   40329           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   40330           0 :                                 if (unicode == NULL) {
   40331           0 :                                         PyErr_NoMemory();
   40332           0 :                                         return -1;
   40333             :                                 }
   40334           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   40335           0 :                         } else if (PyBytes_Check(value)) {
   40336           0 :                                 test_str = PyBytes_AS_STRING(value);
   40337             :                         } else {
   40338           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   40339           0 :                                 return -1;
   40340             :                         }
   40341           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   40342           0 :                         if (unicode != NULL) {
   40343           0 :                                 Py_DECREF(unicode);
   40344             :                         }
   40345           0 :                         if (talloc_str == NULL) {
   40346           0 :                                 PyErr_NoMemory();
   40347           0 :                                 return -1;
   40348             :                         }
   40349           0 :                         object->in.server_unc = talloc_str;
   40350             :                 }
   40351             :         }
   40352           0 :         return 0;
   40353             : }
   40354             : 
   40355           0 : static PyObject *py_srvsvc_NetShareAdd_in_get_level(PyObject *obj, void *closure)
   40356             : {
   40357           0 :         struct srvsvc_NetShareAdd *object = (struct srvsvc_NetShareAdd *)pytalloc_get_ptr(obj);
   40358             :         PyObject *py_level;
   40359           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   40360           0 :         return py_level;
   40361             : }
   40362             : 
   40363           0 : static int py_srvsvc_NetShareAdd_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   40364             : {
   40365           0 :         struct srvsvc_NetShareAdd *object = (struct srvsvc_NetShareAdd *)pytalloc_get_ptr(py_obj);
   40366           0 :         if (value == NULL) {
   40367           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   40368           0 :                 return -1;
   40369             :         }
   40370             :         {
   40371           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   40372           0 :                 if (PyLong_Check(value)) {
   40373             :                         unsigned long long test_var;
   40374           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   40375           0 :                         if (PyErr_Occurred() != NULL) {
   40376           0 :                                 return -1;
   40377             :                         }
   40378           0 :                         if (test_var > uint_max) {
   40379           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40380             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40381           0 :                                 return -1;
   40382             :                         }
   40383           0 :                         object->in.level = test_var;
   40384             :                 } else {
   40385           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   40386             :                           PyLong_Type.tp_name);
   40387           0 :                         return -1;
   40388             :                 }
   40389             :         }
   40390           0 :         return 0;
   40391             : }
   40392             : 
   40393           0 : static PyObject *py_srvsvc_NetShareAdd_in_get_info(PyObject *obj, void *closure)
   40394             : {
   40395           0 :         struct srvsvc_NetShareAdd *object = (struct srvsvc_NetShareAdd *)pytalloc_get_ptr(obj);
   40396             :         PyObject *py_info;
   40397           0 :         if (object->in.info == NULL) {
   40398           0 :                 Py_RETURN_NONE;
   40399             :         }
   40400           0 :         py_info = pyrpc_import_union(&srvsvc_NetShareInfo_Type, object->in.info, object->in.level, object->in.info, "union srvsvc_NetShareInfo");
   40401           0 :         if (py_info == NULL) {
   40402           0 :                 return NULL;
   40403             :         }
   40404           0 :         return py_info;
   40405             : }
   40406             : 
   40407           0 : static int py_srvsvc_NetShareAdd_in_set_info(PyObject *py_obj, PyObject *value, void *closure)
   40408             : {
   40409           0 :         struct srvsvc_NetShareAdd *object = (struct srvsvc_NetShareAdd *)pytalloc_get_ptr(py_obj);
   40410           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info));
   40411           0 :         if (value == NULL) {
   40412           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.info");
   40413           0 :                 return -1;
   40414             :         }
   40415           0 :         object->in.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info);
   40416           0 :         if (object->in.info == NULL) {
   40417           0 :                 PyErr_NoMemory();
   40418           0 :                 return -1;
   40419             :         }
   40420             :         {
   40421             :                 union srvsvc_NetShareInfo *info_switch_1;
   40422           0 :                 info_switch_1 = (union srvsvc_NetShareInfo *)pyrpc_export_union(&srvsvc_NetShareInfo_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union srvsvc_NetShareInfo");
   40423           0 :                 if (info_switch_1 == NULL) {
   40424           0 :                         return -1;
   40425             :                 }
   40426           0 :                 object->in.info = info_switch_1;
   40427             :         }
   40428           0 :         return 0;
   40429             : }
   40430             : 
   40431           0 : static PyObject *py_srvsvc_NetShareAdd_in_get_parm_error(PyObject *obj, void *closure)
   40432             : {
   40433           0 :         struct srvsvc_NetShareAdd *object = (struct srvsvc_NetShareAdd *)pytalloc_get_ptr(obj);
   40434             :         PyObject *py_parm_error;
   40435           0 :         if (object->in.parm_error == NULL) {
   40436           0 :                 Py_RETURN_NONE;
   40437             :         }
   40438           0 :         if (object->in.parm_error == NULL) {
   40439           0 :                 py_parm_error = Py_None;
   40440           0 :                 Py_INCREF(py_parm_error);
   40441             :         } else {
   40442           0 :                 py_parm_error = PyLong_FromUnsignedLongLong((uint32_t)*object->in.parm_error);
   40443             :         }
   40444           0 :         return py_parm_error;
   40445             : }
   40446             : 
   40447           0 : static int py_srvsvc_NetShareAdd_in_set_parm_error(PyObject *py_obj, PyObject *value, void *closure)
   40448             : {
   40449           0 :         struct srvsvc_NetShareAdd *object = (struct srvsvc_NetShareAdd *)pytalloc_get_ptr(py_obj);
   40450           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.parm_error));
   40451           0 :         if (value == NULL) {
   40452           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.parm_error");
   40453           0 :                 return -1;
   40454             :         }
   40455           0 :         if (value == Py_None) {
   40456           0 :                 object->in.parm_error = NULL;
   40457             :         } else {
   40458           0 :                 object->in.parm_error = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.parm_error);
   40459           0 :                 if (object->in.parm_error == NULL) {
   40460           0 :                         PyErr_NoMemory();
   40461           0 :                         return -1;
   40462             :                 }
   40463             :                 {
   40464           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.parm_error));
   40465           0 :                         if (PyLong_Check(value)) {
   40466             :                                 unsigned long long test_var;
   40467           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   40468           0 :                                 if (PyErr_Occurred() != NULL) {
   40469           0 :                                         return -1;
   40470             :                                 }
   40471           0 :                                 if (test_var > uint_max) {
   40472           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40473             :                                           PyLong_Type.tp_name, uint_max, test_var);
   40474           0 :                                         return -1;
   40475             :                                 }
   40476           0 :                                 *object->in.parm_error = test_var;
   40477             :                         } else {
   40478           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   40479             :                                   PyLong_Type.tp_name);
   40480           0 :                                 return -1;
   40481             :                         }
   40482             :                 }
   40483             :         }
   40484           0 :         return 0;
   40485             : }
   40486             : 
   40487           0 : static PyObject *py_srvsvc_NetShareAdd_out_get_parm_error(PyObject *obj, void *closure)
   40488             : {
   40489           0 :         struct srvsvc_NetShareAdd *object = (struct srvsvc_NetShareAdd *)pytalloc_get_ptr(obj);
   40490             :         PyObject *py_parm_error;
   40491           0 :         if (object->out.parm_error == NULL) {
   40492           0 :                 Py_RETURN_NONE;
   40493             :         }
   40494           0 :         if (object->out.parm_error == NULL) {
   40495           0 :                 py_parm_error = Py_None;
   40496           0 :                 Py_INCREF(py_parm_error);
   40497             :         } else {
   40498           0 :                 py_parm_error = PyLong_FromUnsignedLongLong((uint32_t)*object->out.parm_error);
   40499             :         }
   40500           0 :         return py_parm_error;
   40501             : }
   40502             : 
   40503           0 : static int py_srvsvc_NetShareAdd_out_set_parm_error(PyObject *py_obj, PyObject *value, void *closure)
   40504             : {
   40505           0 :         struct srvsvc_NetShareAdd *object = (struct srvsvc_NetShareAdd *)pytalloc_get_ptr(py_obj);
   40506           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.parm_error));
   40507           0 :         if (value == NULL) {
   40508           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.parm_error");
   40509           0 :                 return -1;
   40510             :         }
   40511           0 :         if (value == Py_None) {
   40512           0 :                 object->out.parm_error = NULL;
   40513             :         } else {
   40514           0 :                 object->out.parm_error = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.parm_error);
   40515           0 :                 if (object->out.parm_error == NULL) {
   40516           0 :                         PyErr_NoMemory();
   40517           0 :                         return -1;
   40518             :                 }
   40519             :                 {
   40520           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.parm_error));
   40521           0 :                         if (PyLong_Check(value)) {
   40522             :                                 unsigned long long test_var;
   40523           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   40524           0 :                                 if (PyErr_Occurred() != NULL) {
   40525           0 :                                         return -1;
   40526             :                                 }
   40527           0 :                                 if (test_var > uint_max) {
   40528           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40529             :                                           PyLong_Type.tp_name, uint_max, test_var);
   40530           0 :                                         return -1;
   40531             :                                 }
   40532           0 :                                 *object->out.parm_error = test_var;
   40533             :                         } else {
   40534           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   40535             :                                   PyLong_Type.tp_name);
   40536           0 :                                 return -1;
   40537             :                         }
   40538             :                 }
   40539             :         }
   40540           0 :         return 0;
   40541             : }
   40542             : 
   40543           0 : static PyObject *py_srvsvc_NetShareAdd_get_result(PyObject *obj, void *closure)
   40544             : {
   40545           0 :         struct srvsvc_NetShareAdd *object = (struct srvsvc_NetShareAdd *)pytalloc_get_ptr(obj);
   40546             :         PyObject *py_result;
   40547           0 :         py_result = PyErr_FromWERROR(object->out.result);
   40548           0 :         return py_result;
   40549             : }
   40550             : 
   40551           0 : static int py_srvsvc_NetShareAdd_set_result(PyObject *py_obj, PyObject *value, void *closure)
   40552             : {
   40553           0 :         struct srvsvc_NetShareAdd *object = (struct srvsvc_NetShareAdd *)pytalloc_get_ptr(py_obj);
   40554           0 :         if (value == NULL) {
   40555           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   40556           0 :                 return -1;
   40557             :         }
   40558           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   40559           0 :         return 0;
   40560             : }
   40561             : 
   40562             : static PyGetSetDef py_srvsvc_NetShareAdd_getsetters[] = {
   40563             :         {
   40564             :                 .name = discard_const_p(char, "in_server_unc"),
   40565             :                 .get = py_srvsvc_NetShareAdd_in_get_server_unc,
   40566             :                 .set = py_srvsvc_NetShareAdd_in_set_server_unc,
   40567             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   40568             :         },
   40569             :         {
   40570             :                 .name = discard_const_p(char, "in_level"),
   40571             :                 .get = py_srvsvc_NetShareAdd_in_get_level,
   40572             :                 .set = py_srvsvc_NetShareAdd_in_set_level,
   40573             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   40574             :         },
   40575             :         {
   40576             :                 .name = discard_const_p(char, "in_info"),
   40577             :                 .get = py_srvsvc_NetShareAdd_in_get_info,
   40578             :                 .set = py_srvsvc_NetShareAdd_in_set_info,
   40579             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfo")
   40580             :         },
   40581             :         {
   40582             :                 .name = discard_const_p(char, "in_parm_error"),
   40583             :                 .get = py_srvsvc_NetShareAdd_in_get_parm_error,
   40584             :                 .set = py_srvsvc_NetShareAdd_in_set_parm_error,
   40585             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   40586             :         },
   40587             :         {
   40588             :                 .name = discard_const_p(char, "out_parm_error"),
   40589             :                 .get = py_srvsvc_NetShareAdd_out_get_parm_error,
   40590             :                 .set = py_srvsvc_NetShareAdd_out_set_parm_error,
   40591             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   40592             :         },
   40593             :         {
   40594             :                 .name = discard_const_p(char, "result"),
   40595             :                 .get = py_srvsvc_NetShareAdd_get_result,
   40596             :                 .set = py_srvsvc_NetShareAdd_set_result,
   40597             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   40598             :         },
   40599             :         { .name = NULL }
   40600             : };
   40601             : 
   40602           0 : static PyObject *py_srvsvc_NetShareAdd_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   40603             : {
   40604           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetShareAdd, type);
   40605           0 :         struct srvsvc_NetShareAdd *_self = (struct srvsvc_NetShareAdd *)pytalloc_get_ptr(self);
   40606           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   40607           0 :         _self->in.info = talloc_zero(mem_ctx, union srvsvc_NetShareInfo);
   40608           0 :         return self;
   40609             : }
   40610             : 
   40611           0 : static PyObject *py_srvsvc_NetShareAdd_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   40612             : {
   40613             : 
   40614             : 
   40615           0 :         return PyLong_FromLong(14);
   40616             : }
   40617             : 
   40618           0 : static PyObject *py_srvsvc_NetShareAdd_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   40619             : {
   40620           0 :         const struct ndr_interface_call *call = NULL;
   40621           0 :         struct srvsvc_NetShareAdd *object = (struct srvsvc_NetShareAdd *)pytalloc_get_ptr(py_obj);
   40622           0 :         PyObject *ret = NULL;
   40623           0 :         struct ndr_push *push = NULL;
   40624             :         DATA_BLOB blob;
   40625             :         enum ndr_err_code err;
   40626             : 
   40627           0 :         if (ndr_table_srvsvc.num_calls < 15) {
   40628           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareAdd_ndr_pack");
   40629           0 :                 return NULL;
   40630             :         }
   40631           0 :         call = &ndr_table_srvsvc.calls[14];
   40632             : 
   40633           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   40634           0 :         if (push == NULL) {
   40635           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   40636           0 :                 return NULL;
   40637             :         }
   40638             : 
   40639           0 :         push->flags |= ndr_push_flags;
   40640             : 
   40641           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   40642           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   40643           0 :                 TALLOC_FREE(push);
   40644           0 :                 PyErr_SetNdrError(err);
   40645           0 :                 return NULL;
   40646             :         }
   40647           0 :         blob = ndr_push_blob(push);
   40648           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   40649           0 :         TALLOC_FREE(push);
   40650           0 :         return ret;
   40651             : }
   40652             : 
   40653           0 : static PyObject *py_srvsvc_NetShareAdd_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40654             : {
   40655           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   40656           0 :         PyObject *bigendian_obj = NULL;
   40657           0 :         PyObject *ndr64_obj = NULL;
   40658           0 :         uint32_t ndr_push_flags = 0;
   40659             : 
   40660           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   40661             :                 discard_const_p(char *, kwnames),
   40662             :                 &bigendian_obj,
   40663             :                 &ndr64_obj)) {
   40664           0 :                 return NULL;
   40665             :         }
   40666             : 
   40667           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40668           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   40669             :         }
   40670           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40671           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   40672             :         }
   40673             : 
   40674           0 :         return py_srvsvc_NetShareAdd_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   40675             : }
   40676             : 
   40677           0 : static PyObject *py_srvsvc_NetShareAdd_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40678             : {
   40679           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   40680           0 :         PyObject *bigendian_obj = NULL;
   40681           0 :         PyObject *ndr64_obj = NULL;
   40682           0 :         uint32_t ndr_push_flags = 0;
   40683             : 
   40684           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   40685             :                 discard_const_p(char *, kwnames),
   40686             :                 &bigendian_obj,
   40687             :                 &ndr64_obj)) {
   40688           0 :                 return NULL;
   40689             :         }
   40690             : 
   40691           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40692           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   40693             :         }
   40694           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40695           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   40696             :         }
   40697             : 
   40698           0 :         return py_srvsvc_NetShareAdd_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   40699             : }
   40700             : 
   40701           0 : static PyObject *py_srvsvc_NetShareAdd_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   40702             : {
   40703           0 :         const struct ndr_interface_call *call = NULL;
   40704           0 :         struct srvsvc_NetShareAdd *object = (struct srvsvc_NetShareAdd *)pytalloc_get_ptr(py_obj);
   40705           0 :         struct ndr_pull *pull = NULL;
   40706             :         enum ndr_err_code err;
   40707             : 
   40708           0 :         if (ndr_table_srvsvc.num_calls < 15) {
   40709           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareAdd_ndr_unpack");
   40710           0 :                 return NULL;
   40711             :         }
   40712           0 :         call = &ndr_table_srvsvc.calls[14];
   40713             : 
   40714           0 :         pull = ndr_pull_init_blob(blob, object);
   40715           0 :         if (pull == NULL) {
   40716           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   40717           0 :                 return NULL;
   40718             :         }
   40719             : 
   40720           0 :         pull->flags |= ndr_pull_flags;
   40721             : 
   40722           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   40723           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   40724           0 :                 TALLOC_FREE(pull);
   40725           0 :                 PyErr_SetNdrError(err);
   40726           0 :                 return NULL;
   40727             :         }
   40728           0 :         if (!allow_remaining) {
   40729             :                 uint32_t highest_ofs;
   40730             : 
   40731           0 :                 if (pull->offset > pull->relative_highest_offset) {
   40732           0 :                         highest_ofs = pull->offset;
   40733             :                 } else {
   40734           0 :                         highest_ofs = pull->relative_highest_offset;
   40735             :                 }
   40736           0 :                 if (highest_ofs < pull->data_size) {
   40737           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   40738             :                                 "not all bytes consumed ofs[%u] size[%u]",
   40739             :                                 highest_ofs, pull->data_size);
   40740           0 :                         TALLOC_FREE(pull);
   40741           0 :                         PyErr_SetNdrError(err);
   40742           0 :                         return NULL;
   40743             :                 }
   40744             :         }
   40745             : 
   40746           0 :         TALLOC_FREE(pull);
   40747           0 :         Py_RETURN_NONE;
   40748             : }
   40749             : 
   40750           0 : static PyObject *py_srvsvc_NetShareAdd_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40751             : {
   40752             :         DATA_BLOB blob;
   40753           0 :         Py_ssize_t blob_length = 0;
   40754           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   40755           0 :         PyObject *bigendian_obj = NULL;
   40756           0 :         PyObject *ndr64_obj = NULL;
   40757           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   40758           0 :         PyObject *allow_remaining_obj = NULL;
   40759           0 :         bool allow_remaining = false;
   40760             : 
   40761           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   40762             :                 discard_const_p(char *, kwnames),
   40763             :                 &blob.data, &blob_length,
   40764             :                 &bigendian_obj,
   40765             :                 &ndr64_obj,
   40766             :                 &allow_remaining_obj)) {
   40767           0 :                 return NULL;
   40768             :         }
   40769           0 :         blob.length = blob_length;
   40770             : 
   40771           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40772           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   40773             :         }
   40774           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40775           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   40776             :         }
   40777             : 
   40778           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   40779           0 :                 allow_remaining = true;
   40780             :         }
   40781             : 
   40782           0 :         return py_srvsvc_NetShareAdd_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   40783             : }
   40784             : 
   40785           0 : static PyObject *py_srvsvc_NetShareAdd_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40786             : {
   40787             :         DATA_BLOB blob;
   40788           0 :         Py_ssize_t blob_length = 0;
   40789           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   40790           0 :         PyObject *bigendian_obj = NULL;
   40791           0 :         PyObject *ndr64_obj = NULL;
   40792           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   40793           0 :         PyObject *allow_remaining_obj = NULL;
   40794           0 :         bool allow_remaining = false;
   40795             : 
   40796           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   40797             :                 discard_const_p(char *, kwnames),
   40798             :                 &blob.data, &blob_length,
   40799             :                 &bigendian_obj,
   40800             :                 &ndr64_obj,
   40801             :                 &allow_remaining_obj)) {
   40802           0 :                 return NULL;
   40803             :         }
   40804           0 :         blob.length = blob_length;
   40805             : 
   40806           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40807           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   40808             :         }
   40809           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40810           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   40811             :         }
   40812             : 
   40813           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   40814           0 :                 allow_remaining = true;
   40815             :         }
   40816             : 
   40817           0 :         return py_srvsvc_NetShareAdd_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   40818             : }
   40819             : 
   40820           0 : static PyObject *py_srvsvc_NetShareAdd_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   40821             : {
   40822           0 :         const struct ndr_interface_call *call = NULL;
   40823           0 :         struct srvsvc_NetShareAdd *object = (struct srvsvc_NetShareAdd *)pytalloc_get_ptr(py_obj);
   40824             :         PyObject *ret;
   40825             :         char *retstr;
   40826             : 
   40827           0 :         if (ndr_table_srvsvc.num_calls < 15) {
   40828           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareAdd_ndr_print");
   40829           0 :                 return NULL;
   40830             :         }
   40831           0 :         call = &ndr_table_srvsvc.calls[14];
   40832             : 
   40833           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   40834           0 :         ret = PyUnicode_FromString(retstr);
   40835           0 :         TALLOC_FREE(retstr);
   40836             : 
   40837           0 :         return ret;
   40838             : }
   40839             : 
   40840           0 : static PyObject *py_srvsvc_NetShareAdd_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   40841             : {
   40842           0 :         return py_srvsvc_NetShareAdd_ndr_print(py_obj, "srvsvc_NetShareAdd_in", NDR_IN);
   40843             : }
   40844             : 
   40845           0 : static PyObject *py_srvsvc_NetShareAdd_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   40846             : {
   40847           0 :         return py_srvsvc_NetShareAdd_ndr_print(py_obj, "srvsvc_NetShareAdd_out", NDR_OUT);
   40848             : }
   40849             : 
   40850             : static PyMethodDef py_srvsvc_NetShareAdd_methods[] = {
   40851             :         { "opnum", (PyCFunction)py_srvsvc_NetShareAdd_ndr_opnum, METH_NOARGS|METH_CLASS,
   40852             :                 "srvsvc.NetShareAdd.opnum() -> 14 (0x0e) " },
   40853             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareAdd_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   40854             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   40855             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareAdd_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   40856             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   40857             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareAdd_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   40858             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   40859             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareAdd_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   40860             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   40861             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetShareAdd_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   40862             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetShareAdd_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   40863             :         { NULL, NULL, 0, NULL }
   40864             : };
   40865             : 
   40866             : 
   40867             : static PyTypeObject srvsvc_NetShareAdd_Type = {
   40868             :         PyVarObject_HEAD_INIT(NULL, 0)
   40869             :         .tp_name = "srvsvc.NetShareAdd",
   40870             :         .tp_getset = py_srvsvc_NetShareAdd_getsetters,
   40871             :         .tp_methods = py_srvsvc_NetShareAdd_methods,
   40872             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   40873             :         .tp_new = py_srvsvc_NetShareAdd_new,
   40874             : };
   40875             : 
   40876           0 : static bool pack_py_srvsvc_NetShareAdd_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareAdd *r)
   40877             : {
   40878             :         PyObject *py_server_unc;
   40879             :         PyObject *py_level;
   40880             :         PyObject *py_info;
   40881             :         PyObject *py_parm_error;
   40882           0 :         const char *kwnames[] = {
   40883             :                 "server_unc", "level", "info", "parm_error", NULL
   40884             :         };
   40885             : 
   40886           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetShareAdd", discard_const_p(char *, kwnames), &py_server_unc, &py_level, &py_info, &py_parm_error)) {
   40887           0 :                 return false;
   40888             :         }
   40889             : 
   40890           0 :         if (py_server_unc == NULL) {
   40891           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   40892           0 :                 return false;
   40893             :         }
   40894           0 :         if (py_server_unc == Py_None) {
   40895           0 :                 r->in.server_unc = NULL;
   40896             :         } else {
   40897           0 :                 r->in.server_unc = NULL;
   40898             :                 {
   40899             :                         const char *test_str;
   40900             :                         const char *talloc_str;
   40901           0 :                         PyObject *unicode = NULL;
   40902           0 :                         if (PyUnicode_Check(py_server_unc)) {
   40903           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   40904           0 :                                 if (unicode == NULL) {
   40905           0 :                                         PyErr_NoMemory();
   40906           0 :                                         return false;
   40907             :                                 }
   40908           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   40909           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   40910           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   40911             :                         } else {
   40912           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   40913           0 :                                 return false;
   40914             :                         }
   40915           0 :                         talloc_str = talloc_strdup(r, test_str);
   40916           0 :                         if (unicode != NULL) {
   40917           0 :                                 Py_DECREF(unicode);
   40918             :                         }
   40919           0 :                         if (talloc_str == NULL) {
   40920           0 :                                 PyErr_NoMemory();
   40921           0 :                                 return false;
   40922             :                         }
   40923           0 :                         r->in.server_unc = talloc_str;
   40924             :                 }
   40925             :         }
   40926           0 :         if (py_level == NULL) {
   40927           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   40928           0 :                 return false;
   40929             :         }
   40930             :         {
   40931           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   40932           0 :                 if (PyLong_Check(py_level)) {
   40933             :                         unsigned long long test_var;
   40934           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   40935           0 :                         if (PyErr_Occurred() != NULL) {
   40936           0 :                                 return false;
   40937             :                         }
   40938           0 :                         if (test_var > uint_max) {
   40939           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40940             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40941           0 :                                 return false;
   40942             :                         }
   40943           0 :                         r->in.level = test_var;
   40944             :                 } else {
   40945           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   40946             :                           PyLong_Type.tp_name);
   40947           0 :                         return false;
   40948             :                 }
   40949             :         }
   40950           0 :         if (py_info == NULL) {
   40951           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info");
   40952           0 :                 return false;
   40953             :         }
   40954           0 :         r->in.info = talloc_ptrtype(r, r->in.info);
   40955           0 :         if (r->in.info == NULL) {
   40956           0 :                 PyErr_NoMemory();
   40957           0 :                 return false;
   40958             :         }
   40959             :         {
   40960             :                 union srvsvc_NetShareInfo *info_switch_1;
   40961           0 :                 info_switch_1 = (union srvsvc_NetShareInfo *)pyrpc_export_union(&srvsvc_NetShareInfo_Type, r, r->in.level, py_info, "union srvsvc_NetShareInfo");
   40962           0 :                 if (info_switch_1 == NULL) {
   40963           0 :                         return false;
   40964             :                 }
   40965           0 :                 r->in.info = info_switch_1;
   40966             :         }
   40967           0 :         if (py_parm_error == NULL) {
   40968           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.parm_error");
   40969           0 :                 return false;
   40970             :         }
   40971           0 :         if (py_parm_error == Py_None) {
   40972           0 :                 r->in.parm_error = NULL;
   40973             :         } else {
   40974           0 :                 r->in.parm_error = talloc_ptrtype(r, r->in.parm_error);
   40975           0 :                 if (r->in.parm_error == NULL) {
   40976           0 :                         PyErr_NoMemory();
   40977           0 :                         return false;
   40978             :                 }
   40979             :                 {
   40980           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.parm_error));
   40981           0 :                         if (PyLong_Check(py_parm_error)) {
   40982             :                                 unsigned long long test_var;
   40983           0 :                                 test_var = PyLong_AsUnsignedLongLong(py_parm_error);
   40984           0 :                                 if (PyErr_Occurred() != NULL) {
   40985           0 :                                         return false;
   40986             :                                 }
   40987           0 :                                 if (test_var > uint_max) {
   40988           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40989             :                                           PyLong_Type.tp_name, uint_max, test_var);
   40990           0 :                                         return false;
   40991             :                                 }
   40992           0 :                                 *r->in.parm_error = test_var;
   40993             :                         } else {
   40994           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   40995             :                                   PyLong_Type.tp_name);
   40996           0 :                                 return false;
   40997             :                         }
   40998             :                 }
   40999             :         }
   41000           0 :         return true;
   41001             : }
   41002             : 
   41003           0 : static PyObject *unpack_py_srvsvc_NetShareAdd_args_out(struct srvsvc_NetShareAdd *r)
   41004             : {
   41005             :         PyObject *result;
   41006             :         PyObject *py_parm_error;
   41007           0 :         if (r->out.parm_error == NULL) {
   41008           0 :                 py_parm_error = Py_None;
   41009           0 :                 Py_INCREF(py_parm_error);
   41010             :         } else {
   41011           0 :                 py_parm_error = PyLong_FromUnsignedLongLong((uint32_t)*r->out.parm_error);
   41012             :         }
   41013           0 :         result = py_parm_error;
   41014           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   41015           0 :                 PyErr_SetWERROR(r->out.result);
   41016           0 :                 return NULL;
   41017             :         }
   41018             : 
   41019           0 :         return result;
   41020             : }
   41021             : 
   41022             : 
   41023           0 : static PyObject *py_srvsvc_NetShareEnumAll_in_get_server_unc(PyObject *obj, void *closure)
   41024             : {
   41025           0 :         struct srvsvc_NetShareEnumAll *object = (struct srvsvc_NetShareEnumAll *)pytalloc_get_ptr(obj);
   41026             :         PyObject *py_server_unc;
   41027           0 :         if (object->in.server_unc == NULL) {
   41028           0 :                 Py_RETURN_NONE;
   41029             :         }
   41030           0 :         if (object->in.server_unc == NULL) {
   41031           0 :                 py_server_unc = Py_None;
   41032           0 :                 Py_INCREF(py_server_unc);
   41033             :         } else {
   41034           0 :                 if (object->in.server_unc == NULL) {
   41035           0 :                         py_server_unc = Py_None;
   41036           0 :                         Py_INCREF(py_server_unc);
   41037             :                 } else {
   41038           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   41039             :                 }
   41040             :         }
   41041           0 :         return py_server_unc;
   41042             : }
   41043             : 
   41044           0 : static int py_srvsvc_NetShareEnumAll_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   41045             : {
   41046           0 :         struct srvsvc_NetShareEnumAll *object = (struct srvsvc_NetShareEnumAll *)pytalloc_get_ptr(py_obj);
   41047           0 :         if (value == NULL) {
   41048           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   41049           0 :                 return -1;
   41050             :         }
   41051           0 :         if (value == Py_None) {
   41052           0 :                 object->in.server_unc = NULL;
   41053             :         } else {
   41054           0 :                 object->in.server_unc = NULL;
   41055             :                 {
   41056             :                         const char *test_str;
   41057             :                         const char *talloc_str;
   41058           0 :                         PyObject *unicode = NULL;
   41059           0 :                         if (PyUnicode_Check(value)) {
   41060           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   41061           0 :                                 if (unicode == NULL) {
   41062           0 :                                         PyErr_NoMemory();
   41063           0 :                                         return -1;
   41064             :                                 }
   41065           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   41066           0 :                         } else if (PyBytes_Check(value)) {
   41067           0 :                                 test_str = PyBytes_AS_STRING(value);
   41068             :                         } else {
   41069           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   41070           0 :                                 return -1;
   41071             :                         }
   41072           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   41073           0 :                         if (unicode != NULL) {
   41074           0 :                                 Py_DECREF(unicode);
   41075             :                         }
   41076           0 :                         if (talloc_str == NULL) {
   41077           0 :                                 PyErr_NoMemory();
   41078           0 :                                 return -1;
   41079             :                         }
   41080           0 :                         object->in.server_unc = talloc_str;
   41081             :                 }
   41082             :         }
   41083           0 :         return 0;
   41084             : }
   41085             : 
   41086           0 : static PyObject *py_srvsvc_NetShareEnumAll_in_get_info_ctr(PyObject *obj, void *closure)
   41087             : {
   41088           0 :         struct srvsvc_NetShareEnumAll *object = (struct srvsvc_NetShareEnumAll *)pytalloc_get_ptr(obj);
   41089             :         PyObject *py_info_ctr;
   41090           0 :         if (object->in.info_ctr == NULL) {
   41091           0 :                 Py_RETURN_NONE;
   41092             :         }
   41093           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetShareInfoCtr_Type, object->in.info_ctr, object->in.info_ctr);
   41094           0 :         return py_info_ctr;
   41095             : }
   41096             : 
   41097           0 : static int py_srvsvc_NetShareEnumAll_in_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   41098             : {
   41099           0 :         struct srvsvc_NetShareEnumAll *object = (struct srvsvc_NetShareEnumAll *)pytalloc_get_ptr(py_obj);
   41100           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info_ctr));
   41101           0 :         if (value == NULL) {
   41102           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.info_ctr");
   41103           0 :                 return -1;
   41104             :         }
   41105           0 :         object->in.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info_ctr);
   41106           0 :         if (object->in.info_ctr == NULL) {
   41107           0 :                 PyErr_NoMemory();
   41108           0 :                 return -1;
   41109             :         }
   41110           0 :         PY_CHECK_TYPE(&srvsvc_NetShareInfoCtr_Type, value, return -1;);
   41111           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   41112           0 :                 PyErr_NoMemory();
   41113           0 :                 return -1;
   41114             :         }
   41115           0 :         object->in.info_ctr = (struct srvsvc_NetShareInfoCtr *)pytalloc_get_ptr(value);
   41116           0 :         return 0;
   41117             : }
   41118             : 
   41119           0 : static PyObject *py_srvsvc_NetShareEnumAll_out_get_info_ctr(PyObject *obj, void *closure)
   41120             : {
   41121           0 :         struct srvsvc_NetShareEnumAll *object = (struct srvsvc_NetShareEnumAll *)pytalloc_get_ptr(obj);
   41122             :         PyObject *py_info_ctr;
   41123           0 :         if (object->out.info_ctr == NULL) {
   41124           0 :                 Py_RETURN_NONE;
   41125             :         }
   41126           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetShareInfoCtr_Type, object->out.info_ctr, object->out.info_ctr);
   41127           0 :         return py_info_ctr;
   41128             : }
   41129             : 
   41130           0 : static int py_srvsvc_NetShareEnumAll_out_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   41131             : {
   41132           0 :         struct srvsvc_NetShareEnumAll *object = (struct srvsvc_NetShareEnumAll *)pytalloc_get_ptr(py_obj);
   41133           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info_ctr));
   41134           0 :         if (value == NULL) {
   41135           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info_ctr");
   41136           0 :                 return -1;
   41137             :         }
   41138           0 :         object->out.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info_ctr);
   41139           0 :         if (object->out.info_ctr == NULL) {
   41140           0 :                 PyErr_NoMemory();
   41141           0 :                 return -1;
   41142             :         }
   41143           0 :         PY_CHECK_TYPE(&srvsvc_NetShareInfoCtr_Type, value, return -1;);
   41144           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   41145           0 :                 PyErr_NoMemory();
   41146           0 :                 return -1;
   41147             :         }
   41148           0 :         object->out.info_ctr = (struct srvsvc_NetShareInfoCtr *)pytalloc_get_ptr(value);
   41149           0 :         return 0;
   41150             : }
   41151             : 
   41152           0 : static PyObject *py_srvsvc_NetShareEnumAll_in_get_max_buffer(PyObject *obj, void *closure)
   41153             : {
   41154           0 :         struct srvsvc_NetShareEnumAll *object = (struct srvsvc_NetShareEnumAll *)pytalloc_get_ptr(obj);
   41155             :         PyObject *py_max_buffer;
   41156           0 :         py_max_buffer = PyLong_FromUnsignedLongLong((uint32_t)object->in.max_buffer);
   41157           0 :         return py_max_buffer;
   41158             : }
   41159             : 
   41160           0 : static int py_srvsvc_NetShareEnumAll_in_set_max_buffer(PyObject *py_obj, PyObject *value, void *closure)
   41161             : {
   41162           0 :         struct srvsvc_NetShareEnumAll *object = (struct srvsvc_NetShareEnumAll *)pytalloc_get_ptr(py_obj);
   41163           0 :         if (value == NULL) {
   41164           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.max_buffer");
   41165           0 :                 return -1;
   41166             :         }
   41167             :         {
   41168           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.max_buffer));
   41169           0 :                 if (PyLong_Check(value)) {
   41170             :                         unsigned long long test_var;
   41171           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   41172           0 :                         if (PyErr_Occurred() != NULL) {
   41173           0 :                                 return -1;
   41174             :                         }
   41175           0 :                         if (test_var > uint_max) {
   41176           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   41177             :                                   PyLong_Type.tp_name, uint_max, test_var);
   41178           0 :                                 return -1;
   41179             :                         }
   41180           0 :                         object->in.max_buffer = test_var;
   41181             :                 } else {
   41182           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   41183             :                           PyLong_Type.tp_name);
   41184           0 :                         return -1;
   41185             :                 }
   41186             :         }
   41187           0 :         return 0;
   41188             : }
   41189             : 
   41190           0 : static PyObject *py_srvsvc_NetShareEnumAll_out_get_totalentries(PyObject *obj, void *closure)
   41191             : {
   41192           0 :         struct srvsvc_NetShareEnumAll *object = (struct srvsvc_NetShareEnumAll *)pytalloc_get_ptr(obj);
   41193             :         PyObject *py_totalentries;
   41194           0 :         if (object->out.totalentries == NULL) {
   41195           0 :                 Py_RETURN_NONE;
   41196             :         }
   41197           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)*object->out.totalentries);
   41198           0 :         return py_totalentries;
   41199             : }
   41200             : 
   41201           0 : static int py_srvsvc_NetShareEnumAll_out_set_totalentries(PyObject *py_obj, PyObject *value, void *closure)
   41202             : {
   41203           0 :         struct srvsvc_NetShareEnumAll *object = (struct srvsvc_NetShareEnumAll *)pytalloc_get_ptr(py_obj);
   41204           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.totalentries));
   41205           0 :         if (value == NULL) {
   41206           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.totalentries");
   41207           0 :                 return -1;
   41208             :         }
   41209           0 :         object->out.totalentries = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.totalentries);
   41210           0 :         if (object->out.totalentries == NULL) {
   41211           0 :                 PyErr_NoMemory();
   41212           0 :                 return -1;
   41213             :         }
   41214             :         {
   41215           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.totalentries));
   41216           0 :                 if (PyLong_Check(value)) {
   41217             :                         unsigned long long test_var;
   41218           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   41219           0 :                         if (PyErr_Occurred() != NULL) {
   41220           0 :                                 return -1;
   41221             :                         }
   41222           0 :                         if (test_var > uint_max) {
   41223           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   41224             :                                   PyLong_Type.tp_name, uint_max, test_var);
   41225           0 :                                 return -1;
   41226             :                         }
   41227           0 :                         *object->out.totalentries = test_var;
   41228             :                 } else {
   41229           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   41230             :                           PyLong_Type.tp_name);
   41231           0 :                         return -1;
   41232             :                 }
   41233             :         }
   41234           0 :         return 0;
   41235             : }
   41236             : 
   41237           0 : static PyObject *py_srvsvc_NetShareEnumAll_in_get_resume_handle(PyObject *obj, void *closure)
   41238             : {
   41239           0 :         struct srvsvc_NetShareEnumAll *object = (struct srvsvc_NetShareEnumAll *)pytalloc_get_ptr(obj);
   41240             :         PyObject *py_resume_handle;
   41241           0 :         if (object->in.resume_handle == NULL) {
   41242           0 :                 Py_RETURN_NONE;
   41243             :         }
   41244           0 :         if (object->in.resume_handle == NULL) {
   41245           0 :                 py_resume_handle = Py_None;
   41246           0 :                 Py_INCREF(py_resume_handle);
   41247             :         } else {
   41248           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)*object->in.resume_handle);
   41249             :         }
   41250           0 :         return py_resume_handle;
   41251             : }
   41252             : 
   41253           0 : static int py_srvsvc_NetShareEnumAll_in_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   41254             : {
   41255           0 :         struct srvsvc_NetShareEnumAll *object = (struct srvsvc_NetShareEnumAll *)pytalloc_get_ptr(py_obj);
   41256           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.resume_handle));
   41257           0 :         if (value == NULL) {
   41258           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.resume_handle");
   41259           0 :                 return -1;
   41260             :         }
   41261           0 :         if (value == Py_None) {
   41262           0 :                 object->in.resume_handle = NULL;
   41263             :         } else {
   41264           0 :                 object->in.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.resume_handle);
   41265           0 :                 if (object->in.resume_handle == NULL) {
   41266           0 :                         PyErr_NoMemory();
   41267           0 :                         return -1;
   41268             :                 }
   41269             :                 {
   41270           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.resume_handle));
   41271           0 :                         if (PyLong_Check(value)) {
   41272             :                                 unsigned long long test_var;
   41273           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   41274           0 :                                 if (PyErr_Occurred() != NULL) {
   41275           0 :                                         return -1;
   41276             :                                 }
   41277           0 :                                 if (test_var > uint_max) {
   41278           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   41279             :                                           PyLong_Type.tp_name, uint_max, test_var);
   41280           0 :                                         return -1;
   41281             :                                 }
   41282           0 :                                 *object->in.resume_handle = test_var;
   41283             :                         } else {
   41284           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   41285             :                                   PyLong_Type.tp_name);
   41286           0 :                                 return -1;
   41287             :                         }
   41288             :                 }
   41289             :         }
   41290           0 :         return 0;
   41291             : }
   41292             : 
   41293           0 : static PyObject *py_srvsvc_NetShareEnumAll_out_get_resume_handle(PyObject *obj, void *closure)
   41294             : {
   41295           0 :         struct srvsvc_NetShareEnumAll *object = (struct srvsvc_NetShareEnumAll *)pytalloc_get_ptr(obj);
   41296             :         PyObject *py_resume_handle;
   41297           0 :         if (object->out.resume_handle == NULL) {
   41298           0 :                 Py_RETURN_NONE;
   41299             :         }
   41300           0 :         if (object->out.resume_handle == NULL) {
   41301           0 :                 py_resume_handle = Py_None;
   41302           0 :                 Py_INCREF(py_resume_handle);
   41303             :         } else {
   41304           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)*object->out.resume_handle);
   41305             :         }
   41306           0 :         return py_resume_handle;
   41307             : }
   41308             : 
   41309           0 : static int py_srvsvc_NetShareEnumAll_out_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   41310             : {
   41311           0 :         struct srvsvc_NetShareEnumAll *object = (struct srvsvc_NetShareEnumAll *)pytalloc_get_ptr(py_obj);
   41312           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.resume_handle));
   41313           0 :         if (value == NULL) {
   41314           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.resume_handle");
   41315           0 :                 return -1;
   41316             :         }
   41317           0 :         if (value == Py_None) {
   41318           0 :                 object->out.resume_handle = NULL;
   41319             :         } else {
   41320           0 :                 object->out.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.resume_handle);
   41321           0 :                 if (object->out.resume_handle == NULL) {
   41322           0 :                         PyErr_NoMemory();
   41323           0 :                         return -1;
   41324             :                 }
   41325             :                 {
   41326           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.resume_handle));
   41327           0 :                         if (PyLong_Check(value)) {
   41328             :                                 unsigned long long test_var;
   41329           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   41330           0 :                                 if (PyErr_Occurred() != NULL) {
   41331           0 :                                         return -1;
   41332             :                                 }
   41333           0 :                                 if (test_var > uint_max) {
   41334           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   41335             :                                           PyLong_Type.tp_name, uint_max, test_var);
   41336           0 :                                         return -1;
   41337             :                                 }
   41338           0 :                                 *object->out.resume_handle = test_var;
   41339             :                         } else {
   41340           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   41341             :                                   PyLong_Type.tp_name);
   41342           0 :                                 return -1;
   41343             :                         }
   41344             :                 }
   41345             :         }
   41346           0 :         return 0;
   41347             : }
   41348             : 
   41349           0 : static PyObject *py_srvsvc_NetShareEnumAll_get_result(PyObject *obj, void *closure)
   41350             : {
   41351           0 :         struct srvsvc_NetShareEnumAll *object = (struct srvsvc_NetShareEnumAll *)pytalloc_get_ptr(obj);
   41352             :         PyObject *py_result;
   41353           0 :         py_result = PyErr_FromWERROR(object->out.result);
   41354           0 :         return py_result;
   41355             : }
   41356             : 
   41357           0 : static int py_srvsvc_NetShareEnumAll_set_result(PyObject *py_obj, PyObject *value, void *closure)
   41358             : {
   41359           0 :         struct srvsvc_NetShareEnumAll *object = (struct srvsvc_NetShareEnumAll *)pytalloc_get_ptr(py_obj);
   41360           0 :         if (value == NULL) {
   41361           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   41362           0 :                 return -1;
   41363             :         }
   41364           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   41365           0 :         return 0;
   41366             : }
   41367             : 
   41368             : static PyGetSetDef py_srvsvc_NetShareEnumAll_getsetters[] = {
   41369             :         {
   41370             :                 .name = discard_const_p(char, "in_server_unc"),
   41371             :                 .get = py_srvsvc_NetShareEnumAll_in_get_server_unc,
   41372             :                 .set = py_srvsvc_NetShareEnumAll_in_set_server_unc,
   41373             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   41374             :         },
   41375             :         {
   41376             :                 .name = discard_const_p(char, "in_info_ctr"),
   41377             :                 .get = py_srvsvc_NetShareEnumAll_in_get_info_ctr,
   41378             :                 .set = py_srvsvc_NetShareEnumAll_in_set_info_ctr,
   41379             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfoCtr")
   41380             :         },
   41381             :         {
   41382             :                 .name = discard_const_p(char, "out_info_ctr"),
   41383             :                 .get = py_srvsvc_NetShareEnumAll_out_get_info_ctr,
   41384             :                 .set = py_srvsvc_NetShareEnumAll_out_set_info_ctr,
   41385             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfoCtr")
   41386             :         },
   41387             :         {
   41388             :                 .name = discard_const_p(char, "in_max_buffer"),
   41389             :                 .get = py_srvsvc_NetShareEnumAll_in_get_max_buffer,
   41390             :                 .set = py_srvsvc_NetShareEnumAll_in_set_max_buffer,
   41391             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   41392             :         },
   41393             :         {
   41394             :                 .name = discard_const_p(char, "out_totalentries"),
   41395             :                 .get = py_srvsvc_NetShareEnumAll_out_get_totalentries,
   41396             :                 .set = py_srvsvc_NetShareEnumAll_out_set_totalentries,
   41397             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   41398             :         },
   41399             :         {
   41400             :                 .name = discard_const_p(char, "in_resume_handle"),
   41401             :                 .get = py_srvsvc_NetShareEnumAll_in_get_resume_handle,
   41402             :                 .set = py_srvsvc_NetShareEnumAll_in_set_resume_handle,
   41403             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   41404             :         },
   41405             :         {
   41406             :                 .name = discard_const_p(char, "out_resume_handle"),
   41407             :                 .get = py_srvsvc_NetShareEnumAll_out_get_resume_handle,
   41408             :                 .set = py_srvsvc_NetShareEnumAll_out_set_resume_handle,
   41409             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   41410             :         },
   41411             :         {
   41412             :                 .name = discard_const_p(char, "result"),
   41413             :                 .get = py_srvsvc_NetShareEnumAll_get_result,
   41414             :                 .set = py_srvsvc_NetShareEnumAll_set_result,
   41415             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   41416             :         },
   41417             :         { .name = NULL }
   41418             : };
   41419             : 
   41420           0 : static PyObject *py_srvsvc_NetShareEnumAll_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   41421             : {
   41422           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetShareEnumAll, type);
   41423           0 :         struct srvsvc_NetShareEnumAll *_self = (struct srvsvc_NetShareEnumAll *)pytalloc_get_ptr(self);
   41424           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   41425           0 :         _self->in.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetShareInfoCtr);
   41426           0 :         _self->out.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetShareInfoCtr);
   41427           0 :         _self->out.totalentries = talloc_zero(mem_ctx, uint32_t);
   41428           0 :         return self;
   41429             : }
   41430             : 
   41431           0 : static PyObject *py_srvsvc_NetShareEnumAll_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   41432             : {
   41433             : 
   41434             : 
   41435           0 :         return PyLong_FromLong(15);
   41436             : }
   41437             : 
   41438           0 : static PyObject *py_srvsvc_NetShareEnumAll_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   41439             : {
   41440           0 :         const struct ndr_interface_call *call = NULL;
   41441           0 :         struct srvsvc_NetShareEnumAll *object = (struct srvsvc_NetShareEnumAll *)pytalloc_get_ptr(py_obj);
   41442           0 :         PyObject *ret = NULL;
   41443           0 :         struct ndr_push *push = NULL;
   41444             :         DATA_BLOB blob;
   41445             :         enum ndr_err_code err;
   41446             : 
   41447           0 :         if (ndr_table_srvsvc.num_calls < 16) {
   41448           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareEnumAll_ndr_pack");
   41449           0 :                 return NULL;
   41450             :         }
   41451           0 :         call = &ndr_table_srvsvc.calls[15];
   41452             : 
   41453           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   41454           0 :         if (push == NULL) {
   41455           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   41456           0 :                 return NULL;
   41457             :         }
   41458             : 
   41459           0 :         push->flags |= ndr_push_flags;
   41460             : 
   41461           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   41462           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   41463           0 :                 TALLOC_FREE(push);
   41464           0 :                 PyErr_SetNdrError(err);
   41465           0 :                 return NULL;
   41466             :         }
   41467           0 :         blob = ndr_push_blob(push);
   41468           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   41469           0 :         TALLOC_FREE(push);
   41470           0 :         return ret;
   41471             : }
   41472             : 
   41473           0 : static PyObject *py_srvsvc_NetShareEnumAll_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41474             : {
   41475           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   41476           0 :         PyObject *bigendian_obj = NULL;
   41477           0 :         PyObject *ndr64_obj = NULL;
   41478           0 :         uint32_t ndr_push_flags = 0;
   41479             : 
   41480           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   41481             :                 discard_const_p(char *, kwnames),
   41482             :                 &bigendian_obj,
   41483             :                 &ndr64_obj)) {
   41484           0 :                 return NULL;
   41485             :         }
   41486             : 
   41487           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41488           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   41489             :         }
   41490           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41491           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   41492             :         }
   41493             : 
   41494           0 :         return py_srvsvc_NetShareEnumAll_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   41495             : }
   41496             : 
   41497           0 : static PyObject *py_srvsvc_NetShareEnumAll_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41498             : {
   41499           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   41500           0 :         PyObject *bigendian_obj = NULL;
   41501           0 :         PyObject *ndr64_obj = NULL;
   41502           0 :         uint32_t ndr_push_flags = 0;
   41503             : 
   41504           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   41505             :                 discard_const_p(char *, kwnames),
   41506             :                 &bigendian_obj,
   41507             :                 &ndr64_obj)) {
   41508           0 :                 return NULL;
   41509             :         }
   41510             : 
   41511           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41512           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   41513             :         }
   41514           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41515           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   41516             :         }
   41517             : 
   41518           0 :         return py_srvsvc_NetShareEnumAll_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   41519             : }
   41520             : 
   41521           0 : static PyObject *py_srvsvc_NetShareEnumAll_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   41522             : {
   41523           0 :         const struct ndr_interface_call *call = NULL;
   41524           0 :         struct srvsvc_NetShareEnumAll *object = (struct srvsvc_NetShareEnumAll *)pytalloc_get_ptr(py_obj);
   41525           0 :         struct ndr_pull *pull = NULL;
   41526             :         enum ndr_err_code err;
   41527             : 
   41528           0 :         if (ndr_table_srvsvc.num_calls < 16) {
   41529           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareEnumAll_ndr_unpack");
   41530           0 :                 return NULL;
   41531             :         }
   41532           0 :         call = &ndr_table_srvsvc.calls[15];
   41533             : 
   41534           0 :         pull = ndr_pull_init_blob(blob, object);
   41535           0 :         if (pull == NULL) {
   41536           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   41537           0 :                 return NULL;
   41538             :         }
   41539             : 
   41540           0 :         pull->flags |= ndr_pull_flags;
   41541             : 
   41542           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   41543           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   41544           0 :                 TALLOC_FREE(pull);
   41545           0 :                 PyErr_SetNdrError(err);
   41546           0 :                 return NULL;
   41547             :         }
   41548           0 :         if (!allow_remaining) {
   41549             :                 uint32_t highest_ofs;
   41550             : 
   41551           0 :                 if (pull->offset > pull->relative_highest_offset) {
   41552           0 :                         highest_ofs = pull->offset;
   41553             :                 } else {
   41554           0 :                         highest_ofs = pull->relative_highest_offset;
   41555             :                 }
   41556           0 :                 if (highest_ofs < pull->data_size) {
   41557           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   41558             :                                 "not all bytes consumed ofs[%u] size[%u]",
   41559             :                                 highest_ofs, pull->data_size);
   41560           0 :                         TALLOC_FREE(pull);
   41561           0 :                         PyErr_SetNdrError(err);
   41562           0 :                         return NULL;
   41563             :                 }
   41564             :         }
   41565             : 
   41566           0 :         TALLOC_FREE(pull);
   41567           0 :         Py_RETURN_NONE;
   41568             : }
   41569             : 
   41570           0 : static PyObject *py_srvsvc_NetShareEnumAll_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41571             : {
   41572             :         DATA_BLOB blob;
   41573           0 :         Py_ssize_t blob_length = 0;
   41574           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   41575           0 :         PyObject *bigendian_obj = NULL;
   41576           0 :         PyObject *ndr64_obj = NULL;
   41577           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   41578           0 :         PyObject *allow_remaining_obj = NULL;
   41579           0 :         bool allow_remaining = false;
   41580             : 
   41581           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   41582             :                 discard_const_p(char *, kwnames),
   41583             :                 &blob.data, &blob_length,
   41584             :                 &bigendian_obj,
   41585             :                 &ndr64_obj,
   41586             :                 &allow_remaining_obj)) {
   41587           0 :                 return NULL;
   41588             :         }
   41589           0 :         blob.length = blob_length;
   41590             : 
   41591           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41592           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   41593             :         }
   41594           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41595           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   41596             :         }
   41597             : 
   41598           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   41599           0 :                 allow_remaining = true;
   41600             :         }
   41601             : 
   41602           0 :         return py_srvsvc_NetShareEnumAll_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   41603             : }
   41604             : 
   41605           0 : static PyObject *py_srvsvc_NetShareEnumAll_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41606             : {
   41607             :         DATA_BLOB blob;
   41608           0 :         Py_ssize_t blob_length = 0;
   41609           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   41610           0 :         PyObject *bigendian_obj = NULL;
   41611           0 :         PyObject *ndr64_obj = NULL;
   41612           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   41613           0 :         PyObject *allow_remaining_obj = NULL;
   41614           0 :         bool allow_remaining = false;
   41615             : 
   41616           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   41617             :                 discard_const_p(char *, kwnames),
   41618             :                 &blob.data, &blob_length,
   41619             :                 &bigendian_obj,
   41620             :                 &ndr64_obj,
   41621             :                 &allow_remaining_obj)) {
   41622           0 :                 return NULL;
   41623             :         }
   41624           0 :         blob.length = blob_length;
   41625             : 
   41626           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41627           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   41628             :         }
   41629           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41630           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   41631             :         }
   41632             : 
   41633           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   41634           0 :                 allow_remaining = true;
   41635             :         }
   41636             : 
   41637           0 :         return py_srvsvc_NetShareEnumAll_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   41638             : }
   41639             : 
   41640           0 : static PyObject *py_srvsvc_NetShareEnumAll_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   41641             : {
   41642           0 :         const struct ndr_interface_call *call = NULL;
   41643           0 :         struct srvsvc_NetShareEnumAll *object = (struct srvsvc_NetShareEnumAll *)pytalloc_get_ptr(py_obj);
   41644             :         PyObject *ret;
   41645             :         char *retstr;
   41646             : 
   41647           0 :         if (ndr_table_srvsvc.num_calls < 16) {
   41648           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareEnumAll_ndr_print");
   41649           0 :                 return NULL;
   41650             :         }
   41651           0 :         call = &ndr_table_srvsvc.calls[15];
   41652             : 
   41653           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   41654           0 :         ret = PyUnicode_FromString(retstr);
   41655           0 :         TALLOC_FREE(retstr);
   41656             : 
   41657           0 :         return ret;
   41658             : }
   41659             : 
   41660           0 : static PyObject *py_srvsvc_NetShareEnumAll_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   41661             : {
   41662           0 :         return py_srvsvc_NetShareEnumAll_ndr_print(py_obj, "srvsvc_NetShareEnumAll_in", NDR_IN);
   41663             : }
   41664             : 
   41665           0 : static PyObject *py_srvsvc_NetShareEnumAll_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   41666             : {
   41667           0 :         return py_srvsvc_NetShareEnumAll_ndr_print(py_obj, "srvsvc_NetShareEnumAll_out", NDR_OUT);
   41668             : }
   41669             : 
   41670             : static PyMethodDef py_srvsvc_NetShareEnumAll_methods[] = {
   41671             :         { "opnum", (PyCFunction)py_srvsvc_NetShareEnumAll_ndr_opnum, METH_NOARGS|METH_CLASS,
   41672             :                 "srvsvc.NetShareEnumAll.opnum() -> 15 (0x0f) " },
   41673             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareEnumAll_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   41674             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   41675             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareEnumAll_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   41676             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   41677             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareEnumAll_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   41678             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   41679             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareEnumAll_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   41680             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   41681             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetShareEnumAll_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   41682             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetShareEnumAll_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   41683             :         { NULL, NULL, 0, NULL }
   41684             : };
   41685             : 
   41686             : 
   41687             : static PyTypeObject srvsvc_NetShareEnumAll_Type = {
   41688             :         PyVarObject_HEAD_INIT(NULL, 0)
   41689             :         .tp_name = "srvsvc.NetShareEnumAll",
   41690             :         .tp_getset = py_srvsvc_NetShareEnumAll_getsetters,
   41691             :         .tp_methods = py_srvsvc_NetShareEnumAll_methods,
   41692             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   41693             :         .tp_new = py_srvsvc_NetShareEnumAll_new,
   41694             : };
   41695             : 
   41696           0 : static bool pack_py_srvsvc_NetShareEnumAll_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareEnumAll *r)
   41697             : {
   41698             :         PyObject *py_server_unc;
   41699             :         PyObject *py_info_ctr;
   41700             :         PyObject *py_max_buffer;
   41701             :         PyObject *py_resume_handle;
   41702           0 :         const char *kwnames[] = {
   41703             :                 "server_unc", "info_ctr", "max_buffer", "resume_handle", NULL
   41704             :         };
   41705             : 
   41706           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetShareEnumAll", discard_const_p(char *, kwnames), &py_server_unc, &py_info_ctr, &py_max_buffer, &py_resume_handle)) {
   41707           0 :                 return false;
   41708             :         }
   41709             : 
   41710           0 :         if (py_server_unc == NULL) {
   41711           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   41712           0 :                 return false;
   41713             :         }
   41714           0 :         if (py_server_unc == Py_None) {
   41715           0 :                 r->in.server_unc = NULL;
   41716             :         } else {
   41717           0 :                 r->in.server_unc = NULL;
   41718             :                 {
   41719             :                         const char *test_str;
   41720             :                         const char *talloc_str;
   41721           0 :                         PyObject *unicode = NULL;
   41722           0 :                         if (PyUnicode_Check(py_server_unc)) {
   41723           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   41724           0 :                                 if (unicode == NULL) {
   41725           0 :                                         PyErr_NoMemory();
   41726           0 :                                         return false;
   41727             :                                 }
   41728           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   41729           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   41730           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   41731             :                         } else {
   41732           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   41733           0 :                                 return false;
   41734             :                         }
   41735           0 :                         talloc_str = talloc_strdup(r, test_str);
   41736           0 :                         if (unicode != NULL) {
   41737           0 :                                 Py_DECREF(unicode);
   41738             :                         }
   41739           0 :                         if (talloc_str == NULL) {
   41740           0 :                                 PyErr_NoMemory();
   41741           0 :                                 return false;
   41742             :                         }
   41743           0 :                         r->in.server_unc = talloc_str;
   41744             :                 }
   41745             :         }
   41746           0 :         if (py_info_ctr == NULL) {
   41747           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info_ctr");
   41748           0 :                 return false;
   41749             :         }
   41750           0 :         r->in.info_ctr = talloc_ptrtype(r, r->in.info_ctr);
   41751           0 :         if (r->in.info_ctr == NULL) {
   41752           0 :                 PyErr_NoMemory();
   41753           0 :                 return false;
   41754             :         }
   41755           0 :         PY_CHECK_TYPE(&srvsvc_NetShareInfoCtr_Type, py_info_ctr, return false;);
   41756           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_info_ctr)) == NULL) {
   41757           0 :                 PyErr_NoMemory();
   41758           0 :                 return false;
   41759             :         }
   41760           0 :         r->in.info_ctr = (struct srvsvc_NetShareInfoCtr *)pytalloc_get_ptr(py_info_ctr);
   41761           0 :         if (py_max_buffer == NULL) {
   41762           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.max_buffer");
   41763           0 :                 return false;
   41764             :         }
   41765             :         {
   41766           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
   41767           0 :                 if (PyLong_Check(py_max_buffer)) {
   41768             :                         unsigned long long test_var;
   41769           0 :                         test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
   41770           0 :                         if (PyErr_Occurred() != NULL) {
   41771           0 :                                 return false;
   41772             :                         }
   41773           0 :                         if (test_var > uint_max) {
   41774           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   41775             :                                   PyLong_Type.tp_name, uint_max, test_var);
   41776           0 :                                 return false;
   41777             :                         }
   41778           0 :                         r->in.max_buffer = test_var;
   41779             :                 } else {
   41780           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   41781             :                           PyLong_Type.tp_name);
   41782           0 :                         return false;
   41783             :                 }
   41784             :         }
   41785           0 :         if (py_resume_handle == NULL) {
   41786           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.resume_handle");
   41787           0 :                 return false;
   41788             :         }
   41789           0 :         if (py_resume_handle == Py_None) {
   41790           0 :                 r->in.resume_handle = NULL;
   41791             :         } else {
   41792           0 :                 r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
   41793           0 :                 if (r->in.resume_handle == NULL) {
   41794           0 :                         PyErr_NoMemory();
   41795           0 :                         return false;
   41796             :                 }
   41797             :                 {
   41798           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
   41799           0 :                         if (PyLong_Check(py_resume_handle)) {
   41800             :                                 unsigned long long test_var;
   41801           0 :                                 test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
   41802           0 :                                 if (PyErr_Occurred() != NULL) {
   41803           0 :                                         return false;
   41804             :                                 }
   41805           0 :                                 if (test_var > uint_max) {
   41806           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   41807             :                                           PyLong_Type.tp_name, uint_max, test_var);
   41808           0 :                                         return false;
   41809             :                                 }
   41810           0 :                                 *r->in.resume_handle = test_var;
   41811             :                         } else {
   41812           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   41813             :                                   PyLong_Type.tp_name);
   41814           0 :                                 return false;
   41815             :                         }
   41816             :                 }
   41817             :         }
   41818           0 :         return true;
   41819             : }
   41820             : 
   41821           0 : static PyObject *unpack_py_srvsvc_NetShareEnumAll_args_out(struct srvsvc_NetShareEnumAll *r)
   41822             : {
   41823             :         PyObject *result;
   41824             :         PyObject *py_info_ctr;
   41825             :         PyObject *py_totalentries;
   41826             :         PyObject *py_resume_handle;
   41827           0 :         result = PyTuple_New(3);
   41828           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetShareInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
   41829           0 :         PyTuple_SetItem(result, 0, py_info_ctr);
   41830           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)*r->out.totalentries);
   41831           0 :         PyTuple_SetItem(result, 1, py_totalentries);
   41832           0 :         if (r->out.resume_handle == NULL) {
   41833           0 :                 py_resume_handle = Py_None;
   41834           0 :                 Py_INCREF(py_resume_handle);
   41835             :         } else {
   41836           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)*r->out.resume_handle);
   41837             :         }
   41838           0 :         PyTuple_SetItem(result, 2, py_resume_handle);
   41839           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   41840           0 :                 PyErr_SetWERROR(r->out.result);
   41841           0 :                 return NULL;
   41842             :         }
   41843             : 
   41844           0 :         return result;
   41845             : }
   41846             : 
   41847             : 
   41848           0 : static PyObject *py_srvsvc_NetShareGetInfo_in_get_server_unc(PyObject *obj, void *closure)
   41849             : {
   41850           0 :         struct srvsvc_NetShareGetInfo *object = (struct srvsvc_NetShareGetInfo *)pytalloc_get_ptr(obj);
   41851             :         PyObject *py_server_unc;
   41852           0 :         if (object->in.server_unc == NULL) {
   41853           0 :                 Py_RETURN_NONE;
   41854             :         }
   41855           0 :         if (object->in.server_unc == NULL) {
   41856           0 :                 py_server_unc = Py_None;
   41857           0 :                 Py_INCREF(py_server_unc);
   41858             :         } else {
   41859           0 :                 if (object->in.server_unc == NULL) {
   41860           0 :                         py_server_unc = Py_None;
   41861           0 :                         Py_INCREF(py_server_unc);
   41862             :                 } else {
   41863           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   41864             :                 }
   41865             :         }
   41866           0 :         return py_server_unc;
   41867             : }
   41868             : 
   41869           0 : static int py_srvsvc_NetShareGetInfo_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   41870             : {
   41871           0 :         struct srvsvc_NetShareGetInfo *object = (struct srvsvc_NetShareGetInfo *)pytalloc_get_ptr(py_obj);
   41872           0 :         if (value == NULL) {
   41873           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   41874           0 :                 return -1;
   41875             :         }
   41876           0 :         if (value == Py_None) {
   41877           0 :                 object->in.server_unc = NULL;
   41878             :         } else {
   41879           0 :                 object->in.server_unc = NULL;
   41880             :                 {
   41881             :                         const char *test_str;
   41882             :                         const char *talloc_str;
   41883           0 :                         PyObject *unicode = NULL;
   41884           0 :                         if (PyUnicode_Check(value)) {
   41885           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   41886           0 :                                 if (unicode == NULL) {
   41887           0 :                                         PyErr_NoMemory();
   41888           0 :                                         return -1;
   41889             :                                 }
   41890           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   41891           0 :                         } else if (PyBytes_Check(value)) {
   41892           0 :                                 test_str = PyBytes_AS_STRING(value);
   41893             :                         } else {
   41894           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   41895           0 :                                 return -1;
   41896             :                         }
   41897           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   41898           0 :                         if (unicode != NULL) {
   41899           0 :                                 Py_DECREF(unicode);
   41900             :                         }
   41901           0 :                         if (talloc_str == NULL) {
   41902           0 :                                 PyErr_NoMemory();
   41903           0 :                                 return -1;
   41904             :                         }
   41905           0 :                         object->in.server_unc = talloc_str;
   41906             :                 }
   41907             :         }
   41908           0 :         return 0;
   41909             : }
   41910             : 
   41911           0 : static PyObject *py_srvsvc_NetShareGetInfo_in_get_share_name(PyObject *obj, void *closure)
   41912             : {
   41913           0 :         struct srvsvc_NetShareGetInfo *object = (struct srvsvc_NetShareGetInfo *)pytalloc_get_ptr(obj);
   41914             :         PyObject *py_share_name;
   41915           0 :         if (object->in.share_name == NULL) {
   41916           0 :                 py_share_name = Py_None;
   41917           0 :                 Py_INCREF(py_share_name);
   41918             :         } else {
   41919           0 :                 py_share_name = PyUnicode_Decode(object->in.share_name, strlen(object->in.share_name), "utf-8", "ignore");
   41920             :         }
   41921           0 :         return py_share_name;
   41922             : }
   41923             : 
   41924           0 : static int py_srvsvc_NetShareGetInfo_in_set_share_name(PyObject *py_obj, PyObject *value, void *closure)
   41925             : {
   41926           0 :         struct srvsvc_NetShareGetInfo *object = (struct srvsvc_NetShareGetInfo *)pytalloc_get_ptr(py_obj);
   41927           0 :         if (value == NULL) {
   41928           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.share_name");
   41929           0 :                 return -1;
   41930             :         }
   41931             :         {
   41932             :                 const char *test_str;
   41933             :                 const char *talloc_str;
   41934           0 :                 PyObject *unicode = NULL;
   41935           0 :                 if (PyUnicode_Check(value)) {
   41936           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   41937           0 :                         if (unicode == NULL) {
   41938           0 :                                 PyErr_NoMemory();
   41939           0 :                                 return -1;
   41940             :                         }
   41941           0 :                         test_str = PyBytes_AS_STRING(unicode);
   41942           0 :                 } else if (PyBytes_Check(value)) {
   41943           0 :                         test_str = PyBytes_AS_STRING(value);
   41944             :                 } else {
   41945           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   41946           0 :                         return -1;
   41947             :                 }
   41948           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   41949           0 :                 if (unicode != NULL) {
   41950           0 :                         Py_DECREF(unicode);
   41951             :                 }
   41952           0 :                 if (talloc_str == NULL) {
   41953           0 :                         PyErr_NoMemory();
   41954           0 :                         return -1;
   41955             :                 }
   41956           0 :                 object->in.share_name = talloc_str;
   41957             :         }
   41958           0 :         return 0;
   41959             : }
   41960             : 
   41961           0 : static PyObject *py_srvsvc_NetShareGetInfo_in_get_level(PyObject *obj, void *closure)
   41962             : {
   41963           0 :         struct srvsvc_NetShareGetInfo *object = (struct srvsvc_NetShareGetInfo *)pytalloc_get_ptr(obj);
   41964             :         PyObject *py_level;
   41965           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   41966           0 :         return py_level;
   41967             : }
   41968             : 
   41969           0 : static int py_srvsvc_NetShareGetInfo_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   41970             : {
   41971           0 :         struct srvsvc_NetShareGetInfo *object = (struct srvsvc_NetShareGetInfo *)pytalloc_get_ptr(py_obj);
   41972           0 :         if (value == NULL) {
   41973           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   41974           0 :                 return -1;
   41975             :         }
   41976             :         {
   41977           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   41978           0 :                 if (PyLong_Check(value)) {
   41979             :                         unsigned long long test_var;
   41980           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   41981           0 :                         if (PyErr_Occurred() != NULL) {
   41982           0 :                                 return -1;
   41983             :                         }
   41984           0 :                         if (test_var > uint_max) {
   41985           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   41986             :                                   PyLong_Type.tp_name, uint_max, test_var);
   41987           0 :                                 return -1;
   41988             :                         }
   41989           0 :                         object->in.level = test_var;
   41990             :                 } else {
   41991           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   41992             :                           PyLong_Type.tp_name);
   41993           0 :                         return -1;
   41994             :                 }
   41995             :         }
   41996           0 :         return 0;
   41997             : }
   41998             : 
   41999           0 : static PyObject *py_srvsvc_NetShareGetInfo_out_get_info(PyObject *obj, void *closure)
   42000             : {
   42001           0 :         struct srvsvc_NetShareGetInfo *object = (struct srvsvc_NetShareGetInfo *)pytalloc_get_ptr(obj);
   42002             :         PyObject *py_info;
   42003           0 :         if (object->out.info == NULL) {
   42004           0 :                 Py_RETURN_NONE;
   42005             :         }
   42006           0 :         py_info = pyrpc_import_union(&srvsvc_NetShareInfo_Type, object->out.info, object->in.level, object->out.info, "union srvsvc_NetShareInfo");
   42007           0 :         if (py_info == NULL) {
   42008           0 :                 return NULL;
   42009             :         }
   42010           0 :         return py_info;
   42011             : }
   42012             : 
   42013           0 : static int py_srvsvc_NetShareGetInfo_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   42014             : {
   42015           0 :         struct srvsvc_NetShareGetInfo *object = (struct srvsvc_NetShareGetInfo *)pytalloc_get_ptr(py_obj);
   42016           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   42017           0 :         if (value == NULL) {
   42018           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info");
   42019           0 :                 return -1;
   42020             :         }
   42021           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   42022           0 :         if (object->out.info == NULL) {
   42023           0 :                 PyErr_NoMemory();
   42024           0 :                 return -1;
   42025             :         }
   42026             :         {
   42027             :                 union srvsvc_NetShareInfo *info_switch_1;
   42028           0 :                 info_switch_1 = (union srvsvc_NetShareInfo *)pyrpc_export_union(&srvsvc_NetShareInfo_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union srvsvc_NetShareInfo");
   42029           0 :                 if (info_switch_1 == NULL) {
   42030           0 :                         return -1;
   42031             :                 }
   42032           0 :                 object->out.info = info_switch_1;
   42033             :         }
   42034           0 :         return 0;
   42035             : }
   42036             : 
   42037           0 : static PyObject *py_srvsvc_NetShareGetInfo_get_result(PyObject *obj, void *closure)
   42038             : {
   42039           0 :         struct srvsvc_NetShareGetInfo *object = (struct srvsvc_NetShareGetInfo *)pytalloc_get_ptr(obj);
   42040             :         PyObject *py_result;
   42041           0 :         py_result = PyErr_FromWERROR(object->out.result);
   42042           0 :         return py_result;
   42043             : }
   42044             : 
   42045           0 : static int py_srvsvc_NetShareGetInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
   42046             : {
   42047           0 :         struct srvsvc_NetShareGetInfo *object = (struct srvsvc_NetShareGetInfo *)pytalloc_get_ptr(py_obj);
   42048           0 :         if (value == NULL) {
   42049           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   42050           0 :                 return -1;
   42051             :         }
   42052           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   42053           0 :         return 0;
   42054             : }
   42055             : 
   42056             : static PyGetSetDef py_srvsvc_NetShareGetInfo_getsetters[] = {
   42057             :         {
   42058             :                 .name = discard_const_p(char, "in_server_unc"),
   42059             :                 .get = py_srvsvc_NetShareGetInfo_in_get_server_unc,
   42060             :                 .set = py_srvsvc_NetShareGetInfo_in_set_server_unc,
   42061             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   42062             :         },
   42063             :         {
   42064             :                 .name = discard_const_p(char, "in_share_name"),
   42065             :                 .get = py_srvsvc_NetShareGetInfo_in_get_share_name,
   42066             :                 .set = py_srvsvc_NetShareGetInfo_in_set_share_name,
   42067             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   42068             :         },
   42069             :         {
   42070             :                 .name = discard_const_p(char, "in_level"),
   42071             :                 .get = py_srvsvc_NetShareGetInfo_in_get_level,
   42072             :                 .set = py_srvsvc_NetShareGetInfo_in_set_level,
   42073             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   42074             :         },
   42075             :         {
   42076             :                 .name = discard_const_p(char, "out_info"),
   42077             :                 .get = py_srvsvc_NetShareGetInfo_out_get_info,
   42078             :                 .set = py_srvsvc_NetShareGetInfo_out_set_info,
   42079             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfo")
   42080             :         },
   42081             :         {
   42082             :                 .name = discard_const_p(char, "result"),
   42083             :                 .get = py_srvsvc_NetShareGetInfo_get_result,
   42084             :                 .set = py_srvsvc_NetShareGetInfo_set_result,
   42085             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   42086             :         },
   42087             :         { .name = NULL }
   42088             : };
   42089             : 
   42090           0 : static PyObject *py_srvsvc_NetShareGetInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   42091             : {
   42092           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetShareGetInfo, type);
   42093           0 :         struct srvsvc_NetShareGetInfo *_self = (struct srvsvc_NetShareGetInfo *)pytalloc_get_ptr(self);
   42094           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   42095           0 :         _self->out.info = talloc_zero(mem_ctx, union srvsvc_NetShareInfo);
   42096           0 :         return self;
   42097             : }
   42098             : 
   42099           0 : static PyObject *py_srvsvc_NetShareGetInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   42100             : {
   42101             : 
   42102             : 
   42103           0 :         return PyLong_FromLong(16);
   42104             : }
   42105             : 
   42106           0 : static PyObject *py_srvsvc_NetShareGetInfo_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   42107             : {
   42108           0 :         const struct ndr_interface_call *call = NULL;
   42109           0 :         struct srvsvc_NetShareGetInfo *object = (struct srvsvc_NetShareGetInfo *)pytalloc_get_ptr(py_obj);
   42110           0 :         PyObject *ret = NULL;
   42111           0 :         struct ndr_push *push = NULL;
   42112             :         DATA_BLOB blob;
   42113             :         enum ndr_err_code err;
   42114             : 
   42115           0 :         if (ndr_table_srvsvc.num_calls < 17) {
   42116           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareGetInfo_ndr_pack");
   42117           0 :                 return NULL;
   42118             :         }
   42119           0 :         call = &ndr_table_srvsvc.calls[16];
   42120             : 
   42121           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   42122           0 :         if (push == NULL) {
   42123           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   42124           0 :                 return NULL;
   42125             :         }
   42126             : 
   42127           0 :         push->flags |= ndr_push_flags;
   42128             : 
   42129           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   42130           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   42131           0 :                 TALLOC_FREE(push);
   42132           0 :                 PyErr_SetNdrError(err);
   42133           0 :                 return NULL;
   42134             :         }
   42135           0 :         blob = ndr_push_blob(push);
   42136           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   42137           0 :         TALLOC_FREE(push);
   42138           0 :         return ret;
   42139             : }
   42140             : 
   42141           0 : static PyObject *py_srvsvc_NetShareGetInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42142             : {
   42143           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   42144           0 :         PyObject *bigendian_obj = NULL;
   42145           0 :         PyObject *ndr64_obj = NULL;
   42146           0 :         uint32_t ndr_push_flags = 0;
   42147             : 
   42148           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   42149             :                 discard_const_p(char *, kwnames),
   42150             :                 &bigendian_obj,
   42151             :                 &ndr64_obj)) {
   42152           0 :                 return NULL;
   42153             :         }
   42154             : 
   42155           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42156           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   42157             :         }
   42158           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42159           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   42160             :         }
   42161             : 
   42162           0 :         return py_srvsvc_NetShareGetInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   42163             : }
   42164             : 
   42165           0 : static PyObject *py_srvsvc_NetShareGetInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42166             : {
   42167           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   42168           0 :         PyObject *bigendian_obj = NULL;
   42169           0 :         PyObject *ndr64_obj = NULL;
   42170           0 :         uint32_t ndr_push_flags = 0;
   42171             : 
   42172           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   42173             :                 discard_const_p(char *, kwnames),
   42174             :                 &bigendian_obj,
   42175             :                 &ndr64_obj)) {
   42176           0 :                 return NULL;
   42177             :         }
   42178             : 
   42179           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42180           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   42181             :         }
   42182           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42183           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   42184             :         }
   42185             : 
   42186           0 :         return py_srvsvc_NetShareGetInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   42187             : }
   42188             : 
   42189           0 : static PyObject *py_srvsvc_NetShareGetInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   42190             : {
   42191           0 :         const struct ndr_interface_call *call = NULL;
   42192           0 :         struct srvsvc_NetShareGetInfo *object = (struct srvsvc_NetShareGetInfo *)pytalloc_get_ptr(py_obj);
   42193           0 :         struct ndr_pull *pull = NULL;
   42194             :         enum ndr_err_code err;
   42195             : 
   42196           0 :         if (ndr_table_srvsvc.num_calls < 17) {
   42197           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareGetInfo_ndr_unpack");
   42198           0 :                 return NULL;
   42199             :         }
   42200           0 :         call = &ndr_table_srvsvc.calls[16];
   42201             : 
   42202           0 :         pull = ndr_pull_init_blob(blob, object);
   42203           0 :         if (pull == NULL) {
   42204           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   42205           0 :                 return NULL;
   42206             :         }
   42207             : 
   42208           0 :         pull->flags |= ndr_pull_flags;
   42209             : 
   42210           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   42211           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   42212           0 :                 TALLOC_FREE(pull);
   42213           0 :                 PyErr_SetNdrError(err);
   42214           0 :                 return NULL;
   42215             :         }
   42216           0 :         if (!allow_remaining) {
   42217             :                 uint32_t highest_ofs;
   42218             : 
   42219           0 :                 if (pull->offset > pull->relative_highest_offset) {
   42220           0 :                         highest_ofs = pull->offset;
   42221             :                 } else {
   42222           0 :                         highest_ofs = pull->relative_highest_offset;
   42223             :                 }
   42224           0 :                 if (highest_ofs < pull->data_size) {
   42225           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   42226             :                                 "not all bytes consumed ofs[%u] size[%u]",
   42227             :                                 highest_ofs, pull->data_size);
   42228           0 :                         TALLOC_FREE(pull);
   42229           0 :                         PyErr_SetNdrError(err);
   42230           0 :                         return NULL;
   42231             :                 }
   42232             :         }
   42233             : 
   42234           0 :         TALLOC_FREE(pull);
   42235           0 :         Py_RETURN_NONE;
   42236             : }
   42237             : 
   42238           0 : static PyObject *py_srvsvc_NetShareGetInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42239             : {
   42240             :         DATA_BLOB blob;
   42241           0 :         Py_ssize_t blob_length = 0;
   42242           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   42243           0 :         PyObject *bigendian_obj = NULL;
   42244           0 :         PyObject *ndr64_obj = NULL;
   42245           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   42246           0 :         PyObject *allow_remaining_obj = NULL;
   42247           0 :         bool allow_remaining = false;
   42248             : 
   42249           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   42250             :                 discard_const_p(char *, kwnames),
   42251             :                 &blob.data, &blob_length,
   42252             :                 &bigendian_obj,
   42253             :                 &ndr64_obj,
   42254             :                 &allow_remaining_obj)) {
   42255           0 :                 return NULL;
   42256             :         }
   42257           0 :         blob.length = blob_length;
   42258             : 
   42259           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42260           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   42261             :         }
   42262           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42263           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   42264             :         }
   42265             : 
   42266           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   42267           0 :                 allow_remaining = true;
   42268             :         }
   42269             : 
   42270           0 :         return py_srvsvc_NetShareGetInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   42271             : }
   42272             : 
   42273           0 : static PyObject *py_srvsvc_NetShareGetInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42274             : {
   42275             :         DATA_BLOB blob;
   42276           0 :         Py_ssize_t blob_length = 0;
   42277           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   42278           0 :         PyObject *bigendian_obj = NULL;
   42279           0 :         PyObject *ndr64_obj = NULL;
   42280           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   42281           0 :         PyObject *allow_remaining_obj = NULL;
   42282           0 :         bool allow_remaining = false;
   42283             : 
   42284           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   42285             :                 discard_const_p(char *, kwnames),
   42286             :                 &blob.data, &blob_length,
   42287             :                 &bigendian_obj,
   42288             :                 &ndr64_obj,
   42289             :                 &allow_remaining_obj)) {
   42290           0 :                 return NULL;
   42291             :         }
   42292           0 :         blob.length = blob_length;
   42293             : 
   42294           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42295           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   42296             :         }
   42297           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42298           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   42299             :         }
   42300             : 
   42301           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   42302           0 :                 allow_remaining = true;
   42303             :         }
   42304             : 
   42305           0 :         return py_srvsvc_NetShareGetInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   42306             : }
   42307             : 
   42308           0 : static PyObject *py_srvsvc_NetShareGetInfo_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   42309             : {
   42310           0 :         const struct ndr_interface_call *call = NULL;
   42311           0 :         struct srvsvc_NetShareGetInfo *object = (struct srvsvc_NetShareGetInfo *)pytalloc_get_ptr(py_obj);
   42312             :         PyObject *ret;
   42313             :         char *retstr;
   42314             : 
   42315           0 :         if (ndr_table_srvsvc.num_calls < 17) {
   42316           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareGetInfo_ndr_print");
   42317           0 :                 return NULL;
   42318             :         }
   42319           0 :         call = &ndr_table_srvsvc.calls[16];
   42320             : 
   42321           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   42322           0 :         ret = PyUnicode_FromString(retstr);
   42323           0 :         TALLOC_FREE(retstr);
   42324             : 
   42325           0 :         return ret;
   42326             : }
   42327             : 
   42328           0 : static PyObject *py_srvsvc_NetShareGetInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   42329             : {
   42330           0 :         return py_srvsvc_NetShareGetInfo_ndr_print(py_obj, "srvsvc_NetShareGetInfo_in", NDR_IN);
   42331             : }
   42332             : 
   42333           0 : static PyObject *py_srvsvc_NetShareGetInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   42334             : {
   42335           0 :         return py_srvsvc_NetShareGetInfo_ndr_print(py_obj, "srvsvc_NetShareGetInfo_out", NDR_OUT);
   42336             : }
   42337             : 
   42338             : static PyMethodDef py_srvsvc_NetShareGetInfo_methods[] = {
   42339             :         { "opnum", (PyCFunction)py_srvsvc_NetShareGetInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
   42340             :                 "srvsvc.NetShareGetInfo.opnum() -> 16 (0x10) " },
   42341             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareGetInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   42342             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   42343             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareGetInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   42344             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   42345             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareGetInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   42346             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   42347             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareGetInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   42348             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   42349             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetShareGetInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   42350             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetShareGetInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   42351             :         { NULL, NULL, 0, NULL }
   42352             : };
   42353             : 
   42354             : 
   42355             : static PyTypeObject srvsvc_NetShareGetInfo_Type = {
   42356             :         PyVarObject_HEAD_INIT(NULL, 0)
   42357             :         .tp_name = "srvsvc.NetShareGetInfo",
   42358             :         .tp_getset = py_srvsvc_NetShareGetInfo_getsetters,
   42359             :         .tp_methods = py_srvsvc_NetShareGetInfo_methods,
   42360             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   42361             :         .tp_new = py_srvsvc_NetShareGetInfo_new,
   42362             : };
   42363             : 
   42364           1 : static bool pack_py_srvsvc_NetShareGetInfo_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareGetInfo *r)
   42365             : {
   42366             :         PyObject *py_server_unc;
   42367             :         PyObject *py_share_name;
   42368             :         PyObject *py_level;
   42369           1 :         const char *kwnames[] = {
   42370             :                 "server_unc", "share_name", "level", NULL
   42371             :         };
   42372             : 
   42373           1 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetShareGetInfo", discard_const_p(char *, kwnames), &py_server_unc, &py_share_name, &py_level)) {
   42374           0 :                 return false;
   42375             :         }
   42376             : 
   42377           1 :         if (py_server_unc == NULL) {
   42378           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   42379           0 :                 return false;
   42380             :         }
   42381           1 :         if (py_server_unc == Py_None) {
   42382           0 :                 r->in.server_unc = NULL;
   42383             :         } else {
   42384           1 :                 r->in.server_unc = NULL;
   42385             :                 {
   42386             :                         const char *test_str;
   42387             :                         const char *talloc_str;
   42388           1 :                         PyObject *unicode = NULL;
   42389           1 :                         if (PyUnicode_Check(py_server_unc)) {
   42390           1 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   42391           1 :                                 if (unicode == NULL) {
   42392           0 :                                         PyErr_NoMemory();
   42393           0 :                                         return false;
   42394             :                                 }
   42395           1 :                                 test_str = PyBytes_AS_STRING(unicode);
   42396           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   42397           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   42398             :                         } else {
   42399           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   42400           0 :                                 return false;
   42401             :                         }
   42402           1 :                         talloc_str = talloc_strdup(r, test_str);
   42403           1 :                         if (unicode != NULL) {
   42404           1 :                                 Py_DECREF(unicode);
   42405             :                         }
   42406           1 :                         if (talloc_str == NULL) {
   42407           0 :                                 PyErr_NoMemory();
   42408           0 :                                 return false;
   42409             :                         }
   42410           1 :                         r->in.server_unc = talloc_str;
   42411             :                 }
   42412             :         }
   42413           1 :         if (py_share_name == NULL) {
   42414           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.share_name");
   42415           0 :                 return false;
   42416             :         }
   42417             :         {
   42418             :                 const char *test_str;
   42419             :                 const char *talloc_str;
   42420           1 :                 PyObject *unicode = NULL;
   42421           1 :                 if (PyUnicode_Check(py_share_name)) {
   42422           1 :                         unicode = PyUnicode_AsEncodedString(py_share_name, "utf-8", "ignore");
   42423           1 :                         if (unicode == NULL) {
   42424           0 :                                 PyErr_NoMemory();
   42425           0 :                                 return false;
   42426             :                         }
   42427           1 :                         test_str = PyBytes_AS_STRING(unicode);
   42428           0 :                 } else if (PyBytes_Check(py_share_name)) {
   42429           0 :                         test_str = PyBytes_AS_STRING(py_share_name);
   42430             :                 } else {
   42431           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share_name)->tp_name);
   42432           0 :                         return false;
   42433             :                 }
   42434           1 :                 talloc_str = talloc_strdup(r, test_str);
   42435           1 :                 if (unicode != NULL) {
   42436           1 :                         Py_DECREF(unicode);
   42437             :                 }
   42438           1 :                 if (talloc_str == NULL) {
   42439           0 :                         PyErr_NoMemory();
   42440           0 :                         return false;
   42441             :                 }
   42442           1 :                 r->in.share_name = talloc_str;
   42443             :         }
   42444           1 :         if (py_level == NULL) {
   42445           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   42446           0 :                 return false;
   42447             :         }
   42448             :         {
   42449           1 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   42450           1 :                 if (PyLong_Check(py_level)) {
   42451             :                         unsigned long long test_var;
   42452           1 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   42453           1 :                         if (PyErr_Occurred() != NULL) {
   42454           0 :                                 return false;
   42455             :                         }
   42456           1 :                         if (test_var > uint_max) {
   42457           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   42458             :                                   PyLong_Type.tp_name, uint_max, test_var);
   42459           0 :                                 return false;
   42460             :                         }
   42461           1 :                         r->in.level = test_var;
   42462             :                 } else {
   42463           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   42464             :                           PyLong_Type.tp_name);
   42465           0 :                         return false;
   42466             :                 }
   42467             :         }
   42468           1 :         return true;
   42469             : }
   42470             : 
   42471           1 : static PyObject *unpack_py_srvsvc_NetShareGetInfo_args_out(struct srvsvc_NetShareGetInfo *r)
   42472             : {
   42473             :         PyObject *result;
   42474             :         PyObject *py_info;
   42475           1 :         py_info = pyrpc_import_union(&srvsvc_NetShareInfo_Type, r->out.info, r->in.level, r->out.info, "union srvsvc_NetShareInfo");
   42476           1 :         if (py_info == NULL) {
   42477           0 :                 return NULL;
   42478             :         }
   42479           1 :         result = py_info;
   42480           1 :         if (!W_ERROR_IS_OK(r->out.result)) {
   42481           0 :                 PyErr_SetWERROR(r->out.result);
   42482           0 :                 return NULL;
   42483             :         }
   42484             : 
   42485           1 :         return result;
   42486             : }
   42487             : 
   42488             : 
   42489           0 : static PyObject *py_srvsvc_NetShareSetInfo_in_get_server_unc(PyObject *obj, void *closure)
   42490             : {
   42491           0 :         struct srvsvc_NetShareSetInfo *object = (struct srvsvc_NetShareSetInfo *)pytalloc_get_ptr(obj);
   42492             :         PyObject *py_server_unc;
   42493           0 :         if (object->in.server_unc == NULL) {
   42494           0 :                 Py_RETURN_NONE;
   42495             :         }
   42496           0 :         if (object->in.server_unc == NULL) {
   42497           0 :                 py_server_unc = Py_None;
   42498           0 :                 Py_INCREF(py_server_unc);
   42499             :         } else {
   42500           0 :                 if (object->in.server_unc == NULL) {
   42501           0 :                         py_server_unc = Py_None;
   42502           0 :                         Py_INCREF(py_server_unc);
   42503             :                 } else {
   42504           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   42505             :                 }
   42506             :         }
   42507           0 :         return py_server_unc;
   42508             : }
   42509             : 
   42510           0 : static int py_srvsvc_NetShareSetInfo_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   42511             : {
   42512           0 :         struct srvsvc_NetShareSetInfo *object = (struct srvsvc_NetShareSetInfo *)pytalloc_get_ptr(py_obj);
   42513           0 :         if (value == NULL) {
   42514           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   42515           0 :                 return -1;
   42516             :         }
   42517           0 :         if (value == Py_None) {
   42518           0 :                 object->in.server_unc = NULL;
   42519             :         } else {
   42520           0 :                 object->in.server_unc = NULL;
   42521             :                 {
   42522             :                         const char *test_str;
   42523             :                         const char *talloc_str;
   42524           0 :                         PyObject *unicode = NULL;
   42525           0 :                         if (PyUnicode_Check(value)) {
   42526           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   42527           0 :                                 if (unicode == NULL) {
   42528           0 :                                         PyErr_NoMemory();
   42529           0 :                                         return -1;
   42530             :                                 }
   42531           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   42532           0 :                         } else if (PyBytes_Check(value)) {
   42533           0 :                                 test_str = PyBytes_AS_STRING(value);
   42534             :                         } else {
   42535           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   42536           0 :                                 return -1;
   42537             :                         }
   42538           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   42539           0 :                         if (unicode != NULL) {
   42540           0 :                                 Py_DECREF(unicode);
   42541             :                         }
   42542           0 :                         if (talloc_str == NULL) {
   42543           0 :                                 PyErr_NoMemory();
   42544           0 :                                 return -1;
   42545             :                         }
   42546           0 :                         object->in.server_unc = talloc_str;
   42547             :                 }
   42548             :         }
   42549           0 :         return 0;
   42550             : }
   42551             : 
   42552           0 : static PyObject *py_srvsvc_NetShareSetInfo_in_get_share_name(PyObject *obj, void *closure)
   42553             : {
   42554           0 :         struct srvsvc_NetShareSetInfo *object = (struct srvsvc_NetShareSetInfo *)pytalloc_get_ptr(obj);
   42555             :         PyObject *py_share_name;
   42556           0 :         if (object->in.share_name == NULL) {
   42557           0 :                 py_share_name = Py_None;
   42558           0 :                 Py_INCREF(py_share_name);
   42559             :         } else {
   42560           0 :                 py_share_name = PyUnicode_Decode(object->in.share_name, strlen(object->in.share_name), "utf-8", "ignore");
   42561             :         }
   42562           0 :         return py_share_name;
   42563             : }
   42564             : 
   42565           0 : static int py_srvsvc_NetShareSetInfo_in_set_share_name(PyObject *py_obj, PyObject *value, void *closure)
   42566             : {
   42567           0 :         struct srvsvc_NetShareSetInfo *object = (struct srvsvc_NetShareSetInfo *)pytalloc_get_ptr(py_obj);
   42568           0 :         if (value == NULL) {
   42569           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.share_name");
   42570           0 :                 return -1;
   42571             :         }
   42572             :         {
   42573             :                 const char *test_str;
   42574             :                 const char *talloc_str;
   42575           0 :                 PyObject *unicode = NULL;
   42576           0 :                 if (PyUnicode_Check(value)) {
   42577           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   42578           0 :                         if (unicode == NULL) {
   42579           0 :                                 PyErr_NoMemory();
   42580           0 :                                 return -1;
   42581             :                         }
   42582           0 :                         test_str = PyBytes_AS_STRING(unicode);
   42583           0 :                 } else if (PyBytes_Check(value)) {
   42584           0 :                         test_str = PyBytes_AS_STRING(value);
   42585             :                 } else {
   42586           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   42587           0 :                         return -1;
   42588             :                 }
   42589           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   42590           0 :                 if (unicode != NULL) {
   42591           0 :                         Py_DECREF(unicode);
   42592             :                 }
   42593           0 :                 if (talloc_str == NULL) {
   42594           0 :                         PyErr_NoMemory();
   42595           0 :                         return -1;
   42596             :                 }
   42597           0 :                 object->in.share_name = talloc_str;
   42598             :         }
   42599           0 :         return 0;
   42600             : }
   42601             : 
   42602           0 : static PyObject *py_srvsvc_NetShareSetInfo_in_get_level(PyObject *obj, void *closure)
   42603             : {
   42604           0 :         struct srvsvc_NetShareSetInfo *object = (struct srvsvc_NetShareSetInfo *)pytalloc_get_ptr(obj);
   42605             :         PyObject *py_level;
   42606           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   42607           0 :         return py_level;
   42608             : }
   42609             : 
   42610           0 : static int py_srvsvc_NetShareSetInfo_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   42611             : {
   42612           0 :         struct srvsvc_NetShareSetInfo *object = (struct srvsvc_NetShareSetInfo *)pytalloc_get_ptr(py_obj);
   42613           0 :         if (value == NULL) {
   42614           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   42615           0 :                 return -1;
   42616             :         }
   42617             :         {
   42618           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   42619           0 :                 if (PyLong_Check(value)) {
   42620             :                         unsigned long long test_var;
   42621           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   42622           0 :                         if (PyErr_Occurred() != NULL) {
   42623           0 :                                 return -1;
   42624             :                         }
   42625           0 :                         if (test_var > uint_max) {
   42626           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   42627             :                                   PyLong_Type.tp_name, uint_max, test_var);
   42628           0 :                                 return -1;
   42629             :                         }
   42630           0 :                         object->in.level = test_var;
   42631             :                 } else {
   42632           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   42633             :                           PyLong_Type.tp_name);
   42634           0 :                         return -1;
   42635             :                 }
   42636             :         }
   42637           0 :         return 0;
   42638             : }
   42639             : 
   42640           0 : static PyObject *py_srvsvc_NetShareSetInfo_in_get_info(PyObject *obj, void *closure)
   42641             : {
   42642           0 :         struct srvsvc_NetShareSetInfo *object = (struct srvsvc_NetShareSetInfo *)pytalloc_get_ptr(obj);
   42643             :         PyObject *py_info;
   42644           0 :         if (object->in.info == NULL) {
   42645           0 :                 Py_RETURN_NONE;
   42646             :         }
   42647           0 :         py_info = pyrpc_import_union(&srvsvc_NetShareInfo_Type, object->in.info, object->in.level, object->in.info, "union srvsvc_NetShareInfo");
   42648           0 :         if (py_info == NULL) {
   42649           0 :                 return NULL;
   42650             :         }
   42651           0 :         return py_info;
   42652             : }
   42653             : 
   42654           0 : static int py_srvsvc_NetShareSetInfo_in_set_info(PyObject *py_obj, PyObject *value, void *closure)
   42655             : {
   42656           0 :         struct srvsvc_NetShareSetInfo *object = (struct srvsvc_NetShareSetInfo *)pytalloc_get_ptr(py_obj);
   42657           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info));
   42658           0 :         if (value == NULL) {
   42659           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.info");
   42660           0 :                 return -1;
   42661             :         }
   42662           0 :         object->in.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info);
   42663           0 :         if (object->in.info == NULL) {
   42664           0 :                 PyErr_NoMemory();
   42665           0 :                 return -1;
   42666             :         }
   42667             :         {
   42668             :                 union srvsvc_NetShareInfo *info_switch_1;
   42669           0 :                 info_switch_1 = (union srvsvc_NetShareInfo *)pyrpc_export_union(&srvsvc_NetShareInfo_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union srvsvc_NetShareInfo");
   42670           0 :                 if (info_switch_1 == NULL) {
   42671           0 :                         return -1;
   42672             :                 }
   42673           0 :                 object->in.info = info_switch_1;
   42674             :         }
   42675           0 :         return 0;
   42676             : }
   42677             : 
   42678           0 : static PyObject *py_srvsvc_NetShareSetInfo_in_get_parm_error(PyObject *obj, void *closure)
   42679             : {
   42680           0 :         struct srvsvc_NetShareSetInfo *object = (struct srvsvc_NetShareSetInfo *)pytalloc_get_ptr(obj);
   42681             :         PyObject *py_parm_error;
   42682           0 :         if (object->in.parm_error == NULL) {
   42683           0 :                 Py_RETURN_NONE;
   42684             :         }
   42685           0 :         if (object->in.parm_error == NULL) {
   42686           0 :                 py_parm_error = Py_None;
   42687           0 :                 Py_INCREF(py_parm_error);
   42688             :         } else {
   42689           0 :                 py_parm_error = PyLong_FromUnsignedLongLong((uint32_t)*object->in.parm_error);
   42690             :         }
   42691           0 :         return py_parm_error;
   42692             : }
   42693             : 
   42694           0 : static int py_srvsvc_NetShareSetInfo_in_set_parm_error(PyObject *py_obj, PyObject *value, void *closure)
   42695             : {
   42696           0 :         struct srvsvc_NetShareSetInfo *object = (struct srvsvc_NetShareSetInfo *)pytalloc_get_ptr(py_obj);
   42697           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.parm_error));
   42698           0 :         if (value == NULL) {
   42699           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.parm_error");
   42700           0 :                 return -1;
   42701             :         }
   42702           0 :         if (value == Py_None) {
   42703           0 :                 object->in.parm_error = NULL;
   42704             :         } else {
   42705           0 :                 object->in.parm_error = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.parm_error);
   42706           0 :                 if (object->in.parm_error == NULL) {
   42707           0 :                         PyErr_NoMemory();
   42708           0 :                         return -1;
   42709             :                 }
   42710             :                 {
   42711           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.parm_error));
   42712           0 :                         if (PyLong_Check(value)) {
   42713             :                                 unsigned long long test_var;
   42714           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   42715           0 :                                 if (PyErr_Occurred() != NULL) {
   42716           0 :                                         return -1;
   42717             :                                 }
   42718           0 :                                 if (test_var > uint_max) {
   42719           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   42720             :                                           PyLong_Type.tp_name, uint_max, test_var);
   42721           0 :                                         return -1;
   42722             :                                 }
   42723           0 :                                 *object->in.parm_error = test_var;
   42724             :                         } else {
   42725           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   42726             :                                   PyLong_Type.tp_name);
   42727           0 :                                 return -1;
   42728             :                         }
   42729             :                 }
   42730             :         }
   42731           0 :         return 0;
   42732             : }
   42733             : 
   42734           0 : static PyObject *py_srvsvc_NetShareSetInfo_out_get_parm_error(PyObject *obj, void *closure)
   42735             : {
   42736           0 :         struct srvsvc_NetShareSetInfo *object = (struct srvsvc_NetShareSetInfo *)pytalloc_get_ptr(obj);
   42737             :         PyObject *py_parm_error;
   42738           0 :         if (object->out.parm_error == NULL) {
   42739           0 :                 Py_RETURN_NONE;
   42740             :         }
   42741           0 :         if (object->out.parm_error == NULL) {
   42742           0 :                 py_parm_error = Py_None;
   42743           0 :                 Py_INCREF(py_parm_error);
   42744             :         } else {
   42745           0 :                 py_parm_error = PyLong_FromUnsignedLongLong((uint32_t)*object->out.parm_error);
   42746             :         }
   42747           0 :         return py_parm_error;
   42748             : }
   42749             : 
   42750           0 : static int py_srvsvc_NetShareSetInfo_out_set_parm_error(PyObject *py_obj, PyObject *value, void *closure)
   42751             : {
   42752           0 :         struct srvsvc_NetShareSetInfo *object = (struct srvsvc_NetShareSetInfo *)pytalloc_get_ptr(py_obj);
   42753           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.parm_error));
   42754           0 :         if (value == NULL) {
   42755           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.parm_error");
   42756           0 :                 return -1;
   42757             :         }
   42758           0 :         if (value == Py_None) {
   42759           0 :                 object->out.parm_error = NULL;
   42760             :         } else {
   42761           0 :                 object->out.parm_error = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.parm_error);
   42762           0 :                 if (object->out.parm_error == NULL) {
   42763           0 :                         PyErr_NoMemory();
   42764           0 :                         return -1;
   42765             :                 }
   42766             :                 {
   42767           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.parm_error));
   42768           0 :                         if (PyLong_Check(value)) {
   42769             :                                 unsigned long long test_var;
   42770           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   42771           0 :                                 if (PyErr_Occurred() != NULL) {
   42772           0 :                                         return -1;
   42773             :                                 }
   42774           0 :                                 if (test_var > uint_max) {
   42775           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   42776             :                                           PyLong_Type.tp_name, uint_max, test_var);
   42777           0 :                                         return -1;
   42778             :                                 }
   42779           0 :                                 *object->out.parm_error = test_var;
   42780             :                         } else {
   42781           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   42782             :                                   PyLong_Type.tp_name);
   42783           0 :                                 return -1;
   42784             :                         }
   42785             :                 }
   42786             :         }
   42787           0 :         return 0;
   42788             : }
   42789             : 
   42790           0 : static PyObject *py_srvsvc_NetShareSetInfo_get_result(PyObject *obj, void *closure)
   42791             : {
   42792           0 :         struct srvsvc_NetShareSetInfo *object = (struct srvsvc_NetShareSetInfo *)pytalloc_get_ptr(obj);
   42793             :         PyObject *py_result;
   42794           0 :         py_result = PyErr_FromWERROR(object->out.result);
   42795           0 :         return py_result;
   42796             : }
   42797             : 
   42798           0 : static int py_srvsvc_NetShareSetInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
   42799             : {
   42800           0 :         struct srvsvc_NetShareSetInfo *object = (struct srvsvc_NetShareSetInfo *)pytalloc_get_ptr(py_obj);
   42801           0 :         if (value == NULL) {
   42802           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   42803           0 :                 return -1;
   42804             :         }
   42805           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   42806           0 :         return 0;
   42807             : }
   42808             : 
   42809             : static PyGetSetDef py_srvsvc_NetShareSetInfo_getsetters[] = {
   42810             :         {
   42811             :                 .name = discard_const_p(char, "in_server_unc"),
   42812             :                 .get = py_srvsvc_NetShareSetInfo_in_get_server_unc,
   42813             :                 .set = py_srvsvc_NetShareSetInfo_in_set_server_unc,
   42814             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   42815             :         },
   42816             :         {
   42817             :                 .name = discard_const_p(char, "in_share_name"),
   42818             :                 .get = py_srvsvc_NetShareSetInfo_in_get_share_name,
   42819             :                 .set = py_srvsvc_NetShareSetInfo_in_set_share_name,
   42820             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   42821             :         },
   42822             :         {
   42823             :                 .name = discard_const_p(char, "in_level"),
   42824             :                 .get = py_srvsvc_NetShareSetInfo_in_get_level,
   42825             :                 .set = py_srvsvc_NetShareSetInfo_in_set_level,
   42826             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   42827             :         },
   42828             :         {
   42829             :                 .name = discard_const_p(char, "in_info"),
   42830             :                 .get = py_srvsvc_NetShareSetInfo_in_get_info,
   42831             :                 .set = py_srvsvc_NetShareSetInfo_in_set_info,
   42832             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfo")
   42833             :         },
   42834             :         {
   42835             :                 .name = discard_const_p(char, "in_parm_error"),
   42836             :                 .get = py_srvsvc_NetShareSetInfo_in_get_parm_error,
   42837             :                 .set = py_srvsvc_NetShareSetInfo_in_set_parm_error,
   42838             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   42839             :         },
   42840             :         {
   42841             :                 .name = discard_const_p(char, "out_parm_error"),
   42842             :                 .get = py_srvsvc_NetShareSetInfo_out_get_parm_error,
   42843             :                 .set = py_srvsvc_NetShareSetInfo_out_set_parm_error,
   42844             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   42845             :         },
   42846             :         {
   42847             :                 .name = discard_const_p(char, "result"),
   42848             :                 .get = py_srvsvc_NetShareSetInfo_get_result,
   42849             :                 .set = py_srvsvc_NetShareSetInfo_set_result,
   42850             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   42851             :         },
   42852             :         { .name = NULL }
   42853             : };
   42854             : 
   42855           0 : static PyObject *py_srvsvc_NetShareSetInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   42856             : {
   42857           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetShareSetInfo, type);
   42858           0 :         struct srvsvc_NetShareSetInfo *_self = (struct srvsvc_NetShareSetInfo *)pytalloc_get_ptr(self);
   42859           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   42860           0 :         _self->in.info = talloc_zero(mem_ctx, union srvsvc_NetShareInfo);
   42861           0 :         return self;
   42862             : }
   42863             : 
   42864           0 : static PyObject *py_srvsvc_NetShareSetInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   42865             : {
   42866             : 
   42867             : 
   42868           0 :         return PyLong_FromLong(17);
   42869             : }
   42870             : 
   42871           0 : static PyObject *py_srvsvc_NetShareSetInfo_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   42872             : {
   42873           0 :         const struct ndr_interface_call *call = NULL;
   42874           0 :         struct srvsvc_NetShareSetInfo *object = (struct srvsvc_NetShareSetInfo *)pytalloc_get_ptr(py_obj);
   42875           0 :         PyObject *ret = NULL;
   42876           0 :         struct ndr_push *push = NULL;
   42877             :         DATA_BLOB blob;
   42878             :         enum ndr_err_code err;
   42879             : 
   42880           0 :         if (ndr_table_srvsvc.num_calls < 18) {
   42881           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareSetInfo_ndr_pack");
   42882           0 :                 return NULL;
   42883             :         }
   42884           0 :         call = &ndr_table_srvsvc.calls[17];
   42885             : 
   42886           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   42887           0 :         if (push == NULL) {
   42888           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   42889           0 :                 return NULL;
   42890             :         }
   42891             : 
   42892           0 :         push->flags |= ndr_push_flags;
   42893             : 
   42894           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   42895           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   42896           0 :                 TALLOC_FREE(push);
   42897           0 :                 PyErr_SetNdrError(err);
   42898           0 :                 return NULL;
   42899             :         }
   42900           0 :         blob = ndr_push_blob(push);
   42901           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   42902           0 :         TALLOC_FREE(push);
   42903           0 :         return ret;
   42904             : }
   42905             : 
   42906           0 : static PyObject *py_srvsvc_NetShareSetInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42907             : {
   42908           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   42909           0 :         PyObject *bigendian_obj = NULL;
   42910           0 :         PyObject *ndr64_obj = NULL;
   42911           0 :         uint32_t ndr_push_flags = 0;
   42912             : 
   42913           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   42914             :                 discard_const_p(char *, kwnames),
   42915             :                 &bigendian_obj,
   42916             :                 &ndr64_obj)) {
   42917           0 :                 return NULL;
   42918             :         }
   42919             : 
   42920           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42921           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   42922             :         }
   42923           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42924           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   42925             :         }
   42926             : 
   42927           0 :         return py_srvsvc_NetShareSetInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   42928             : }
   42929             : 
   42930           0 : static PyObject *py_srvsvc_NetShareSetInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42931             : {
   42932           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   42933           0 :         PyObject *bigendian_obj = NULL;
   42934           0 :         PyObject *ndr64_obj = NULL;
   42935           0 :         uint32_t ndr_push_flags = 0;
   42936             : 
   42937           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   42938             :                 discard_const_p(char *, kwnames),
   42939             :                 &bigendian_obj,
   42940             :                 &ndr64_obj)) {
   42941           0 :                 return NULL;
   42942             :         }
   42943             : 
   42944           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42945           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   42946             :         }
   42947           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42948           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   42949             :         }
   42950             : 
   42951           0 :         return py_srvsvc_NetShareSetInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   42952             : }
   42953             : 
   42954           0 : static PyObject *py_srvsvc_NetShareSetInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   42955             : {
   42956           0 :         const struct ndr_interface_call *call = NULL;
   42957           0 :         struct srvsvc_NetShareSetInfo *object = (struct srvsvc_NetShareSetInfo *)pytalloc_get_ptr(py_obj);
   42958           0 :         struct ndr_pull *pull = NULL;
   42959             :         enum ndr_err_code err;
   42960             : 
   42961           0 :         if (ndr_table_srvsvc.num_calls < 18) {
   42962           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareSetInfo_ndr_unpack");
   42963           0 :                 return NULL;
   42964             :         }
   42965           0 :         call = &ndr_table_srvsvc.calls[17];
   42966             : 
   42967           0 :         pull = ndr_pull_init_blob(blob, object);
   42968           0 :         if (pull == NULL) {
   42969           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   42970           0 :                 return NULL;
   42971             :         }
   42972             : 
   42973           0 :         pull->flags |= ndr_pull_flags;
   42974             : 
   42975           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   42976           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   42977           0 :                 TALLOC_FREE(pull);
   42978           0 :                 PyErr_SetNdrError(err);
   42979           0 :                 return NULL;
   42980             :         }
   42981           0 :         if (!allow_remaining) {
   42982             :                 uint32_t highest_ofs;
   42983             : 
   42984           0 :                 if (pull->offset > pull->relative_highest_offset) {
   42985           0 :                         highest_ofs = pull->offset;
   42986             :                 } else {
   42987           0 :                         highest_ofs = pull->relative_highest_offset;
   42988             :                 }
   42989           0 :                 if (highest_ofs < pull->data_size) {
   42990           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   42991             :                                 "not all bytes consumed ofs[%u] size[%u]",
   42992             :                                 highest_ofs, pull->data_size);
   42993           0 :                         TALLOC_FREE(pull);
   42994           0 :                         PyErr_SetNdrError(err);
   42995           0 :                         return NULL;
   42996             :                 }
   42997             :         }
   42998             : 
   42999           0 :         TALLOC_FREE(pull);
   43000           0 :         Py_RETURN_NONE;
   43001             : }
   43002             : 
   43003           0 : static PyObject *py_srvsvc_NetShareSetInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43004             : {
   43005             :         DATA_BLOB blob;
   43006           0 :         Py_ssize_t blob_length = 0;
   43007           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   43008           0 :         PyObject *bigendian_obj = NULL;
   43009           0 :         PyObject *ndr64_obj = NULL;
   43010           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   43011           0 :         PyObject *allow_remaining_obj = NULL;
   43012           0 :         bool allow_remaining = false;
   43013             : 
   43014           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   43015             :                 discard_const_p(char *, kwnames),
   43016             :                 &blob.data, &blob_length,
   43017             :                 &bigendian_obj,
   43018             :                 &ndr64_obj,
   43019             :                 &allow_remaining_obj)) {
   43020           0 :                 return NULL;
   43021             :         }
   43022           0 :         blob.length = blob_length;
   43023             : 
   43024           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43025           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   43026             :         }
   43027           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43028           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   43029             :         }
   43030             : 
   43031           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   43032           0 :                 allow_remaining = true;
   43033             :         }
   43034             : 
   43035           0 :         return py_srvsvc_NetShareSetInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   43036             : }
   43037             : 
   43038           0 : static PyObject *py_srvsvc_NetShareSetInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43039             : {
   43040             :         DATA_BLOB blob;
   43041           0 :         Py_ssize_t blob_length = 0;
   43042           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   43043           0 :         PyObject *bigendian_obj = NULL;
   43044           0 :         PyObject *ndr64_obj = NULL;
   43045           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   43046           0 :         PyObject *allow_remaining_obj = NULL;
   43047           0 :         bool allow_remaining = false;
   43048             : 
   43049           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   43050             :                 discard_const_p(char *, kwnames),
   43051             :                 &blob.data, &blob_length,
   43052             :                 &bigendian_obj,
   43053             :                 &ndr64_obj,
   43054             :                 &allow_remaining_obj)) {
   43055           0 :                 return NULL;
   43056             :         }
   43057           0 :         blob.length = blob_length;
   43058             : 
   43059           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43060           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   43061             :         }
   43062           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43063           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   43064             :         }
   43065             : 
   43066           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   43067           0 :                 allow_remaining = true;
   43068             :         }
   43069             : 
   43070           0 :         return py_srvsvc_NetShareSetInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   43071             : }
   43072             : 
   43073           0 : static PyObject *py_srvsvc_NetShareSetInfo_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   43074             : {
   43075           0 :         const struct ndr_interface_call *call = NULL;
   43076           0 :         struct srvsvc_NetShareSetInfo *object = (struct srvsvc_NetShareSetInfo *)pytalloc_get_ptr(py_obj);
   43077             :         PyObject *ret;
   43078             :         char *retstr;
   43079             : 
   43080           0 :         if (ndr_table_srvsvc.num_calls < 18) {
   43081           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareSetInfo_ndr_print");
   43082           0 :                 return NULL;
   43083             :         }
   43084           0 :         call = &ndr_table_srvsvc.calls[17];
   43085             : 
   43086           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   43087           0 :         ret = PyUnicode_FromString(retstr);
   43088           0 :         TALLOC_FREE(retstr);
   43089             : 
   43090           0 :         return ret;
   43091             : }
   43092             : 
   43093           0 : static PyObject *py_srvsvc_NetShareSetInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   43094             : {
   43095           0 :         return py_srvsvc_NetShareSetInfo_ndr_print(py_obj, "srvsvc_NetShareSetInfo_in", NDR_IN);
   43096             : }
   43097             : 
   43098           0 : static PyObject *py_srvsvc_NetShareSetInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   43099             : {
   43100           0 :         return py_srvsvc_NetShareSetInfo_ndr_print(py_obj, "srvsvc_NetShareSetInfo_out", NDR_OUT);
   43101             : }
   43102             : 
   43103             : static PyMethodDef py_srvsvc_NetShareSetInfo_methods[] = {
   43104             :         { "opnum", (PyCFunction)py_srvsvc_NetShareSetInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
   43105             :                 "srvsvc.NetShareSetInfo.opnum() -> 17 (0x11) " },
   43106             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareSetInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   43107             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   43108             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareSetInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   43109             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   43110             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareSetInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   43111             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   43112             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareSetInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   43113             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   43114             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetShareSetInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   43115             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetShareSetInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   43116             :         { NULL, NULL, 0, NULL }
   43117             : };
   43118             : 
   43119             : 
   43120             : static PyTypeObject srvsvc_NetShareSetInfo_Type = {
   43121             :         PyVarObject_HEAD_INIT(NULL, 0)
   43122             :         .tp_name = "srvsvc.NetShareSetInfo",
   43123             :         .tp_getset = py_srvsvc_NetShareSetInfo_getsetters,
   43124             :         .tp_methods = py_srvsvc_NetShareSetInfo_methods,
   43125             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   43126             :         .tp_new = py_srvsvc_NetShareSetInfo_new,
   43127             : };
   43128             : 
   43129           0 : static bool pack_py_srvsvc_NetShareSetInfo_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareSetInfo *r)
   43130             : {
   43131             :         PyObject *py_server_unc;
   43132             :         PyObject *py_share_name;
   43133             :         PyObject *py_level;
   43134             :         PyObject *py_info;
   43135             :         PyObject *py_parm_error;
   43136           0 :         const char *kwnames[] = {
   43137             :                 "server_unc", "share_name", "level", "info", "parm_error", NULL
   43138             :         };
   43139             : 
   43140           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:srvsvc_NetShareSetInfo", discard_const_p(char *, kwnames), &py_server_unc, &py_share_name, &py_level, &py_info, &py_parm_error)) {
   43141           0 :                 return false;
   43142             :         }
   43143             : 
   43144           0 :         if (py_server_unc == NULL) {
   43145           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   43146           0 :                 return false;
   43147             :         }
   43148           0 :         if (py_server_unc == Py_None) {
   43149           0 :                 r->in.server_unc = NULL;
   43150             :         } else {
   43151           0 :                 r->in.server_unc = NULL;
   43152             :                 {
   43153             :                         const char *test_str;
   43154             :                         const char *talloc_str;
   43155           0 :                         PyObject *unicode = NULL;
   43156           0 :                         if (PyUnicode_Check(py_server_unc)) {
   43157           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   43158           0 :                                 if (unicode == NULL) {
   43159           0 :                                         PyErr_NoMemory();
   43160           0 :                                         return false;
   43161             :                                 }
   43162           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   43163           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   43164           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   43165             :                         } else {
   43166           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   43167           0 :                                 return false;
   43168             :                         }
   43169           0 :                         talloc_str = talloc_strdup(r, test_str);
   43170           0 :                         if (unicode != NULL) {
   43171           0 :                                 Py_DECREF(unicode);
   43172             :                         }
   43173           0 :                         if (talloc_str == NULL) {
   43174           0 :                                 PyErr_NoMemory();
   43175           0 :                                 return false;
   43176             :                         }
   43177           0 :                         r->in.server_unc = talloc_str;
   43178             :                 }
   43179             :         }
   43180           0 :         if (py_share_name == NULL) {
   43181           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.share_name");
   43182           0 :                 return false;
   43183             :         }
   43184             :         {
   43185             :                 const char *test_str;
   43186             :                 const char *talloc_str;
   43187           0 :                 PyObject *unicode = NULL;
   43188           0 :                 if (PyUnicode_Check(py_share_name)) {
   43189           0 :                         unicode = PyUnicode_AsEncodedString(py_share_name, "utf-8", "ignore");
   43190           0 :                         if (unicode == NULL) {
   43191           0 :                                 PyErr_NoMemory();
   43192           0 :                                 return false;
   43193             :                         }
   43194           0 :                         test_str = PyBytes_AS_STRING(unicode);
   43195           0 :                 } else if (PyBytes_Check(py_share_name)) {
   43196           0 :                         test_str = PyBytes_AS_STRING(py_share_name);
   43197             :                 } else {
   43198           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share_name)->tp_name);
   43199           0 :                         return false;
   43200             :                 }
   43201           0 :                 talloc_str = talloc_strdup(r, test_str);
   43202           0 :                 if (unicode != NULL) {
   43203           0 :                         Py_DECREF(unicode);
   43204             :                 }
   43205           0 :                 if (talloc_str == NULL) {
   43206           0 :                         PyErr_NoMemory();
   43207           0 :                         return false;
   43208             :                 }
   43209           0 :                 r->in.share_name = talloc_str;
   43210             :         }
   43211           0 :         if (py_level == NULL) {
   43212           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   43213           0 :                 return false;
   43214             :         }
   43215             :         {
   43216           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   43217           0 :                 if (PyLong_Check(py_level)) {
   43218             :                         unsigned long long test_var;
   43219           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   43220           0 :                         if (PyErr_Occurred() != NULL) {
   43221           0 :                                 return false;
   43222             :                         }
   43223           0 :                         if (test_var > uint_max) {
   43224           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   43225             :                                   PyLong_Type.tp_name, uint_max, test_var);
   43226           0 :                                 return false;
   43227             :                         }
   43228           0 :                         r->in.level = test_var;
   43229             :                 } else {
   43230           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   43231             :                           PyLong_Type.tp_name);
   43232           0 :                         return false;
   43233             :                 }
   43234             :         }
   43235           0 :         if (py_info == NULL) {
   43236           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info");
   43237           0 :                 return false;
   43238             :         }
   43239           0 :         r->in.info = talloc_ptrtype(r, r->in.info);
   43240           0 :         if (r->in.info == NULL) {
   43241           0 :                 PyErr_NoMemory();
   43242           0 :                 return false;
   43243             :         }
   43244             :         {
   43245             :                 union srvsvc_NetShareInfo *info_switch_1;
   43246           0 :                 info_switch_1 = (union srvsvc_NetShareInfo *)pyrpc_export_union(&srvsvc_NetShareInfo_Type, r, r->in.level, py_info, "union srvsvc_NetShareInfo");
   43247           0 :                 if (info_switch_1 == NULL) {
   43248           0 :                         return false;
   43249             :                 }
   43250           0 :                 r->in.info = info_switch_1;
   43251             :         }
   43252           0 :         if (py_parm_error == NULL) {
   43253           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.parm_error");
   43254           0 :                 return false;
   43255             :         }
   43256           0 :         if (py_parm_error == Py_None) {
   43257           0 :                 r->in.parm_error = NULL;
   43258             :         } else {
   43259           0 :                 r->in.parm_error = talloc_ptrtype(r, r->in.parm_error);
   43260           0 :                 if (r->in.parm_error == NULL) {
   43261           0 :                         PyErr_NoMemory();
   43262           0 :                         return false;
   43263             :                 }
   43264             :                 {
   43265           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.parm_error));
   43266           0 :                         if (PyLong_Check(py_parm_error)) {
   43267             :                                 unsigned long long test_var;
   43268           0 :                                 test_var = PyLong_AsUnsignedLongLong(py_parm_error);
   43269           0 :                                 if (PyErr_Occurred() != NULL) {
   43270           0 :                                         return false;
   43271             :                                 }
   43272           0 :                                 if (test_var > uint_max) {
   43273           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   43274             :                                           PyLong_Type.tp_name, uint_max, test_var);
   43275           0 :                                         return false;
   43276             :                                 }
   43277           0 :                                 *r->in.parm_error = test_var;
   43278             :                         } else {
   43279           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   43280             :                                   PyLong_Type.tp_name);
   43281           0 :                                 return false;
   43282             :                         }
   43283             :                 }
   43284             :         }
   43285           0 :         return true;
   43286             : }
   43287             : 
   43288           0 : static PyObject *unpack_py_srvsvc_NetShareSetInfo_args_out(struct srvsvc_NetShareSetInfo *r)
   43289             : {
   43290             :         PyObject *result;
   43291             :         PyObject *py_parm_error;
   43292           0 :         if (r->out.parm_error == NULL) {
   43293           0 :                 py_parm_error = Py_None;
   43294           0 :                 Py_INCREF(py_parm_error);
   43295             :         } else {
   43296           0 :                 py_parm_error = PyLong_FromUnsignedLongLong((uint32_t)*r->out.parm_error);
   43297             :         }
   43298           0 :         result = py_parm_error;
   43299           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   43300           0 :                 PyErr_SetWERROR(r->out.result);
   43301           0 :                 return NULL;
   43302             :         }
   43303             : 
   43304           0 :         return result;
   43305             : }
   43306             : 
   43307             : 
   43308           0 : static PyObject *py_srvsvc_NetShareDel_in_get_server_unc(PyObject *obj, void *closure)
   43309             : {
   43310           0 :         struct srvsvc_NetShareDel *object = (struct srvsvc_NetShareDel *)pytalloc_get_ptr(obj);
   43311             :         PyObject *py_server_unc;
   43312           0 :         if (object->in.server_unc == NULL) {
   43313           0 :                 Py_RETURN_NONE;
   43314             :         }
   43315           0 :         if (object->in.server_unc == NULL) {
   43316           0 :                 py_server_unc = Py_None;
   43317           0 :                 Py_INCREF(py_server_unc);
   43318             :         } else {
   43319           0 :                 if (object->in.server_unc == NULL) {
   43320           0 :                         py_server_unc = Py_None;
   43321           0 :                         Py_INCREF(py_server_unc);
   43322             :                 } else {
   43323           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   43324             :                 }
   43325             :         }
   43326           0 :         return py_server_unc;
   43327             : }
   43328             : 
   43329           0 : static int py_srvsvc_NetShareDel_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   43330             : {
   43331           0 :         struct srvsvc_NetShareDel *object = (struct srvsvc_NetShareDel *)pytalloc_get_ptr(py_obj);
   43332           0 :         if (value == NULL) {
   43333           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   43334           0 :                 return -1;
   43335             :         }
   43336           0 :         if (value == Py_None) {
   43337           0 :                 object->in.server_unc = NULL;
   43338             :         } else {
   43339           0 :                 object->in.server_unc = NULL;
   43340             :                 {
   43341             :                         const char *test_str;
   43342             :                         const char *talloc_str;
   43343           0 :                         PyObject *unicode = NULL;
   43344           0 :                         if (PyUnicode_Check(value)) {
   43345           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   43346           0 :                                 if (unicode == NULL) {
   43347           0 :                                         PyErr_NoMemory();
   43348           0 :                                         return -1;
   43349             :                                 }
   43350           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   43351           0 :                         } else if (PyBytes_Check(value)) {
   43352           0 :                                 test_str = PyBytes_AS_STRING(value);
   43353             :                         } else {
   43354           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   43355           0 :                                 return -1;
   43356             :                         }
   43357           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   43358           0 :                         if (unicode != NULL) {
   43359           0 :                                 Py_DECREF(unicode);
   43360             :                         }
   43361           0 :                         if (talloc_str == NULL) {
   43362           0 :                                 PyErr_NoMemory();
   43363           0 :                                 return -1;
   43364             :                         }
   43365           0 :                         object->in.server_unc = talloc_str;
   43366             :                 }
   43367             :         }
   43368           0 :         return 0;
   43369             : }
   43370             : 
   43371           0 : static PyObject *py_srvsvc_NetShareDel_in_get_share_name(PyObject *obj, void *closure)
   43372             : {
   43373           0 :         struct srvsvc_NetShareDel *object = (struct srvsvc_NetShareDel *)pytalloc_get_ptr(obj);
   43374             :         PyObject *py_share_name;
   43375           0 :         if (object->in.share_name == NULL) {
   43376           0 :                 py_share_name = Py_None;
   43377           0 :                 Py_INCREF(py_share_name);
   43378             :         } else {
   43379           0 :                 py_share_name = PyUnicode_Decode(object->in.share_name, strlen(object->in.share_name), "utf-8", "ignore");
   43380             :         }
   43381           0 :         return py_share_name;
   43382             : }
   43383             : 
   43384           0 : static int py_srvsvc_NetShareDel_in_set_share_name(PyObject *py_obj, PyObject *value, void *closure)
   43385             : {
   43386           0 :         struct srvsvc_NetShareDel *object = (struct srvsvc_NetShareDel *)pytalloc_get_ptr(py_obj);
   43387           0 :         if (value == NULL) {
   43388           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.share_name");
   43389           0 :                 return -1;
   43390             :         }
   43391             :         {
   43392             :                 const char *test_str;
   43393             :                 const char *talloc_str;
   43394           0 :                 PyObject *unicode = NULL;
   43395           0 :                 if (PyUnicode_Check(value)) {
   43396           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   43397           0 :                         if (unicode == NULL) {
   43398           0 :                                 PyErr_NoMemory();
   43399           0 :                                 return -1;
   43400             :                         }
   43401           0 :                         test_str = PyBytes_AS_STRING(unicode);
   43402           0 :                 } else if (PyBytes_Check(value)) {
   43403           0 :                         test_str = PyBytes_AS_STRING(value);
   43404             :                 } else {
   43405           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   43406           0 :                         return -1;
   43407             :                 }
   43408           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   43409           0 :                 if (unicode != NULL) {
   43410           0 :                         Py_DECREF(unicode);
   43411             :                 }
   43412           0 :                 if (talloc_str == NULL) {
   43413           0 :                         PyErr_NoMemory();
   43414           0 :                         return -1;
   43415             :                 }
   43416           0 :                 object->in.share_name = talloc_str;
   43417             :         }
   43418           0 :         return 0;
   43419             : }
   43420             : 
   43421           0 : static PyObject *py_srvsvc_NetShareDel_in_get_reserved(PyObject *obj, void *closure)
   43422             : {
   43423           0 :         struct srvsvc_NetShareDel *object = (struct srvsvc_NetShareDel *)pytalloc_get_ptr(obj);
   43424             :         PyObject *py_reserved;
   43425           0 :         py_reserved = PyLong_FromUnsignedLongLong((uint32_t)object->in.reserved);
   43426           0 :         return py_reserved;
   43427             : }
   43428             : 
   43429           0 : static int py_srvsvc_NetShareDel_in_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
   43430             : {
   43431           0 :         struct srvsvc_NetShareDel *object = (struct srvsvc_NetShareDel *)pytalloc_get_ptr(py_obj);
   43432           0 :         if (value == NULL) {
   43433           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.reserved");
   43434           0 :                 return -1;
   43435             :         }
   43436             :         {
   43437           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.reserved));
   43438           0 :                 if (PyLong_Check(value)) {
   43439             :                         unsigned long long test_var;
   43440           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   43441           0 :                         if (PyErr_Occurred() != NULL) {
   43442           0 :                                 return -1;
   43443             :                         }
   43444           0 :                         if (test_var > uint_max) {
   43445           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   43446             :                                   PyLong_Type.tp_name, uint_max, test_var);
   43447           0 :                                 return -1;
   43448             :                         }
   43449           0 :                         object->in.reserved = test_var;
   43450             :                 } else {
   43451           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   43452             :                           PyLong_Type.tp_name);
   43453           0 :                         return -1;
   43454             :                 }
   43455             :         }
   43456           0 :         return 0;
   43457             : }
   43458             : 
   43459           0 : static PyObject *py_srvsvc_NetShareDel_get_result(PyObject *obj, void *closure)
   43460             : {
   43461           0 :         struct srvsvc_NetShareDel *object = (struct srvsvc_NetShareDel *)pytalloc_get_ptr(obj);
   43462             :         PyObject *py_result;
   43463           0 :         py_result = PyErr_FromWERROR(object->out.result);
   43464           0 :         return py_result;
   43465             : }
   43466             : 
   43467           0 : static int py_srvsvc_NetShareDel_set_result(PyObject *py_obj, PyObject *value, void *closure)
   43468             : {
   43469           0 :         struct srvsvc_NetShareDel *object = (struct srvsvc_NetShareDel *)pytalloc_get_ptr(py_obj);
   43470           0 :         if (value == NULL) {
   43471           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   43472           0 :                 return -1;
   43473             :         }
   43474           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   43475           0 :         return 0;
   43476             : }
   43477             : 
   43478             : static PyGetSetDef py_srvsvc_NetShareDel_getsetters[] = {
   43479             :         {
   43480             :                 .name = discard_const_p(char, "in_server_unc"),
   43481             :                 .get = py_srvsvc_NetShareDel_in_get_server_unc,
   43482             :                 .set = py_srvsvc_NetShareDel_in_set_server_unc,
   43483             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   43484             :         },
   43485             :         {
   43486             :                 .name = discard_const_p(char, "in_share_name"),
   43487             :                 .get = py_srvsvc_NetShareDel_in_get_share_name,
   43488             :                 .set = py_srvsvc_NetShareDel_in_set_share_name,
   43489             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   43490             :         },
   43491             :         {
   43492             :                 .name = discard_const_p(char, "in_reserved"),
   43493             :                 .get = py_srvsvc_NetShareDel_in_get_reserved,
   43494             :                 .set = py_srvsvc_NetShareDel_in_set_reserved,
   43495             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   43496             :         },
   43497             :         {
   43498             :                 .name = discard_const_p(char, "result"),
   43499             :                 .get = py_srvsvc_NetShareDel_get_result,
   43500             :                 .set = py_srvsvc_NetShareDel_set_result,
   43501             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   43502             :         },
   43503             :         { .name = NULL }
   43504             : };
   43505             : 
   43506           0 : static PyObject *py_srvsvc_NetShareDel_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   43507             : {
   43508           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetShareDel, type);
   43509           0 :         return self;
   43510             : }
   43511             : 
   43512           0 : static PyObject *py_srvsvc_NetShareDel_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   43513             : {
   43514             : 
   43515             : 
   43516           0 :         return PyLong_FromLong(18);
   43517             : }
   43518             : 
   43519           0 : static PyObject *py_srvsvc_NetShareDel_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   43520             : {
   43521           0 :         const struct ndr_interface_call *call = NULL;
   43522           0 :         struct srvsvc_NetShareDel *object = (struct srvsvc_NetShareDel *)pytalloc_get_ptr(py_obj);
   43523           0 :         PyObject *ret = NULL;
   43524           0 :         struct ndr_push *push = NULL;
   43525             :         DATA_BLOB blob;
   43526             :         enum ndr_err_code err;
   43527             : 
   43528           0 :         if (ndr_table_srvsvc.num_calls < 19) {
   43529           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareDel_ndr_pack");
   43530           0 :                 return NULL;
   43531             :         }
   43532           0 :         call = &ndr_table_srvsvc.calls[18];
   43533             : 
   43534           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   43535           0 :         if (push == NULL) {
   43536           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   43537           0 :                 return NULL;
   43538             :         }
   43539             : 
   43540           0 :         push->flags |= ndr_push_flags;
   43541             : 
   43542           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   43543           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   43544           0 :                 TALLOC_FREE(push);
   43545           0 :                 PyErr_SetNdrError(err);
   43546           0 :                 return NULL;
   43547             :         }
   43548           0 :         blob = ndr_push_blob(push);
   43549           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   43550           0 :         TALLOC_FREE(push);
   43551           0 :         return ret;
   43552             : }
   43553             : 
   43554           0 : static PyObject *py_srvsvc_NetShareDel_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43555             : {
   43556           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   43557           0 :         PyObject *bigendian_obj = NULL;
   43558           0 :         PyObject *ndr64_obj = NULL;
   43559           0 :         uint32_t ndr_push_flags = 0;
   43560             : 
   43561           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   43562             :                 discard_const_p(char *, kwnames),
   43563             :                 &bigendian_obj,
   43564             :                 &ndr64_obj)) {
   43565           0 :                 return NULL;
   43566             :         }
   43567             : 
   43568           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43569           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   43570             :         }
   43571           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43572           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   43573             :         }
   43574             : 
   43575           0 :         return py_srvsvc_NetShareDel_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   43576             : }
   43577             : 
   43578           0 : static PyObject *py_srvsvc_NetShareDel_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43579             : {
   43580           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   43581           0 :         PyObject *bigendian_obj = NULL;
   43582           0 :         PyObject *ndr64_obj = NULL;
   43583           0 :         uint32_t ndr_push_flags = 0;
   43584             : 
   43585           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   43586             :                 discard_const_p(char *, kwnames),
   43587             :                 &bigendian_obj,
   43588             :                 &ndr64_obj)) {
   43589           0 :                 return NULL;
   43590             :         }
   43591             : 
   43592           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43593           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   43594             :         }
   43595           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43596           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   43597             :         }
   43598             : 
   43599           0 :         return py_srvsvc_NetShareDel_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   43600             : }
   43601             : 
   43602           0 : static PyObject *py_srvsvc_NetShareDel_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   43603             : {
   43604           0 :         const struct ndr_interface_call *call = NULL;
   43605           0 :         struct srvsvc_NetShareDel *object = (struct srvsvc_NetShareDel *)pytalloc_get_ptr(py_obj);
   43606           0 :         struct ndr_pull *pull = NULL;
   43607             :         enum ndr_err_code err;
   43608             : 
   43609           0 :         if (ndr_table_srvsvc.num_calls < 19) {
   43610           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareDel_ndr_unpack");
   43611           0 :                 return NULL;
   43612             :         }
   43613           0 :         call = &ndr_table_srvsvc.calls[18];
   43614             : 
   43615           0 :         pull = ndr_pull_init_blob(blob, object);
   43616           0 :         if (pull == NULL) {
   43617           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   43618           0 :                 return NULL;
   43619             :         }
   43620             : 
   43621           0 :         pull->flags |= ndr_pull_flags;
   43622             : 
   43623           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   43624           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   43625           0 :                 TALLOC_FREE(pull);
   43626           0 :                 PyErr_SetNdrError(err);
   43627           0 :                 return NULL;
   43628             :         }
   43629           0 :         if (!allow_remaining) {
   43630             :                 uint32_t highest_ofs;
   43631             : 
   43632           0 :                 if (pull->offset > pull->relative_highest_offset) {
   43633           0 :                         highest_ofs = pull->offset;
   43634             :                 } else {
   43635           0 :                         highest_ofs = pull->relative_highest_offset;
   43636             :                 }
   43637           0 :                 if (highest_ofs < pull->data_size) {
   43638           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   43639             :                                 "not all bytes consumed ofs[%u] size[%u]",
   43640             :                                 highest_ofs, pull->data_size);
   43641           0 :                         TALLOC_FREE(pull);
   43642           0 :                         PyErr_SetNdrError(err);
   43643           0 :                         return NULL;
   43644             :                 }
   43645             :         }
   43646             : 
   43647           0 :         TALLOC_FREE(pull);
   43648           0 :         Py_RETURN_NONE;
   43649             : }
   43650             : 
   43651           0 : static PyObject *py_srvsvc_NetShareDel_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43652             : {
   43653             :         DATA_BLOB blob;
   43654           0 :         Py_ssize_t blob_length = 0;
   43655           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   43656           0 :         PyObject *bigendian_obj = NULL;
   43657           0 :         PyObject *ndr64_obj = NULL;
   43658           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   43659           0 :         PyObject *allow_remaining_obj = NULL;
   43660           0 :         bool allow_remaining = false;
   43661             : 
   43662           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   43663             :                 discard_const_p(char *, kwnames),
   43664             :                 &blob.data, &blob_length,
   43665             :                 &bigendian_obj,
   43666             :                 &ndr64_obj,
   43667             :                 &allow_remaining_obj)) {
   43668           0 :                 return NULL;
   43669             :         }
   43670           0 :         blob.length = blob_length;
   43671             : 
   43672           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43673           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   43674             :         }
   43675           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43676           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   43677             :         }
   43678             : 
   43679           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   43680           0 :                 allow_remaining = true;
   43681             :         }
   43682             : 
   43683           0 :         return py_srvsvc_NetShareDel_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   43684             : }
   43685             : 
   43686           0 : static PyObject *py_srvsvc_NetShareDel_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43687             : {
   43688             :         DATA_BLOB blob;
   43689           0 :         Py_ssize_t blob_length = 0;
   43690           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   43691           0 :         PyObject *bigendian_obj = NULL;
   43692           0 :         PyObject *ndr64_obj = NULL;
   43693           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   43694           0 :         PyObject *allow_remaining_obj = NULL;
   43695           0 :         bool allow_remaining = false;
   43696             : 
   43697           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   43698             :                 discard_const_p(char *, kwnames),
   43699             :                 &blob.data, &blob_length,
   43700             :                 &bigendian_obj,
   43701             :                 &ndr64_obj,
   43702             :                 &allow_remaining_obj)) {
   43703           0 :                 return NULL;
   43704             :         }
   43705           0 :         blob.length = blob_length;
   43706             : 
   43707           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43708           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   43709             :         }
   43710           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43711           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   43712             :         }
   43713             : 
   43714           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   43715           0 :                 allow_remaining = true;
   43716             :         }
   43717             : 
   43718           0 :         return py_srvsvc_NetShareDel_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   43719             : }
   43720             : 
   43721           0 : static PyObject *py_srvsvc_NetShareDel_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   43722             : {
   43723           0 :         const struct ndr_interface_call *call = NULL;
   43724           0 :         struct srvsvc_NetShareDel *object = (struct srvsvc_NetShareDel *)pytalloc_get_ptr(py_obj);
   43725             :         PyObject *ret;
   43726             :         char *retstr;
   43727             : 
   43728           0 :         if (ndr_table_srvsvc.num_calls < 19) {
   43729           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareDel_ndr_print");
   43730           0 :                 return NULL;
   43731             :         }
   43732           0 :         call = &ndr_table_srvsvc.calls[18];
   43733             : 
   43734           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   43735           0 :         ret = PyUnicode_FromString(retstr);
   43736           0 :         TALLOC_FREE(retstr);
   43737             : 
   43738           0 :         return ret;
   43739             : }
   43740             : 
   43741           0 : static PyObject *py_srvsvc_NetShareDel_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   43742             : {
   43743           0 :         return py_srvsvc_NetShareDel_ndr_print(py_obj, "srvsvc_NetShareDel_in", NDR_IN);
   43744             : }
   43745             : 
   43746           0 : static PyObject *py_srvsvc_NetShareDel_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   43747             : {
   43748           0 :         return py_srvsvc_NetShareDel_ndr_print(py_obj, "srvsvc_NetShareDel_out", NDR_OUT);
   43749             : }
   43750             : 
   43751             : static PyMethodDef py_srvsvc_NetShareDel_methods[] = {
   43752             :         { "opnum", (PyCFunction)py_srvsvc_NetShareDel_ndr_opnum, METH_NOARGS|METH_CLASS,
   43753             :                 "srvsvc.NetShareDel.opnum() -> 18 (0x12) " },
   43754             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDel_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   43755             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   43756             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDel_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   43757             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   43758             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDel_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   43759             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   43760             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDel_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   43761             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   43762             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetShareDel_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   43763             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetShareDel_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   43764             :         { NULL, NULL, 0, NULL }
   43765             : };
   43766             : 
   43767             : 
   43768             : static PyTypeObject srvsvc_NetShareDel_Type = {
   43769             :         PyVarObject_HEAD_INIT(NULL, 0)
   43770             :         .tp_name = "srvsvc.NetShareDel",
   43771             :         .tp_getset = py_srvsvc_NetShareDel_getsetters,
   43772             :         .tp_methods = py_srvsvc_NetShareDel_methods,
   43773             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   43774             :         .tp_new = py_srvsvc_NetShareDel_new,
   43775             : };
   43776             : 
   43777           0 : static bool pack_py_srvsvc_NetShareDel_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareDel *r)
   43778             : {
   43779             :         PyObject *py_server_unc;
   43780             :         PyObject *py_share_name;
   43781             :         PyObject *py_reserved;
   43782           0 :         const char *kwnames[] = {
   43783             :                 "server_unc", "share_name", "reserved", NULL
   43784             :         };
   43785             : 
   43786           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetShareDel", discard_const_p(char *, kwnames), &py_server_unc, &py_share_name, &py_reserved)) {
   43787           0 :                 return false;
   43788             :         }
   43789             : 
   43790           0 :         if (py_server_unc == NULL) {
   43791           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   43792           0 :                 return false;
   43793             :         }
   43794           0 :         if (py_server_unc == Py_None) {
   43795           0 :                 r->in.server_unc = NULL;
   43796             :         } else {
   43797           0 :                 r->in.server_unc = NULL;
   43798             :                 {
   43799             :                         const char *test_str;
   43800             :                         const char *talloc_str;
   43801           0 :                         PyObject *unicode = NULL;
   43802           0 :                         if (PyUnicode_Check(py_server_unc)) {
   43803           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   43804           0 :                                 if (unicode == NULL) {
   43805           0 :                                         PyErr_NoMemory();
   43806           0 :                                         return false;
   43807             :                                 }
   43808           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   43809           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   43810           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   43811             :                         } else {
   43812           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   43813           0 :                                 return false;
   43814             :                         }
   43815           0 :                         talloc_str = talloc_strdup(r, test_str);
   43816           0 :                         if (unicode != NULL) {
   43817           0 :                                 Py_DECREF(unicode);
   43818             :                         }
   43819           0 :                         if (talloc_str == NULL) {
   43820           0 :                                 PyErr_NoMemory();
   43821           0 :                                 return false;
   43822             :                         }
   43823           0 :                         r->in.server_unc = talloc_str;
   43824             :                 }
   43825             :         }
   43826           0 :         if (py_share_name == NULL) {
   43827           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.share_name");
   43828           0 :                 return false;
   43829             :         }
   43830             :         {
   43831             :                 const char *test_str;
   43832             :                 const char *talloc_str;
   43833           0 :                 PyObject *unicode = NULL;
   43834           0 :                 if (PyUnicode_Check(py_share_name)) {
   43835           0 :                         unicode = PyUnicode_AsEncodedString(py_share_name, "utf-8", "ignore");
   43836           0 :                         if (unicode == NULL) {
   43837           0 :                                 PyErr_NoMemory();
   43838           0 :                                 return false;
   43839             :                         }
   43840           0 :                         test_str = PyBytes_AS_STRING(unicode);
   43841           0 :                 } else if (PyBytes_Check(py_share_name)) {
   43842           0 :                         test_str = PyBytes_AS_STRING(py_share_name);
   43843             :                 } else {
   43844           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share_name)->tp_name);
   43845           0 :                         return false;
   43846             :                 }
   43847           0 :                 talloc_str = talloc_strdup(r, test_str);
   43848           0 :                 if (unicode != NULL) {
   43849           0 :                         Py_DECREF(unicode);
   43850             :                 }
   43851           0 :                 if (talloc_str == NULL) {
   43852           0 :                         PyErr_NoMemory();
   43853           0 :                         return false;
   43854             :                 }
   43855           0 :                 r->in.share_name = talloc_str;
   43856             :         }
   43857           0 :         if (py_reserved == NULL) {
   43858           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.reserved");
   43859           0 :                 return false;
   43860             :         }
   43861             :         {
   43862           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.reserved));
   43863           0 :                 if (PyLong_Check(py_reserved)) {
   43864             :                         unsigned long long test_var;
   43865           0 :                         test_var = PyLong_AsUnsignedLongLong(py_reserved);
   43866           0 :                         if (PyErr_Occurred() != NULL) {
   43867           0 :                                 return false;
   43868             :                         }
   43869           0 :                         if (test_var > uint_max) {
   43870           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   43871             :                                   PyLong_Type.tp_name, uint_max, test_var);
   43872           0 :                                 return false;
   43873             :                         }
   43874           0 :                         r->in.reserved = test_var;
   43875             :                 } else {
   43876           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   43877             :                           PyLong_Type.tp_name);
   43878           0 :                         return false;
   43879             :                 }
   43880             :         }
   43881           0 :         return true;
   43882             : }
   43883             : 
   43884           0 : static PyObject *unpack_py_srvsvc_NetShareDel_args_out(struct srvsvc_NetShareDel *r)
   43885             : {
   43886             :         PyObject *result;
   43887           0 :         result = Py_None;
   43888           0 :         Py_INCREF(result);
   43889           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   43890           0 :                 PyErr_SetWERROR(r->out.result);
   43891           0 :                 return NULL;
   43892             :         }
   43893             : 
   43894           0 :         return result;
   43895             : }
   43896             : 
   43897             : 
   43898           0 : static PyObject *py_srvsvc_NetShareDelSticky_in_get_server_unc(PyObject *obj, void *closure)
   43899             : {
   43900           0 :         struct srvsvc_NetShareDelSticky *object = (struct srvsvc_NetShareDelSticky *)pytalloc_get_ptr(obj);
   43901             :         PyObject *py_server_unc;
   43902           0 :         if (object->in.server_unc == NULL) {
   43903           0 :                 Py_RETURN_NONE;
   43904             :         }
   43905           0 :         if (object->in.server_unc == NULL) {
   43906           0 :                 py_server_unc = Py_None;
   43907           0 :                 Py_INCREF(py_server_unc);
   43908             :         } else {
   43909           0 :                 if (object->in.server_unc == NULL) {
   43910           0 :                         py_server_unc = Py_None;
   43911           0 :                         Py_INCREF(py_server_unc);
   43912             :                 } else {
   43913           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   43914             :                 }
   43915             :         }
   43916           0 :         return py_server_unc;
   43917             : }
   43918             : 
   43919           0 : static int py_srvsvc_NetShareDelSticky_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   43920             : {
   43921           0 :         struct srvsvc_NetShareDelSticky *object = (struct srvsvc_NetShareDelSticky *)pytalloc_get_ptr(py_obj);
   43922           0 :         if (value == NULL) {
   43923           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   43924           0 :                 return -1;
   43925             :         }
   43926           0 :         if (value == Py_None) {
   43927           0 :                 object->in.server_unc = NULL;
   43928             :         } else {
   43929           0 :                 object->in.server_unc = NULL;
   43930             :                 {
   43931             :                         const char *test_str;
   43932             :                         const char *talloc_str;
   43933           0 :                         PyObject *unicode = NULL;
   43934           0 :                         if (PyUnicode_Check(value)) {
   43935           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   43936           0 :                                 if (unicode == NULL) {
   43937           0 :                                         PyErr_NoMemory();
   43938           0 :                                         return -1;
   43939             :                                 }
   43940           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   43941           0 :                         } else if (PyBytes_Check(value)) {
   43942           0 :                                 test_str = PyBytes_AS_STRING(value);
   43943             :                         } else {
   43944           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   43945           0 :                                 return -1;
   43946             :                         }
   43947           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   43948           0 :                         if (unicode != NULL) {
   43949           0 :                                 Py_DECREF(unicode);
   43950             :                         }
   43951           0 :                         if (talloc_str == NULL) {
   43952           0 :                                 PyErr_NoMemory();
   43953           0 :                                 return -1;
   43954             :                         }
   43955           0 :                         object->in.server_unc = talloc_str;
   43956             :                 }
   43957             :         }
   43958           0 :         return 0;
   43959             : }
   43960             : 
   43961           0 : static PyObject *py_srvsvc_NetShareDelSticky_in_get_share_name(PyObject *obj, void *closure)
   43962             : {
   43963           0 :         struct srvsvc_NetShareDelSticky *object = (struct srvsvc_NetShareDelSticky *)pytalloc_get_ptr(obj);
   43964             :         PyObject *py_share_name;
   43965           0 :         if (object->in.share_name == NULL) {
   43966           0 :                 py_share_name = Py_None;
   43967           0 :                 Py_INCREF(py_share_name);
   43968             :         } else {
   43969           0 :                 py_share_name = PyUnicode_Decode(object->in.share_name, strlen(object->in.share_name), "utf-8", "ignore");
   43970             :         }
   43971           0 :         return py_share_name;
   43972             : }
   43973             : 
   43974           0 : static int py_srvsvc_NetShareDelSticky_in_set_share_name(PyObject *py_obj, PyObject *value, void *closure)
   43975             : {
   43976           0 :         struct srvsvc_NetShareDelSticky *object = (struct srvsvc_NetShareDelSticky *)pytalloc_get_ptr(py_obj);
   43977           0 :         if (value == NULL) {
   43978           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.share_name");
   43979           0 :                 return -1;
   43980             :         }
   43981             :         {
   43982             :                 const char *test_str;
   43983             :                 const char *talloc_str;
   43984           0 :                 PyObject *unicode = NULL;
   43985           0 :                 if (PyUnicode_Check(value)) {
   43986           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   43987           0 :                         if (unicode == NULL) {
   43988           0 :                                 PyErr_NoMemory();
   43989           0 :                                 return -1;
   43990             :                         }
   43991           0 :                         test_str = PyBytes_AS_STRING(unicode);
   43992           0 :                 } else if (PyBytes_Check(value)) {
   43993           0 :                         test_str = PyBytes_AS_STRING(value);
   43994             :                 } else {
   43995           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   43996           0 :                         return -1;
   43997             :                 }
   43998           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   43999           0 :                 if (unicode != NULL) {
   44000           0 :                         Py_DECREF(unicode);
   44001             :                 }
   44002           0 :                 if (talloc_str == NULL) {
   44003           0 :                         PyErr_NoMemory();
   44004           0 :                         return -1;
   44005             :                 }
   44006           0 :                 object->in.share_name = talloc_str;
   44007             :         }
   44008           0 :         return 0;
   44009             : }
   44010             : 
   44011           0 : static PyObject *py_srvsvc_NetShareDelSticky_in_get_reserved(PyObject *obj, void *closure)
   44012             : {
   44013           0 :         struct srvsvc_NetShareDelSticky *object = (struct srvsvc_NetShareDelSticky *)pytalloc_get_ptr(obj);
   44014             :         PyObject *py_reserved;
   44015           0 :         py_reserved = PyLong_FromUnsignedLongLong((uint32_t)object->in.reserved);
   44016           0 :         return py_reserved;
   44017             : }
   44018             : 
   44019           0 : static int py_srvsvc_NetShareDelSticky_in_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
   44020             : {
   44021           0 :         struct srvsvc_NetShareDelSticky *object = (struct srvsvc_NetShareDelSticky *)pytalloc_get_ptr(py_obj);
   44022           0 :         if (value == NULL) {
   44023           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.reserved");
   44024           0 :                 return -1;
   44025             :         }
   44026             :         {
   44027           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.reserved));
   44028           0 :                 if (PyLong_Check(value)) {
   44029             :                         unsigned long long test_var;
   44030           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   44031           0 :                         if (PyErr_Occurred() != NULL) {
   44032           0 :                                 return -1;
   44033             :                         }
   44034           0 :                         if (test_var > uint_max) {
   44035           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   44036             :                                   PyLong_Type.tp_name, uint_max, test_var);
   44037           0 :                                 return -1;
   44038             :                         }
   44039           0 :                         object->in.reserved = test_var;
   44040             :                 } else {
   44041           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   44042             :                           PyLong_Type.tp_name);
   44043           0 :                         return -1;
   44044             :                 }
   44045             :         }
   44046           0 :         return 0;
   44047             : }
   44048             : 
   44049           0 : static PyObject *py_srvsvc_NetShareDelSticky_get_result(PyObject *obj, void *closure)
   44050             : {
   44051           0 :         struct srvsvc_NetShareDelSticky *object = (struct srvsvc_NetShareDelSticky *)pytalloc_get_ptr(obj);
   44052             :         PyObject *py_result;
   44053           0 :         py_result = PyErr_FromWERROR(object->out.result);
   44054           0 :         return py_result;
   44055             : }
   44056             : 
   44057           0 : static int py_srvsvc_NetShareDelSticky_set_result(PyObject *py_obj, PyObject *value, void *closure)
   44058             : {
   44059           0 :         struct srvsvc_NetShareDelSticky *object = (struct srvsvc_NetShareDelSticky *)pytalloc_get_ptr(py_obj);
   44060           0 :         if (value == NULL) {
   44061           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   44062           0 :                 return -1;
   44063             :         }
   44064           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   44065           0 :         return 0;
   44066             : }
   44067             : 
   44068             : static PyGetSetDef py_srvsvc_NetShareDelSticky_getsetters[] = {
   44069             :         {
   44070             :                 .name = discard_const_p(char, "in_server_unc"),
   44071             :                 .get = py_srvsvc_NetShareDelSticky_in_get_server_unc,
   44072             :                 .set = py_srvsvc_NetShareDelSticky_in_set_server_unc,
   44073             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   44074             :         },
   44075             :         {
   44076             :                 .name = discard_const_p(char, "in_share_name"),
   44077             :                 .get = py_srvsvc_NetShareDelSticky_in_get_share_name,
   44078             :                 .set = py_srvsvc_NetShareDelSticky_in_set_share_name,
   44079             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   44080             :         },
   44081             :         {
   44082             :                 .name = discard_const_p(char, "in_reserved"),
   44083             :                 .get = py_srvsvc_NetShareDelSticky_in_get_reserved,
   44084             :                 .set = py_srvsvc_NetShareDelSticky_in_set_reserved,
   44085             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   44086             :         },
   44087             :         {
   44088             :                 .name = discard_const_p(char, "result"),
   44089             :                 .get = py_srvsvc_NetShareDelSticky_get_result,
   44090             :                 .set = py_srvsvc_NetShareDelSticky_set_result,
   44091             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   44092             :         },
   44093             :         { .name = NULL }
   44094             : };
   44095             : 
   44096           0 : static PyObject *py_srvsvc_NetShareDelSticky_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   44097             : {
   44098           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetShareDelSticky, type);
   44099           0 :         return self;
   44100             : }
   44101             : 
   44102           0 : static PyObject *py_srvsvc_NetShareDelSticky_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   44103             : {
   44104             : 
   44105             : 
   44106           0 :         return PyLong_FromLong(19);
   44107             : }
   44108             : 
   44109           0 : static PyObject *py_srvsvc_NetShareDelSticky_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   44110             : {
   44111           0 :         const struct ndr_interface_call *call = NULL;
   44112           0 :         struct srvsvc_NetShareDelSticky *object = (struct srvsvc_NetShareDelSticky *)pytalloc_get_ptr(py_obj);
   44113           0 :         PyObject *ret = NULL;
   44114           0 :         struct ndr_push *push = NULL;
   44115             :         DATA_BLOB blob;
   44116             :         enum ndr_err_code err;
   44117             : 
   44118           0 :         if (ndr_table_srvsvc.num_calls < 20) {
   44119           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareDelSticky_ndr_pack");
   44120           0 :                 return NULL;
   44121             :         }
   44122           0 :         call = &ndr_table_srvsvc.calls[19];
   44123             : 
   44124           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   44125           0 :         if (push == NULL) {
   44126           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   44127           0 :                 return NULL;
   44128             :         }
   44129             : 
   44130           0 :         push->flags |= ndr_push_flags;
   44131             : 
   44132           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   44133           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   44134           0 :                 TALLOC_FREE(push);
   44135           0 :                 PyErr_SetNdrError(err);
   44136           0 :                 return NULL;
   44137             :         }
   44138           0 :         blob = ndr_push_blob(push);
   44139           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   44140           0 :         TALLOC_FREE(push);
   44141           0 :         return ret;
   44142             : }
   44143             : 
   44144           0 : static PyObject *py_srvsvc_NetShareDelSticky_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44145             : {
   44146           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   44147           0 :         PyObject *bigendian_obj = NULL;
   44148           0 :         PyObject *ndr64_obj = NULL;
   44149           0 :         uint32_t ndr_push_flags = 0;
   44150             : 
   44151           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   44152             :                 discard_const_p(char *, kwnames),
   44153             :                 &bigendian_obj,
   44154             :                 &ndr64_obj)) {
   44155           0 :                 return NULL;
   44156             :         }
   44157             : 
   44158           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44159           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   44160             :         }
   44161           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44162           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   44163             :         }
   44164             : 
   44165           0 :         return py_srvsvc_NetShareDelSticky_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   44166             : }
   44167             : 
   44168           0 : static PyObject *py_srvsvc_NetShareDelSticky_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44169             : {
   44170           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   44171           0 :         PyObject *bigendian_obj = NULL;
   44172           0 :         PyObject *ndr64_obj = NULL;
   44173           0 :         uint32_t ndr_push_flags = 0;
   44174             : 
   44175           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   44176             :                 discard_const_p(char *, kwnames),
   44177             :                 &bigendian_obj,
   44178             :                 &ndr64_obj)) {
   44179           0 :                 return NULL;
   44180             :         }
   44181             : 
   44182           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44183           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   44184             :         }
   44185           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44186           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   44187             :         }
   44188             : 
   44189           0 :         return py_srvsvc_NetShareDelSticky_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   44190             : }
   44191             : 
   44192           0 : static PyObject *py_srvsvc_NetShareDelSticky_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   44193             : {
   44194           0 :         const struct ndr_interface_call *call = NULL;
   44195           0 :         struct srvsvc_NetShareDelSticky *object = (struct srvsvc_NetShareDelSticky *)pytalloc_get_ptr(py_obj);
   44196           0 :         struct ndr_pull *pull = NULL;
   44197             :         enum ndr_err_code err;
   44198             : 
   44199           0 :         if (ndr_table_srvsvc.num_calls < 20) {
   44200           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareDelSticky_ndr_unpack");
   44201           0 :                 return NULL;
   44202             :         }
   44203           0 :         call = &ndr_table_srvsvc.calls[19];
   44204             : 
   44205           0 :         pull = ndr_pull_init_blob(blob, object);
   44206           0 :         if (pull == NULL) {
   44207           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   44208           0 :                 return NULL;
   44209             :         }
   44210             : 
   44211           0 :         pull->flags |= ndr_pull_flags;
   44212             : 
   44213           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   44214           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   44215           0 :                 TALLOC_FREE(pull);
   44216           0 :                 PyErr_SetNdrError(err);
   44217           0 :                 return NULL;
   44218             :         }
   44219           0 :         if (!allow_remaining) {
   44220             :                 uint32_t highest_ofs;
   44221             : 
   44222           0 :                 if (pull->offset > pull->relative_highest_offset) {
   44223           0 :                         highest_ofs = pull->offset;
   44224             :                 } else {
   44225           0 :                         highest_ofs = pull->relative_highest_offset;
   44226             :                 }
   44227           0 :                 if (highest_ofs < pull->data_size) {
   44228           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   44229             :                                 "not all bytes consumed ofs[%u] size[%u]",
   44230             :                                 highest_ofs, pull->data_size);
   44231           0 :                         TALLOC_FREE(pull);
   44232           0 :                         PyErr_SetNdrError(err);
   44233           0 :                         return NULL;
   44234             :                 }
   44235             :         }
   44236             : 
   44237           0 :         TALLOC_FREE(pull);
   44238           0 :         Py_RETURN_NONE;
   44239             : }
   44240             : 
   44241           0 : static PyObject *py_srvsvc_NetShareDelSticky_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44242             : {
   44243             :         DATA_BLOB blob;
   44244           0 :         Py_ssize_t blob_length = 0;
   44245           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   44246           0 :         PyObject *bigendian_obj = NULL;
   44247           0 :         PyObject *ndr64_obj = NULL;
   44248           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   44249           0 :         PyObject *allow_remaining_obj = NULL;
   44250           0 :         bool allow_remaining = false;
   44251             : 
   44252           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   44253             :                 discard_const_p(char *, kwnames),
   44254             :                 &blob.data, &blob_length,
   44255             :                 &bigendian_obj,
   44256             :                 &ndr64_obj,
   44257             :                 &allow_remaining_obj)) {
   44258           0 :                 return NULL;
   44259             :         }
   44260           0 :         blob.length = blob_length;
   44261             : 
   44262           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44263           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   44264             :         }
   44265           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44266           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   44267             :         }
   44268             : 
   44269           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   44270           0 :                 allow_remaining = true;
   44271             :         }
   44272             : 
   44273           0 :         return py_srvsvc_NetShareDelSticky_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   44274             : }
   44275             : 
   44276           0 : static PyObject *py_srvsvc_NetShareDelSticky_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44277             : {
   44278             :         DATA_BLOB blob;
   44279           0 :         Py_ssize_t blob_length = 0;
   44280           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   44281           0 :         PyObject *bigendian_obj = NULL;
   44282           0 :         PyObject *ndr64_obj = NULL;
   44283           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   44284           0 :         PyObject *allow_remaining_obj = NULL;
   44285           0 :         bool allow_remaining = false;
   44286             : 
   44287           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   44288             :                 discard_const_p(char *, kwnames),
   44289             :                 &blob.data, &blob_length,
   44290             :                 &bigendian_obj,
   44291             :                 &ndr64_obj,
   44292             :                 &allow_remaining_obj)) {
   44293           0 :                 return NULL;
   44294             :         }
   44295           0 :         blob.length = blob_length;
   44296             : 
   44297           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44298           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   44299             :         }
   44300           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44301           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   44302             :         }
   44303             : 
   44304           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   44305           0 :                 allow_remaining = true;
   44306             :         }
   44307             : 
   44308           0 :         return py_srvsvc_NetShareDelSticky_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   44309             : }
   44310             : 
   44311           0 : static PyObject *py_srvsvc_NetShareDelSticky_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   44312             : {
   44313           0 :         const struct ndr_interface_call *call = NULL;
   44314           0 :         struct srvsvc_NetShareDelSticky *object = (struct srvsvc_NetShareDelSticky *)pytalloc_get_ptr(py_obj);
   44315             :         PyObject *ret;
   44316             :         char *retstr;
   44317             : 
   44318           0 :         if (ndr_table_srvsvc.num_calls < 20) {
   44319           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareDelSticky_ndr_print");
   44320           0 :                 return NULL;
   44321             :         }
   44322           0 :         call = &ndr_table_srvsvc.calls[19];
   44323             : 
   44324           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   44325           0 :         ret = PyUnicode_FromString(retstr);
   44326           0 :         TALLOC_FREE(retstr);
   44327             : 
   44328           0 :         return ret;
   44329             : }
   44330             : 
   44331           0 : static PyObject *py_srvsvc_NetShareDelSticky_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   44332             : {
   44333           0 :         return py_srvsvc_NetShareDelSticky_ndr_print(py_obj, "srvsvc_NetShareDelSticky_in", NDR_IN);
   44334             : }
   44335             : 
   44336           0 : static PyObject *py_srvsvc_NetShareDelSticky_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   44337             : {
   44338           0 :         return py_srvsvc_NetShareDelSticky_ndr_print(py_obj, "srvsvc_NetShareDelSticky_out", NDR_OUT);
   44339             : }
   44340             : 
   44341             : static PyMethodDef py_srvsvc_NetShareDelSticky_methods[] = {
   44342             :         { "opnum", (PyCFunction)py_srvsvc_NetShareDelSticky_ndr_opnum, METH_NOARGS|METH_CLASS,
   44343             :                 "srvsvc.NetShareDelSticky.opnum() -> 19 (0x13) " },
   44344             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDelSticky_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   44345             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   44346             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDelSticky_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   44347             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   44348             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDelSticky_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   44349             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   44350             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDelSticky_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   44351             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   44352             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetShareDelSticky_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   44353             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetShareDelSticky_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   44354             :         { NULL, NULL, 0, NULL }
   44355             : };
   44356             : 
   44357             : 
   44358             : static PyTypeObject srvsvc_NetShareDelSticky_Type = {
   44359             :         PyVarObject_HEAD_INIT(NULL, 0)
   44360             :         .tp_name = "srvsvc.NetShareDelSticky",
   44361             :         .tp_getset = py_srvsvc_NetShareDelSticky_getsetters,
   44362             :         .tp_methods = py_srvsvc_NetShareDelSticky_methods,
   44363             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   44364             :         .tp_new = py_srvsvc_NetShareDelSticky_new,
   44365             : };
   44366             : 
   44367           0 : static bool pack_py_srvsvc_NetShareDelSticky_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareDelSticky *r)
   44368             : {
   44369             :         PyObject *py_server_unc;
   44370             :         PyObject *py_share_name;
   44371             :         PyObject *py_reserved;
   44372           0 :         const char *kwnames[] = {
   44373             :                 "server_unc", "share_name", "reserved", NULL
   44374             :         };
   44375             : 
   44376           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetShareDelSticky", discard_const_p(char *, kwnames), &py_server_unc, &py_share_name, &py_reserved)) {
   44377           0 :                 return false;
   44378             :         }
   44379             : 
   44380           0 :         if (py_server_unc == NULL) {
   44381           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   44382           0 :                 return false;
   44383             :         }
   44384           0 :         if (py_server_unc == Py_None) {
   44385           0 :                 r->in.server_unc = NULL;
   44386             :         } else {
   44387           0 :                 r->in.server_unc = NULL;
   44388             :                 {
   44389             :                         const char *test_str;
   44390             :                         const char *talloc_str;
   44391           0 :                         PyObject *unicode = NULL;
   44392           0 :                         if (PyUnicode_Check(py_server_unc)) {
   44393           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   44394           0 :                                 if (unicode == NULL) {
   44395           0 :                                         PyErr_NoMemory();
   44396           0 :                                         return false;
   44397             :                                 }
   44398           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   44399           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   44400           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   44401             :                         } else {
   44402           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   44403           0 :                                 return false;
   44404             :                         }
   44405           0 :                         talloc_str = talloc_strdup(r, test_str);
   44406           0 :                         if (unicode != NULL) {
   44407           0 :                                 Py_DECREF(unicode);
   44408             :                         }
   44409           0 :                         if (talloc_str == NULL) {
   44410           0 :                                 PyErr_NoMemory();
   44411           0 :                                 return false;
   44412             :                         }
   44413           0 :                         r->in.server_unc = talloc_str;
   44414             :                 }
   44415             :         }
   44416           0 :         if (py_share_name == NULL) {
   44417           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.share_name");
   44418           0 :                 return false;
   44419             :         }
   44420             :         {
   44421             :                 const char *test_str;
   44422             :                 const char *talloc_str;
   44423           0 :                 PyObject *unicode = NULL;
   44424           0 :                 if (PyUnicode_Check(py_share_name)) {
   44425           0 :                         unicode = PyUnicode_AsEncodedString(py_share_name, "utf-8", "ignore");
   44426           0 :                         if (unicode == NULL) {
   44427           0 :                                 PyErr_NoMemory();
   44428           0 :                                 return false;
   44429             :                         }
   44430           0 :                         test_str = PyBytes_AS_STRING(unicode);
   44431           0 :                 } else if (PyBytes_Check(py_share_name)) {
   44432           0 :                         test_str = PyBytes_AS_STRING(py_share_name);
   44433             :                 } else {
   44434           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share_name)->tp_name);
   44435           0 :                         return false;
   44436             :                 }
   44437           0 :                 talloc_str = talloc_strdup(r, test_str);
   44438           0 :                 if (unicode != NULL) {
   44439           0 :                         Py_DECREF(unicode);
   44440             :                 }
   44441           0 :                 if (talloc_str == NULL) {
   44442           0 :                         PyErr_NoMemory();
   44443           0 :                         return false;
   44444             :                 }
   44445           0 :                 r->in.share_name = talloc_str;
   44446             :         }
   44447           0 :         if (py_reserved == NULL) {
   44448           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.reserved");
   44449           0 :                 return false;
   44450             :         }
   44451             :         {
   44452           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.reserved));
   44453           0 :                 if (PyLong_Check(py_reserved)) {
   44454             :                         unsigned long long test_var;
   44455           0 :                         test_var = PyLong_AsUnsignedLongLong(py_reserved);
   44456           0 :                         if (PyErr_Occurred() != NULL) {
   44457           0 :                                 return false;
   44458             :                         }
   44459           0 :                         if (test_var > uint_max) {
   44460           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   44461             :                                   PyLong_Type.tp_name, uint_max, test_var);
   44462           0 :                                 return false;
   44463             :                         }
   44464           0 :                         r->in.reserved = test_var;
   44465             :                 } else {
   44466           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   44467             :                           PyLong_Type.tp_name);
   44468           0 :                         return false;
   44469             :                 }
   44470             :         }
   44471           0 :         return true;
   44472             : }
   44473             : 
   44474           0 : static PyObject *unpack_py_srvsvc_NetShareDelSticky_args_out(struct srvsvc_NetShareDelSticky *r)
   44475             : {
   44476             :         PyObject *result;
   44477           0 :         result = Py_None;
   44478           0 :         Py_INCREF(result);
   44479           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   44480           0 :                 PyErr_SetWERROR(r->out.result);
   44481           0 :                 return NULL;
   44482             :         }
   44483             : 
   44484           0 :         return result;
   44485             : }
   44486             : 
   44487             : 
   44488           0 : static PyObject *py_srvsvc_NetShareCheck_in_get_server_unc(PyObject *obj, void *closure)
   44489             : {
   44490           0 :         struct srvsvc_NetShareCheck *object = (struct srvsvc_NetShareCheck *)pytalloc_get_ptr(obj);
   44491             :         PyObject *py_server_unc;
   44492           0 :         if (object->in.server_unc == NULL) {
   44493           0 :                 Py_RETURN_NONE;
   44494             :         }
   44495           0 :         if (object->in.server_unc == NULL) {
   44496           0 :                 py_server_unc = Py_None;
   44497           0 :                 Py_INCREF(py_server_unc);
   44498             :         } else {
   44499           0 :                 if (object->in.server_unc == NULL) {
   44500           0 :                         py_server_unc = Py_None;
   44501           0 :                         Py_INCREF(py_server_unc);
   44502             :                 } else {
   44503           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   44504             :                 }
   44505             :         }
   44506           0 :         return py_server_unc;
   44507             : }
   44508             : 
   44509           0 : static int py_srvsvc_NetShareCheck_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   44510             : {
   44511           0 :         struct srvsvc_NetShareCheck *object = (struct srvsvc_NetShareCheck *)pytalloc_get_ptr(py_obj);
   44512           0 :         if (value == NULL) {
   44513           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   44514           0 :                 return -1;
   44515             :         }
   44516           0 :         if (value == Py_None) {
   44517           0 :                 object->in.server_unc = NULL;
   44518             :         } else {
   44519           0 :                 object->in.server_unc = NULL;
   44520             :                 {
   44521             :                         const char *test_str;
   44522             :                         const char *talloc_str;
   44523           0 :                         PyObject *unicode = NULL;
   44524           0 :                         if (PyUnicode_Check(value)) {
   44525           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   44526           0 :                                 if (unicode == NULL) {
   44527           0 :                                         PyErr_NoMemory();
   44528           0 :                                         return -1;
   44529             :                                 }
   44530           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   44531           0 :                         } else if (PyBytes_Check(value)) {
   44532           0 :                                 test_str = PyBytes_AS_STRING(value);
   44533             :                         } else {
   44534           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   44535           0 :                                 return -1;
   44536             :                         }
   44537           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   44538           0 :                         if (unicode != NULL) {
   44539           0 :                                 Py_DECREF(unicode);
   44540             :                         }
   44541           0 :                         if (talloc_str == NULL) {
   44542           0 :                                 PyErr_NoMemory();
   44543           0 :                                 return -1;
   44544             :                         }
   44545           0 :                         object->in.server_unc = talloc_str;
   44546             :                 }
   44547             :         }
   44548           0 :         return 0;
   44549             : }
   44550             : 
   44551           0 : static PyObject *py_srvsvc_NetShareCheck_in_get_device_name(PyObject *obj, void *closure)
   44552             : {
   44553           0 :         struct srvsvc_NetShareCheck *object = (struct srvsvc_NetShareCheck *)pytalloc_get_ptr(obj);
   44554             :         PyObject *py_device_name;
   44555           0 :         if (object->in.device_name == NULL) {
   44556           0 :                 py_device_name = Py_None;
   44557           0 :                 Py_INCREF(py_device_name);
   44558             :         } else {
   44559           0 :                 py_device_name = PyUnicode_Decode(object->in.device_name, strlen(object->in.device_name), "utf-8", "ignore");
   44560             :         }
   44561           0 :         return py_device_name;
   44562             : }
   44563             : 
   44564           0 : static int py_srvsvc_NetShareCheck_in_set_device_name(PyObject *py_obj, PyObject *value, void *closure)
   44565             : {
   44566           0 :         struct srvsvc_NetShareCheck *object = (struct srvsvc_NetShareCheck *)pytalloc_get_ptr(py_obj);
   44567           0 :         if (value == NULL) {
   44568           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.device_name");
   44569           0 :                 return -1;
   44570             :         }
   44571             :         {
   44572             :                 const char *test_str;
   44573             :                 const char *talloc_str;
   44574           0 :                 PyObject *unicode = NULL;
   44575           0 :                 if (PyUnicode_Check(value)) {
   44576           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   44577           0 :                         if (unicode == NULL) {
   44578           0 :                                 PyErr_NoMemory();
   44579           0 :                                 return -1;
   44580             :                         }
   44581           0 :                         test_str = PyBytes_AS_STRING(unicode);
   44582           0 :                 } else if (PyBytes_Check(value)) {
   44583           0 :                         test_str = PyBytes_AS_STRING(value);
   44584             :                 } else {
   44585           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   44586           0 :                         return -1;
   44587             :                 }
   44588           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   44589           0 :                 if (unicode != NULL) {
   44590           0 :                         Py_DECREF(unicode);
   44591             :                 }
   44592           0 :                 if (talloc_str == NULL) {
   44593           0 :                         PyErr_NoMemory();
   44594           0 :                         return -1;
   44595             :                 }
   44596           0 :                 object->in.device_name = talloc_str;
   44597             :         }
   44598           0 :         return 0;
   44599             : }
   44600             : 
   44601           0 : static PyObject *py_srvsvc_NetShareCheck_out_get_type(PyObject *obj, void *closure)
   44602             : {
   44603           0 :         struct srvsvc_NetShareCheck *object = (struct srvsvc_NetShareCheck *)pytalloc_get_ptr(obj);
   44604             :         PyObject *py_type;
   44605           0 :         if (object->out.type == NULL) {
   44606           0 :                 Py_RETURN_NONE;
   44607             :         }
   44608           0 :         py_type = PyLong_FromUnsignedLongLong((uint32_t)*object->out.type);
   44609           0 :         return py_type;
   44610             : }
   44611             : 
   44612           0 : static int py_srvsvc_NetShareCheck_out_set_type(PyObject *py_obj, PyObject *value, void *closure)
   44613             : {
   44614           0 :         struct srvsvc_NetShareCheck *object = (struct srvsvc_NetShareCheck *)pytalloc_get_ptr(py_obj);
   44615           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.type));
   44616           0 :         if (value == NULL) {
   44617           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.type");
   44618           0 :                 return -1;
   44619             :         }
   44620           0 :         object->out.type = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.type);
   44621           0 :         if (object->out.type == NULL) {
   44622           0 :                 PyErr_NoMemory();
   44623           0 :                 return -1;
   44624             :         }
   44625             :         {
   44626           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.type));
   44627           0 :                 if (PyLong_Check(value)) {
   44628             :                         unsigned long long test_var;
   44629           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   44630           0 :                         if (PyErr_Occurred() != NULL) {
   44631           0 :                                 return -1;
   44632             :                         }
   44633           0 :                         if (test_var > uint_max) {
   44634           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   44635             :                                   PyLong_Type.tp_name, uint_max, test_var);
   44636           0 :                                 return -1;
   44637             :                         }
   44638           0 :                         *object->out.type = test_var;
   44639             :                 } else {
   44640           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   44641             :                           PyLong_Type.tp_name);
   44642           0 :                         return -1;
   44643             :                 }
   44644             :         }
   44645           0 :         return 0;
   44646             : }
   44647             : 
   44648           0 : static PyObject *py_srvsvc_NetShareCheck_get_result(PyObject *obj, void *closure)
   44649             : {
   44650           0 :         struct srvsvc_NetShareCheck *object = (struct srvsvc_NetShareCheck *)pytalloc_get_ptr(obj);
   44651             :         PyObject *py_result;
   44652           0 :         py_result = PyErr_FromWERROR(object->out.result);
   44653           0 :         return py_result;
   44654             : }
   44655             : 
   44656           0 : static int py_srvsvc_NetShareCheck_set_result(PyObject *py_obj, PyObject *value, void *closure)
   44657             : {
   44658           0 :         struct srvsvc_NetShareCheck *object = (struct srvsvc_NetShareCheck *)pytalloc_get_ptr(py_obj);
   44659           0 :         if (value == NULL) {
   44660           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   44661           0 :                 return -1;
   44662             :         }
   44663           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   44664           0 :         return 0;
   44665             : }
   44666             : 
   44667             : static PyGetSetDef py_srvsvc_NetShareCheck_getsetters[] = {
   44668             :         {
   44669             :                 .name = discard_const_p(char, "in_server_unc"),
   44670             :                 .get = py_srvsvc_NetShareCheck_in_get_server_unc,
   44671             :                 .set = py_srvsvc_NetShareCheck_in_set_server_unc,
   44672             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   44673             :         },
   44674             :         {
   44675             :                 .name = discard_const_p(char, "in_device_name"),
   44676             :                 .get = py_srvsvc_NetShareCheck_in_get_device_name,
   44677             :                 .set = py_srvsvc_NetShareCheck_in_set_device_name,
   44678             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   44679             :         },
   44680             :         {
   44681             :                 .name = discard_const_p(char, "out_type"),
   44682             :                 .get = py_srvsvc_NetShareCheck_out_get_type,
   44683             :                 .set = py_srvsvc_NetShareCheck_out_set_type,
   44684             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_ShareType")
   44685             :         },
   44686             :         {
   44687             :                 .name = discard_const_p(char, "result"),
   44688             :                 .get = py_srvsvc_NetShareCheck_get_result,
   44689             :                 .set = py_srvsvc_NetShareCheck_set_result,
   44690             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   44691             :         },
   44692             :         { .name = NULL }
   44693             : };
   44694             : 
   44695           0 : static PyObject *py_srvsvc_NetShareCheck_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   44696             : {
   44697           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetShareCheck, type);
   44698           0 :         struct srvsvc_NetShareCheck *_self = (struct srvsvc_NetShareCheck *)pytalloc_get_ptr(self);
   44699           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   44700           0 :         _self->out.type = talloc_zero(mem_ctx, enum srvsvc_ShareType);
   44701           0 :         return self;
   44702             : }
   44703             : 
   44704           0 : static PyObject *py_srvsvc_NetShareCheck_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   44705             : {
   44706             : 
   44707             : 
   44708           0 :         return PyLong_FromLong(20);
   44709             : }
   44710             : 
   44711           0 : static PyObject *py_srvsvc_NetShareCheck_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   44712             : {
   44713           0 :         const struct ndr_interface_call *call = NULL;
   44714           0 :         struct srvsvc_NetShareCheck *object = (struct srvsvc_NetShareCheck *)pytalloc_get_ptr(py_obj);
   44715           0 :         PyObject *ret = NULL;
   44716           0 :         struct ndr_push *push = NULL;
   44717             :         DATA_BLOB blob;
   44718             :         enum ndr_err_code err;
   44719             : 
   44720           0 :         if (ndr_table_srvsvc.num_calls < 21) {
   44721           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareCheck_ndr_pack");
   44722           0 :                 return NULL;
   44723             :         }
   44724           0 :         call = &ndr_table_srvsvc.calls[20];
   44725             : 
   44726           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   44727           0 :         if (push == NULL) {
   44728           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   44729           0 :                 return NULL;
   44730             :         }
   44731             : 
   44732           0 :         push->flags |= ndr_push_flags;
   44733             : 
   44734           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   44735           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   44736           0 :                 TALLOC_FREE(push);
   44737           0 :                 PyErr_SetNdrError(err);
   44738           0 :                 return NULL;
   44739             :         }
   44740           0 :         blob = ndr_push_blob(push);
   44741           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   44742           0 :         TALLOC_FREE(push);
   44743           0 :         return ret;
   44744             : }
   44745             : 
   44746           0 : static PyObject *py_srvsvc_NetShareCheck_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44747             : {
   44748           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   44749           0 :         PyObject *bigendian_obj = NULL;
   44750           0 :         PyObject *ndr64_obj = NULL;
   44751           0 :         uint32_t ndr_push_flags = 0;
   44752             : 
   44753           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   44754             :                 discard_const_p(char *, kwnames),
   44755             :                 &bigendian_obj,
   44756             :                 &ndr64_obj)) {
   44757           0 :                 return NULL;
   44758             :         }
   44759             : 
   44760           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44761           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   44762             :         }
   44763           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44764           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   44765             :         }
   44766             : 
   44767           0 :         return py_srvsvc_NetShareCheck_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   44768             : }
   44769             : 
   44770           0 : static PyObject *py_srvsvc_NetShareCheck_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44771             : {
   44772           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   44773           0 :         PyObject *bigendian_obj = NULL;
   44774           0 :         PyObject *ndr64_obj = NULL;
   44775           0 :         uint32_t ndr_push_flags = 0;
   44776             : 
   44777           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   44778             :                 discard_const_p(char *, kwnames),
   44779             :                 &bigendian_obj,
   44780             :                 &ndr64_obj)) {
   44781           0 :                 return NULL;
   44782             :         }
   44783             : 
   44784           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44785           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   44786             :         }
   44787           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44788           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   44789             :         }
   44790             : 
   44791           0 :         return py_srvsvc_NetShareCheck_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   44792             : }
   44793             : 
   44794           0 : static PyObject *py_srvsvc_NetShareCheck_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   44795             : {
   44796           0 :         const struct ndr_interface_call *call = NULL;
   44797           0 :         struct srvsvc_NetShareCheck *object = (struct srvsvc_NetShareCheck *)pytalloc_get_ptr(py_obj);
   44798           0 :         struct ndr_pull *pull = NULL;
   44799             :         enum ndr_err_code err;
   44800             : 
   44801           0 :         if (ndr_table_srvsvc.num_calls < 21) {
   44802           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareCheck_ndr_unpack");
   44803           0 :                 return NULL;
   44804             :         }
   44805           0 :         call = &ndr_table_srvsvc.calls[20];
   44806             : 
   44807           0 :         pull = ndr_pull_init_blob(blob, object);
   44808           0 :         if (pull == NULL) {
   44809           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   44810           0 :                 return NULL;
   44811             :         }
   44812             : 
   44813           0 :         pull->flags |= ndr_pull_flags;
   44814             : 
   44815           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   44816           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   44817           0 :                 TALLOC_FREE(pull);
   44818           0 :                 PyErr_SetNdrError(err);
   44819           0 :                 return NULL;
   44820             :         }
   44821           0 :         if (!allow_remaining) {
   44822             :                 uint32_t highest_ofs;
   44823             : 
   44824           0 :                 if (pull->offset > pull->relative_highest_offset) {
   44825           0 :                         highest_ofs = pull->offset;
   44826             :                 } else {
   44827           0 :                         highest_ofs = pull->relative_highest_offset;
   44828             :                 }
   44829           0 :                 if (highest_ofs < pull->data_size) {
   44830           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   44831             :                                 "not all bytes consumed ofs[%u] size[%u]",
   44832             :                                 highest_ofs, pull->data_size);
   44833           0 :                         TALLOC_FREE(pull);
   44834           0 :                         PyErr_SetNdrError(err);
   44835           0 :                         return NULL;
   44836             :                 }
   44837             :         }
   44838             : 
   44839           0 :         TALLOC_FREE(pull);
   44840           0 :         Py_RETURN_NONE;
   44841             : }
   44842             : 
   44843           0 : static PyObject *py_srvsvc_NetShareCheck_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44844             : {
   44845             :         DATA_BLOB blob;
   44846           0 :         Py_ssize_t blob_length = 0;
   44847           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   44848           0 :         PyObject *bigendian_obj = NULL;
   44849           0 :         PyObject *ndr64_obj = NULL;
   44850           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   44851           0 :         PyObject *allow_remaining_obj = NULL;
   44852           0 :         bool allow_remaining = false;
   44853             : 
   44854           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   44855             :                 discard_const_p(char *, kwnames),
   44856             :                 &blob.data, &blob_length,
   44857             :                 &bigendian_obj,
   44858             :                 &ndr64_obj,
   44859             :                 &allow_remaining_obj)) {
   44860           0 :                 return NULL;
   44861             :         }
   44862           0 :         blob.length = blob_length;
   44863             : 
   44864           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44865           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   44866             :         }
   44867           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44868           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   44869             :         }
   44870             : 
   44871           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   44872           0 :                 allow_remaining = true;
   44873             :         }
   44874             : 
   44875           0 :         return py_srvsvc_NetShareCheck_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   44876             : }
   44877             : 
   44878           0 : static PyObject *py_srvsvc_NetShareCheck_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44879             : {
   44880             :         DATA_BLOB blob;
   44881           0 :         Py_ssize_t blob_length = 0;
   44882           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   44883           0 :         PyObject *bigendian_obj = NULL;
   44884           0 :         PyObject *ndr64_obj = NULL;
   44885           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   44886           0 :         PyObject *allow_remaining_obj = NULL;
   44887           0 :         bool allow_remaining = false;
   44888             : 
   44889           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   44890             :                 discard_const_p(char *, kwnames),
   44891             :                 &blob.data, &blob_length,
   44892             :                 &bigendian_obj,
   44893             :                 &ndr64_obj,
   44894             :                 &allow_remaining_obj)) {
   44895           0 :                 return NULL;
   44896             :         }
   44897           0 :         blob.length = blob_length;
   44898             : 
   44899           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44900           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   44901             :         }
   44902           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44903           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   44904             :         }
   44905             : 
   44906           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   44907           0 :                 allow_remaining = true;
   44908             :         }
   44909             : 
   44910           0 :         return py_srvsvc_NetShareCheck_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   44911             : }
   44912             : 
   44913           0 : static PyObject *py_srvsvc_NetShareCheck_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   44914             : {
   44915           0 :         const struct ndr_interface_call *call = NULL;
   44916           0 :         struct srvsvc_NetShareCheck *object = (struct srvsvc_NetShareCheck *)pytalloc_get_ptr(py_obj);
   44917             :         PyObject *ret;
   44918             :         char *retstr;
   44919             : 
   44920           0 :         if (ndr_table_srvsvc.num_calls < 21) {
   44921           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareCheck_ndr_print");
   44922           0 :                 return NULL;
   44923             :         }
   44924           0 :         call = &ndr_table_srvsvc.calls[20];
   44925             : 
   44926           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   44927           0 :         ret = PyUnicode_FromString(retstr);
   44928           0 :         TALLOC_FREE(retstr);
   44929             : 
   44930           0 :         return ret;
   44931             : }
   44932             : 
   44933           0 : static PyObject *py_srvsvc_NetShareCheck_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   44934             : {
   44935           0 :         return py_srvsvc_NetShareCheck_ndr_print(py_obj, "srvsvc_NetShareCheck_in", NDR_IN);
   44936             : }
   44937             : 
   44938           0 : static PyObject *py_srvsvc_NetShareCheck_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   44939             : {
   44940           0 :         return py_srvsvc_NetShareCheck_ndr_print(py_obj, "srvsvc_NetShareCheck_out", NDR_OUT);
   44941             : }
   44942             : 
   44943             : static PyMethodDef py_srvsvc_NetShareCheck_methods[] = {
   44944             :         { "opnum", (PyCFunction)py_srvsvc_NetShareCheck_ndr_opnum, METH_NOARGS|METH_CLASS,
   44945             :                 "srvsvc.NetShareCheck.opnum() -> 20 (0x14) " },
   44946             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareCheck_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   44947             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   44948             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareCheck_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   44949             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   44950             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareCheck_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   44951             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   44952             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareCheck_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   44953             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   44954             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetShareCheck_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   44955             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetShareCheck_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   44956             :         { NULL, NULL, 0, NULL }
   44957             : };
   44958             : 
   44959             : 
   44960             : static PyTypeObject srvsvc_NetShareCheck_Type = {
   44961             :         PyVarObject_HEAD_INIT(NULL, 0)
   44962             :         .tp_name = "srvsvc.NetShareCheck",
   44963             :         .tp_getset = py_srvsvc_NetShareCheck_getsetters,
   44964             :         .tp_methods = py_srvsvc_NetShareCheck_methods,
   44965             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   44966             :         .tp_new = py_srvsvc_NetShareCheck_new,
   44967             : };
   44968             : 
   44969           0 : static bool pack_py_srvsvc_NetShareCheck_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareCheck *r)
   44970             : {
   44971             :         PyObject *py_server_unc;
   44972             :         PyObject *py_device_name;
   44973           0 :         const char *kwnames[] = {
   44974             :                 "server_unc", "device_name", NULL
   44975             :         };
   44976             : 
   44977           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:srvsvc_NetShareCheck", discard_const_p(char *, kwnames), &py_server_unc, &py_device_name)) {
   44978           0 :                 return false;
   44979             :         }
   44980             : 
   44981           0 :         if (py_server_unc == NULL) {
   44982           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   44983           0 :                 return false;
   44984             :         }
   44985           0 :         if (py_server_unc == Py_None) {
   44986           0 :                 r->in.server_unc = NULL;
   44987             :         } else {
   44988           0 :                 r->in.server_unc = NULL;
   44989             :                 {
   44990             :                         const char *test_str;
   44991             :                         const char *talloc_str;
   44992           0 :                         PyObject *unicode = NULL;
   44993           0 :                         if (PyUnicode_Check(py_server_unc)) {
   44994           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   44995           0 :                                 if (unicode == NULL) {
   44996           0 :                                         PyErr_NoMemory();
   44997           0 :                                         return false;
   44998             :                                 }
   44999           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   45000           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   45001           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   45002             :                         } else {
   45003           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   45004           0 :                                 return false;
   45005             :                         }
   45006           0 :                         talloc_str = talloc_strdup(r, test_str);
   45007           0 :                         if (unicode != NULL) {
   45008           0 :                                 Py_DECREF(unicode);
   45009             :                         }
   45010           0 :                         if (talloc_str == NULL) {
   45011           0 :                                 PyErr_NoMemory();
   45012           0 :                                 return false;
   45013             :                         }
   45014           0 :                         r->in.server_unc = talloc_str;
   45015             :                 }
   45016             :         }
   45017           0 :         if (py_device_name == NULL) {
   45018           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.device_name");
   45019           0 :                 return false;
   45020             :         }
   45021             :         {
   45022             :                 const char *test_str;
   45023             :                 const char *talloc_str;
   45024           0 :                 PyObject *unicode = NULL;
   45025           0 :                 if (PyUnicode_Check(py_device_name)) {
   45026           0 :                         unicode = PyUnicode_AsEncodedString(py_device_name, "utf-8", "ignore");
   45027           0 :                         if (unicode == NULL) {
   45028           0 :                                 PyErr_NoMemory();
   45029           0 :                                 return false;
   45030             :                         }
   45031           0 :                         test_str = PyBytes_AS_STRING(unicode);
   45032           0 :                 } else if (PyBytes_Check(py_device_name)) {
   45033           0 :                         test_str = PyBytes_AS_STRING(py_device_name);
   45034             :                 } else {
   45035           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_device_name)->tp_name);
   45036           0 :                         return false;
   45037             :                 }
   45038           0 :                 talloc_str = talloc_strdup(r, test_str);
   45039           0 :                 if (unicode != NULL) {
   45040           0 :                         Py_DECREF(unicode);
   45041             :                 }
   45042           0 :                 if (talloc_str == NULL) {
   45043           0 :                         PyErr_NoMemory();
   45044           0 :                         return false;
   45045             :                 }
   45046           0 :                 r->in.device_name = talloc_str;
   45047             :         }
   45048           0 :         return true;
   45049             : }
   45050             : 
   45051           0 : static PyObject *unpack_py_srvsvc_NetShareCheck_args_out(struct srvsvc_NetShareCheck *r)
   45052             : {
   45053             :         PyObject *result;
   45054             :         PyObject *py_type;
   45055           0 :         py_type = PyLong_FromUnsignedLongLong((uint32_t)*r->out.type);
   45056           0 :         result = py_type;
   45057           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   45058           0 :                 PyErr_SetWERROR(r->out.result);
   45059           0 :                 return NULL;
   45060             :         }
   45061             : 
   45062           0 :         return result;
   45063             : }
   45064             : 
   45065             : 
   45066           0 : static PyObject *py_srvsvc_NetSrvGetInfo_in_get_server_unc(PyObject *obj, void *closure)
   45067             : {
   45068           0 :         struct srvsvc_NetSrvGetInfo *object = (struct srvsvc_NetSrvGetInfo *)pytalloc_get_ptr(obj);
   45069             :         PyObject *py_server_unc;
   45070           0 :         if (object->in.server_unc == NULL) {
   45071           0 :                 Py_RETURN_NONE;
   45072             :         }
   45073           0 :         if (object->in.server_unc == NULL) {
   45074           0 :                 py_server_unc = Py_None;
   45075           0 :                 Py_INCREF(py_server_unc);
   45076             :         } else {
   45077           0 :                 if (object->in.server_unc == NULL) {
   45078           0 :                         py_server_unc = Py_None;
   45079           0 :                         Py_INCREF(py_server_unc);
   45080             :                 } else {
   45081           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   45082             :                 }
   45083             :         }
   45084           0 :         return py_server_unc;
   45085             : }
   45086             : 
   45087           0 : static int py_srvsvc_NetSrvGetInfo_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   45088             : {
   45089           0 :         struct srvsvc_NetSrvGetInfo *object = (struct srvsvc_NetSrvGetInfo *)pytalloc_get_ptr(py_obj);
   45090           0 :         if (value == NULL) {
   45091           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   45092           0 :                 return -1;
   45093             :         }
   45094           0 :         if (value == Py_None) {
   45095           0 :                 object->in.server_unc = NULL;
   45096             :         } else {
   45097           0 :                 object->in.server_unc = NULL;
   45098             :                 {
   45099             :                         const char *test_str;
   45100             :                         const char *talloc_str;
   45101           0 :                         PyObject *unicode = NULL;
   45102           0 :                         if (PyUnicode_Check(value)) {
   45103           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   45104           0 :                                 if (unicode == NULL) {
   45105           0 :                                         PyErr_NoMemory();
   45106           0 :                                         return -1;
   45107             :                                 }
   45108           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   45109           0 :                         } else if (PyBytes_Check(value)) {
   45110           0 :                                 test_str = PyBytes_AS_STRING(value);
   45111             :                         } else {
   45112           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   45113           0 :                                 return -1;
   45114             :                         }
   45115           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   45116           0 :                         if (unicode != NULL) {
   45117           0 :                                 Py_DECREF(unicode);
   45118             :                         }
   45119           0 :                         if (talloc_str == NULL) {
   45120           0 :                                 PyErr_NoMemory();
   45121           0 :                                 return -1;
   45122             :                         }
   45123           0 :                         object->in.server_unc = talloc_str;
   45124             :                 }
   45125             :         }
   45126           0 :         return 0;
   45127             : }
   45128             : 
   45129           0 : static PyObject *py_srvsvc_NetSrvGetInfo_in_get_level(PyObject *obj, void *closure)
   45130             : {
   45131           0 :         struct srvsvc_NetSrvGetInfo *object = (struct srvsvc_NetSrvGetInfo *)pytalloc_get_ptr(obj);
   45132             :         PyObject *py_level;
   45133           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   45134           0 :         return py_level;
   45135             : }
   45136             : 
   45137           0 : static int py_srvsvc_NetSrvGetInfo_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   45138             : {
   45139           0 :         struct srvsvc_NetSrvGetInfo *object = (struct srvsvc_NetSrvGetInfo *)pytalloc_get_ptr(py_obj);
   45140           0 :         if (value == NULL) {
   45141           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   45142           0 :                 return -1;
   45143             :         }
   45144             :         {
   45145           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   45146           0 :                 if (PyLong_Check(value)) {
   45147             :                         unsigned long long test_var;
   45148           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   45149           0 :                         if (PyErr_Occurred() != NULL) {
   45150           0 :                                 return -1;
   45151             :                         }
   45152           0 :                         if (test_var > uint_max) {
   45153           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   45154             :                                   PyLong_Type.tp_name, uint_max, test_var);
   45155           0 :                                 return -1;
   45156             :                         }
   45157           0 :                         object->in.level = test_var;
   45158             :                 } else {
   45159           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   45160             :                           PyLong_Type.tp_name);
   45161           0 :                         return -1;
   45162             :                 }
   45163             :         }
   45164           0 :         return 0;
   45165             : }
   45166             : 
   45167           0 : static PyObject *py_srvsvc_NetSrvGetInfo_out_get_info(PyObject *obj, void *closure)
   45168             : {
   45169           0 :         struct srvsvc_NetSrvGetInfo *object = (struct srvsvc_NetSrvGetInfo *)pytalloc_get_ptr(obj);
   45170             :         PyObject *py_info;
   45171           0 :         if (object->out.info == NULL) {
   45172           0 :                 Py_RETURN_NONE;
   45173             :         }
   45174           0 :         py_info = pyrpc_import_union(&srvsvc_NetSrvInfo_Type, object->out.info, object->in.level, object->out.info, "union srvsvc_NetSrvInfo");
   45175           0 :         if (py_info == NULL) {
   45176           0 :                 return NULL;
   45177             :         }
   45178           0 :         return py_info;
   45179             : }
   45180             : 
   45181           0 : static int py_srvsvc_NetSrvGetInfo_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   45182             : {
   45183           0 :         struct srvsvc_NetSrvGetInfo *object = (struct srvsvc_NetSrvGetInfo *)pytalloc_get_ptr(py_obj);
   45184           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   45185           0 :         if (value == NULL) {
   45186           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info");
   45187           0 :                 return -1;
   45188             :         }
   45189           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   45190           0 :         if (object->out.info == NULL) {
   45191           0 :                 PyErr_NoMemory();
   45192           0 :                 return -1;
   45193             :         }
   45194             :         {
   45195             :                 union srvsvc_NetSrvInfo *info_switch_1;
   45196           0 :                 info_switch_1 = (union srvsvc_NetSrvInfo *)pyrpc_export_union(&srvsvc_NetSrvInfo_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union srvsvc_NetSrvInfo");
   45197           0 :                 if (info_switch_1 == NULL) {
   45198           0 :                         return -1;
   45199             :                 }
   45200           0 :                 object->out.info = info_switch_1;
   45201             :         }
   45202           0 :         return 0;
   45203             : }
   45204             : 
   45205           0 : static PyObject *py_srvsvc_NetSrvGetInfo_get_result(PyObject *obj, void *closure)
   45206             : {
   45207           0 :         struct srvsvc_NetSrvGetInfo *object = (struct srvsvc_NetSrvGetInfo *)pytalloc_get_ptr(obj);
   45208             :         PyObject *py_result;
   45209           0 :         py_result = PyErr_FromWERROR(object->out.result);
   45210           0 :         return py_result;
   45211             : }
   45212             : 
   45213           0 : static int py_srvsvc_NetSrvGetInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
   45214             : {
   45215           0 :         struct srvsvc_NetSrvGetInfo *object = (struct srvsvc_NetSrvGetInfo *)pytalloc_get_ptr(py_obj);
   45216           0 :         if (value == NULL) {
   45217           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   45218           0 :                 return -1;
   45219             :         }
   45220           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   45221           0 :         return 0;
   45222             : }
   45223             : 
   45224             : static PyGetSetDef py_srvsvc_NetSrvGetInfo_getsetters[] = {
   45225             :         {
   45226             :                 .name = discard_const_p(char, "in_server_unc"),
   45227             :                 .get = py_srvsvc_NetSrvGetInfo_in_get_server_unc,
   45228             :                 .set = py_srvsvc_NetSrvGetInfo_in_set_server_unc,
   45229             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   45230             :         },
   45231             :         {
   45232             :                 .name = discard_const_p(char, "in_level"),
   45233             :                 .get = py_srvsvc_NetSrvGetInfo_in_get_level,
   45234             :                 .set = py_srvsvc_NetSrvGetInfo_in_set_level,
   45235             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   45236             :         },
   45237             :         {
   45238             :                 .name = discard_const_p(char, "out_info"),
   45239             :                 .get = py_srvsvc_NetSrvGetInfo_out_get_info,
   45240             :                 .set = py_srvsvc_NetSrvGetInfo_out_set_info,
   45241             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetSrvInfo")
   45242             :         },
   45243             :         {
   45244             :                 .name = discard_const_p(char, "result"),
   45245             :                 .get = py_srvsvc_NetSrvGetInfo_get_result,
   45246             :                 .set = py_srvsvc_NetSrvGetInfo_set_result,
   45247             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   45248             :         },
   45249             :         { .name = NULL }
   45250             : };
   45251             : 
   45252           0 : static PyObject *py_srvsvc_NetSrvGetInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   45253             : {
   45254           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetSrvGetInfo, type);
   45255           0 :         struct srvsvc_NetSrvGetInfo *_self = (struct srvsvc_NetSrvGetInfo *)pytalloc_get_ptr(self);
   45256           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   45257           0 :         _self->out.info = talloc_zero(mem_ctx, union srvsvc_NetSrvInfo);
   45258           0 :         return self;
   45259             : }
   45260             : 
   45261           0 : static PyObject *py_srvsvc_NetSrvGetInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   45262             : {
   45263             : 
   45264             : 
   45265           0 :         return PyLong_FromLong(21);
   45266             : }
   45267             : 
   45268           0 : static PyObject *py_srvsvc_NetSrvGetInfo_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   45269             : {
   45270           0 :         const struct ndr_interface_call *call = NULL;
   45271           0 :         struct srvsvc_NetSrvGetInfo *object = (struct srvsvc_NetSrvGetInfo *)pytalloc_get_ptr(py_obj);
   45272           0 :         PyObject *ret = NULL;
   45273           0 :         struct ndr_push *push = NULL;
   45274             :         DATA_BLOB blob;
   45275             :         enum ndr_err_code err;
   45276             : 
   45277           0 :         if (ndr_table_srvsvc.num_calls < 22) {
   45278           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSrvGetInfo_ndr_pack");
   45279           0 :                 return NULL;
   45280             :         }
   45281           0 :         call = &ndr_table_srvsvc.calls[21];
   45282             : 
   45283           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   45284           0 :         if (push == NULL) {
   45285           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   45286           0 :                 return NULL;
   45287             :         }
   45288             : 
   45289           0 :         push->flags |= ndr_push_flags;
   45290             : 
   45291           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   45292           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   45293           0 :                 TALLOC_FREE(push);
   45294           0 :                 PyErr_SetNdrError(err);
   45295           0 :                 return NULL;
   45296             :         }
   45297           0 :         blob = ndr_push_blob(push);
   45298           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   45299           0 :         TALLOC_FREE(push);
   45300           0 :         return ret;
   45301             : }
   45302             : 
   45303           0 : static PyObject *py_srvsvc_NetSrvGetInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   45304             : {
   45305           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   45306           0 :         PyObject *bigendian_obj = NULL;
   45307           0 :         PyObject *ndr64_obj = NULL;
   45308           0 :         uint32_t ndr_push_flags = 0;
   45309             : 
   45310           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   45311             :                 discard_const_p(char *, kwnames),
   45312             :                 &bigendian_obj,
   45313             :                 &ndr64_obj)) {
   45314           0 :                 return NULL;
   45315             :         }
   45316             : 
   45317           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   45318           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   45319             :         }
   45320           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   45321           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   45322             :         }
   45323             : 
   45324           0 :         return py_srvsvc_NetSrvGetInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   45325             : }
   45326             : 
   45327           0 : static PyObject *py_srvsvc_NetSrvGetInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   45328             : {
   45329           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   45330           0 :         PyObject *bigendian_obj = NULL;
   45331           0 :         PyObject *ndr64_obj = NULL;
   45332           0 :         uint32_t ndr_push_flags = 0;
   45333             : 
   45334           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   45335             :                 discard_const_p(char *, kwnames),
   45336             :                 &bigendian_obj,
   45337             :                 &ndr64_obj)) {
   45338           0 :                 return NULL;
   45339             :         }
   45340             : 
   45341           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   45342           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   45343             :         }
   45344           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   45345           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   45346             :         }
   45347             : 
   45348           0 :         return py_srvsvc_NetSrvGetInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   45349             : }
   45350             : 
   45351           0 : static PyObject *py_srvsvc_NetSrvGetInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   45352             : {
   45353           0 :         const struct ndr_interface_call *call = NULL;
   45354           0 :         struct srvsvc_NetSrvGetInfo *object = (struct srvsvc_NetSrvGetInfo *)pytalloc_get_ptr(py_obj);
   45355           0 :         struct ndr_pull *pull = NULL;
   45356             :         enum ndr_err_code err;
   45357             : 
   45358           0 :         if (ndr_table_srvsvc.num_calls < 22) {
   45359           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSrvGetInfo_ndr_unpack");
   45360           0 :                 return NULL;
   45361             :         }
   45362           0 :         call = &ndr_table_srvsvc.calls[21];
   45363             : 
   45364           0 :         pull = ndr_pull_init_blob(blob, object);
   45365           0 :         if (pull == NULL) {
   45366           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   45367           0 :                 return NULL;
   45368             :         }
   45369             : 
   45370           0 :         pull->flags |= ndr_pull_flags;
   45371             : 
   45372           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   45373           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   45374           0 :                 TALLOC_FREE(pull);
   45375           0 :                 PyErr_SetNdrError(err);
   45376           0 :                 return NULL;
   45377             :         }
   45378           0 :         if (!allow_remaining) {
   45379             :                 uint32_t highest_ofs;
   45380             : 
   45381           0 :                 if (pull->offset > pull->relative_highest_offset) {
   45382           0 :                         highest_ofs = pull->offset;
   45383             :                 } else {
   45384           0 :                         highest_ofs = pull->relative_highest_offset;
   45385             :                 }
   45386           0 :                 if (highest_ofs < pull->data_size) {
   45387           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   45388             :                                 "not all bytes consumed ofs[%u] size[%u]",
   45389             :                                 highest_ofs, pull->data_size);
   45390           0 :                         TALLOC_FREE(pull);
   45391           0 :                         PyErr_SetNdrError(err);
   45392           0 :                         return NULL;
   45393             :                 }
   45394             :         }
   45395             : 
   45396           0 :         TALLOC_FREE(pull);
   45397           0 :         Py_RETURN_NONE;
   45398             : }
   45399             : 
   45400           0 : static PyObject *py_srvsvc_NetSrvGetInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   45401             : {
   45402             :         DATA_BLOB blob;
   45403           0 :         Py_ssize_t blob_length = 0;
   45404           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   45405           0 :         PyObject *bigendian_obj = NULL;
   45406           0 :         PyObject *ndr64_obj = NULL;
   45407           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   45408           0 :         PyObject *allow_remaining_obj = NULL;
   45409           0 :         bool allow_remaining = false;
   45410             : 
   45411           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   45412             :                 discard_const_p(char *, kwnames),
   45413             :                 &blob.data, &blob_length,
   45414             :                 &bigendian_obj,
   45415             :                 &ndr64_obj,
   45416             :                 &allow_remaining_obj)) {
   45417           0 :                 return NULL;
   45418             :         }
   45419           0 :         blob.length = blob_length;
   45420             : 
   45421           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   45422           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   45423             :         }
   45424           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   45425           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   45426             :         }
   45427             : 
   45428           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   45429           0 :                 allow_remaining = true;
   45430             :         }
   45431             : 
   45432           0 :         return py_srvsvc_NetSrvGetInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   45433             : }
   45434             : 
   45435           0 : static PyObject *py_srvsvc_NetSrvGetInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   45436             : {
   45437             :         DATA_BLOB blob;
   45438           0 :         Py_ssize_t blob_length = 0;
   45439           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   45440           0 :         PyObject *bigendian_obj = NULL;
   45441           0 :         PyObject *ndr64_obj = NULL;
   45442           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   45443           0 :         PyObject *allow_remaining_obj = NULL;
   45444           0 :         bool allow_remaining = false;
   45445             : 
   45446           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   45447             :                 discard_const_p(char *, kwnames),
   45448             :                 &blob.data, &blob_length,
   45449             :                 &bigendian_obj,
   45450             :                 &ndr64_obj,
   45451             :                 &allow_remaining_obj)) {
   45452           0 :                 return NULL;
   45453             :         }
   45454           0 :         blob.length = blob_length;
   45455             : 
   45456           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   45457           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   45458             :         }
   45459           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   45460           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   45461             :         }
   45462             : 
   45463           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   45464           0 :                 allow_remaining = true;
   45465             :         }
   45466             : 
   45467           0 :         return py_srvsvc_NetSrvGetInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   45468             : }
   45469             : 
   45470           0 : static PyObject *py_srvsvc_NetSrvGetInfo_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   45471             : {
   45472           0 :         const struct ndr_interface_call *call = NULL;
   45473           0 :         struct srvsvc_NetSrvGetInfo *object = (struct srvsvc_NetSrvGetInfo *)pytalloc_get_ptr(py_obj);
   45474             :         PyObject *ret;
   45475             :         char *retstr;
   45476             : 
   45477           0 :         if (ndr_table_srvsvc.num_calls < 22) {
   45478           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSrvGetInfo_ndr_print");
   45479           0 :                 return NULL;
   45480             :         }
   45481           0 :         call = &ndr_table_srvsvc.calls[21];
   45482             : 
   45483           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   45484           0 :         ret = PyUnicode_FromString(retstr);
   45485           0 :         TALLOC_FREE(retstr);
   45486             : 
   45487           0 :         return ret;
   45488             : }
   45489             : 
   45490           0 : static PyObject *py_srvsvc_NetSrvGetInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   45491             : {
   45492           0 :         return py_srvsvc_NetSrvGetInfo_ndr_print(py_obj, "srvsvc_NetSrvGetInfo_in", NDR_IN);
   45493             : }
   45494             : 
   45495           0 : static PyObject *py_srvsvc_NetSrvGetInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   45496             : {
   45497           0 :         return py_srvsvc_NetSrvGetInfo_ndr_print(py_obj, "srvsvc_NetSrvGetInfo_out", NDR_OUT);
   45498             : }
   45499             : 
   45500             : static PyMethodDef py_srvsvc_NetSrvGetInfo_methods[] = {
   45501             :         { "opnum", (PyCFunction)py_srvsvc_NetSrvGetInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
   45502             :                 "srvsvc.NetSrvGetInfo.opnum() -> 21 (0x15) " },
   45503             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSrvGetInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   45504             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   45505             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSrvGetInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   45506             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   45507             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSrvGetInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   45508             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   45509             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSrvGetInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   45510             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   45511             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetSrvGetInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   45512             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetSrvGetInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   45513             :         { NULL, NULL, 0, NULL }
   45514             : };
   45515             : 
   45516             : 
   45517             : static PyTypeObject srvsvc_NetSrvGetInfo_Type = {
   45518             :         PyVarObject_HEAD_INIT(NULL, 0)
   45519             :         .tp_name = "srvsvc.NetSrvGetInfo",
   45520             :         .tp_getset = py_srvsvc_NetSrvGetInfo_getsetters,
   45521             :         .tp_methods = py_srvsvc_NetSrvGetInfo_methods,
   45522             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   45523             :         .tp_new = py_srvsvc_NetSrvGetInfo_new,
   45524             : };
   45525             : 
   45526           1 : static bool pack_py_srvsvc_NetSrvGetInfo_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetSrvGetInfo *r)
   45527             : {
   45528             :         PyObject *py_server_unc;
   45529             :         PyObject *py_level;
   45530           1 :         const char *kwnames[] = {
   45531             :                 "server_unc", "level", NULL
   45532             :         };
   45533             : 
   45534           1 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:srvsvc_NetSrvGetInfo", discard_const_p(char *, kwnames), &py_server_unc, &py_level)) {
   45535           0 :                 return false;
   45536             :         }
   45537             : 
   45538           1 :         if (py_server_unc == NULL) {
   45539           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   45540           0 :                 return false;
   45541             :         }
   45542           1 :         if (py_server_unc == Py_None) {
   45543           0 :                 r->in.server_unc = NULL;
   45544             :         } else {
   45545           1 :                 r->in.server_unc = NULL;
   45546             :                 {
   45547             :                         const char *test_str;
   45548             :                         const char *talloc_str;
   45549           1 :                         PyObject *unicode = NULL;
   45550           1 :                         if (PyUnicode_Check(py_server_unc)) {
   45551           1 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   45552           1 :                                 if (unicode == NULL) {
   45553           0 :                                         PyErr_NoMemory();
   45554           0 :                                         return false;
   45555             :                                 }
   45556           1 :                                 test_str = PyBytes_AS_STRING(unicode);
   45557           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   45558           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   45559             :                         } else {
   45560           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   45561           0 :                                 return false;
   45562             :                         }
   45563           1 :                         talloc_str = talloc_strdup(r, test_str);
   45564           1 :                         if (unicode != NULL) {
   45565           1 :                                 Py_DECREF(unicode);
   45566             :                         }
   45567           1 :                         if (talloc_str == NULL) {
   45568           0 :                                 PyErr_NoMemory();
   45569           0 :                                 return false;
   45570             :                         }
   45571           1 :                         r->in.server_unc = talloc_str;
   45572             :                 }
   45573             :         }
   45574           1 :         if (py_level == NULL) {
   45575           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   45576           0 :                 return false;
   45577             :         }
   45578             :         {
   45579           1 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   45580           1 :                 if (PyLong_Check(py_level)) {
   45581             :                         unsigned long long test_var;
   45582           1 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   45583           1 :                         if (PyErr_Occurred() != NULL) {
   45584           0 :                                 return false;
   45585             :                         }
   45586           1 :                         if (test_var > uint_max) {
   45587           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   45588             :                                   PyLong_Type.tp_name, uint_max, test_var);
   45589           0 :                                 return false;
   45590             :                         }
   45591           1 :                         r->in.level = test_var;
   45592             :                 } else {
   45593           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   45594             :                           PyLong_Type.tp_name);
   45595           0 :                         return false;
   45596             :                 }
   45597             :         }
   45598           1 :         return true;
   45599             : }
   45600             : 
   45601           1 : static PyObject *unpack_py_srvsvc_NetSrvGetInfo_args_out(struct srvsvc_NetSrvGetInfo *r)
   45602             : {
   45603             :         PyObject *result;
   45604             :         PyObject *py_info;
   45605           1 :         py_info = pyrpc_import_union(&srvsvc_NetSrvInfo_Type, r->out.info, r->in.level, r->out.info, "union srvsvc_NetSrvInfo");
   45606           1 :         if (py_info == NULL) {
   45607           0 :                 return NULL;
   45608             :         }
   45609           1 :         result = py_info;
   45610           1 :         if (!W_ERROR_IS_OK(r->out.result)) {
   45611           0 :                 PyErr_SetWERROR(r->out.result);
   45612           0 :                 return NULL;
   45613             :         }
   45614             : 
   45615           1 :         return result;
   45616             : }
   45617             : 
   45618             : 
   45619           0 : static PyObject *py_srvsvc_NetSrvSetInfo_in_get_server_unc(PyObject *obj, void *closure)
   45620             : {
   45621           0 :         struct srvsvc_NetSrvSetInfo *object = (struct srvsvc_NetSrvSetInfo *)pytalloc_get_ptr(obj);
   45622             :         PyObject *py_server_unc;
   45623           0 :         if (object->in.server_unc == NULL) {
   45624           0 :                 Py_RETURN_NONE;
   45625             :         }
   45626           0 :         if (object->in.server_unc == NULL) {
   45627           0 :                 py_server_unc = Py_None;
   45628           0 :                 Py_INCREF(py_server_unc);
   45629             :         } else {
   45630           0 :                 if (object->in.server_unc == NULL) {
   45631           0 :                         py_server_unc = Py_None;
   45632           0 :                         Py_INCREF(py_server_unc);
   45633             :                 } else {
   45634           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   45635             :                 }
   45636             :         }
   45637           0 :         return py_server_unc;
   45638             : }
   45639             : 
   45640           0 : static int py_srvsvc_NetSrvSetInfo_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   45641             : {
   45642           0 :         struct srvsvc_NetSrvSetInfo *object = (struct srvsvc_NetSrvSetInfo *)pytalloc_get_ptr(py_obj);
   45643           0 :         if (value == NULL) {
   45644           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   45645           0 :                 return -1;
   45646             :         }
   45647           0 :         if (value == Py_None) {
   45648           0 :                 object->in.server_unc = NULL;
   45649             :         } else {
   45650           0 :                 object->in.server_unc = NULL;
   45651             :                 {
   45652             :                         const char *test_str;
   45653             :                         const char *talloc_str;
   45654           0 :                         PyObject *unicode = NULL;
   45655           0 :                         if (PyUnicode_Check(value)) {
   45656           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   45657           0 :                                 if (unicode == NULL) {
   45658           0 :                                         PyErr_NoMemory();
   45659           0 :                                         return -1;
   45660             :                                 }
   45661           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   45662           0 :                         } else if (PyBytes_Check(value)) {
   45663           0 :                                 test_str = PyBytes_AS_STRING(value);
   45664             :                         } else {
   45665           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   45666           0 :                                 return -1;
   45667             :                         }
   45668           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   45669           0 :                         if (unicode != NULL) {
   45670           0 :                                 Py_DECREF(unicode);
   45671             :                         }
   45672           0 :                         if (talloc_str == NULL) {
   45673           0 :                                 PyErr_NoMemory();
   45674           0 :                                 return -1;
   45675             :                         }
   45676           0 :                         object->in.server_unc = talloc_str;
   45677             :                 }
   45678             :         }
   45679           0 :         return 0;
   45680             : }
   45681             : 
   45682           0 : static PyObject *py_srvsvc_NetSrvSetInfo_in_get_level(PyObject *obj, void *closure)
   45683             : {
   45684           0 :         struct srvsvc_NetSrvSetInfo *object = (struct srvsvc_NetSrvSetInfo *)pytalloc_get_ptr(obj);
   45685             :         PyObject *py_level;
   45686           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   45687           0 :         return py_level;
   45688             : }
   45689             : 
   45690           0 : static int py_srvsvc_NetSrvSetInfo_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   45691             : {
   45692           0 :         struct srvsvc_NetSrvSetInfo *object = (struct srvsvc_NetSrvSetInfo *)pytalloc_get_ptr(py_obj);
   45693           0 :         if (value == NULL) {
   45694           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   45695           0 :                 return -1;
   45696             :         }
   45697             :         {
   45698           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   45699           0 :                 if (PyLong_Check(value)) {
   45700             :                         unsigned long long test_var;
   45701           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   45702           0 :                         if (PyErr_Occurred() != NULL) {
   45703           0 :                                 return -1;
   45704             :                         }
   45705           0 :                         if (test_var > uint_max) {
   45706           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   45707             :                                   PyLong_Type.tp_name, uint_max, test_var);
   45708           0 :                                 return -1;
   45709             :                         }
   45710           0 :                         object->in.level = test_var;
   45711             :                 } else {
   45712           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   45713             :                           PyLong_Type.tp_name);
   45714           0 :                         return -1;
   45715             :                 }
   45716             :         }
   45717           0 :         return 0;
   45718             : }
   45719             : 
   45720           0 : static PyObject *py_srvsvc_NetSrvSetInfo_in_get_info(PyObject *obj, void *closure)
   45721             : {
   45722           0 :         struct srvsvc_NetSrvSetInfo *object = (struct srvsvc_NetSrvSetInfo *)pytalloc_get_ptr(obj);
   45723             :         PyObject *py_info;
   45724           0 :         if (object->in.info == NULL) {
   45725           0 :                 Py_RETURN_NONE;
   45726             :         }
   45727           0 :         py_info = pyrpc_import_union(&srvsvc_NetSrvInfo_Type, object->in.info, object->in.level, object->in.info, "union srvsvc_NetSrvInfo");
   45728           0 :         if (py_info == NULL) {
   45729           0 :                 return NULL;
   45730             :         }
   45731           0 :         return py_info;
   45732             : }
   45733             : 
   45734           0 : static int py_srvsvc_NetSrvSetInfo_in_set_info(PyObject *py_obj, PyObject *value, void *closure)
   45735             : {
   45736           0 :         struct srvsvc_NetSrvSetInfo *object = (struct srvsvc_NetSrvSetInfo *)pytalloc_get_ptr(py_obj);
   45737           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info));
   45738           0 :         if (value == NULL) {
   45739           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.info");
   45740           0 :                 return -1;
   45741             :         }
   45742           0 :         object->in.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info);
   45743           0 :         if (object->in.info == NULL) {
   45744           0 :                 PyErr_NoMemory();
   45745           0 :                 return -1;
   45746             :         }
   45747             :         {
   45748             :                 union srvsvc_NetSrvInfo *info_switch_1;
   45749           0 :                 info_switch_1 = (union srvsvc_NetSrvInfo *)pyrpc_export_union(&srvsvc_NetSrvInfo_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union srvsvc_NetSrvInfo");
   45750           0 :                 if (info_switch_1 == NULL) {
   45751           0 :                         return -1;
   45752             :                 }
   45753           0 :                 object->in.info = info_switch_1;
   45754             :         }
   45755           0 :         return 0;
   45756             : }
   45757             : 
   45758           0 : static PyObject *py_srvsvc_NetSrvSetInfo_in_get_parm_error(PyObject *obj, void *closure)
   45759             : {
   45760           0 :         struct srvsvc_NetSrvSetInfo *object = (struct srvsvc_NetSrvSetInfo *)pytalloc_get_ptr(obj);
   45761             :         PyObject *py_parm_error;
   45762           0 :         if (object->in.parm_error == NULL) {
   45763           0 :                 Py_RETURN_NONE;
   45764             :         }
   45765           0 :         if (object->in.parm_error == NULL) {
   45766           0 :                 py_parm_error = Py_None;
   45767           0 :                 Py_INCREF(py_parm_error);
   45768             :         } else {
   45769           0 :                 py_parm_error = PyLong_FromUnsignedLongLong((uint32_t)*object->in.parm_error);
   45770             :         }
   45771           0 :         return py_parm_error;
   45772             : }
   45773             : 
   45774           0 : static int py_srvsvc_NetSrvSetInfo_in_set_parm_error(PyObject *py_obj, PyObject *value, void *closure)
   45775             : {
   45776           0 :         struct srvsvc_NetSrvSetInfo *object = (struct srvsvc_NetSrvSetInfo *)pytalloc_get_ptr(py_obj);
   45777           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.parm_error));
   45778           0 :         if (value == NULL) {
   45779           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.parm_error");
   45780           0 :                 return -1;
   45781             :         }
   45782           0 :         if (value == Py_None) {
   45783           0 :                 object->in.parm_error = NULL;
   45784             :         } else {
   45785           0 :                 object->in.parm_error = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.parm_error);
   45786           0 :                 if (object->in.parm_error == NULL) {
   45787           0 :                         PyErr_NoMemory();
   45788           0 :                         return -1;
   45789             :                 }
   45790             :                 {
   45791           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.parm_error));
   45792           0 :                         if (PyLong_Check(value)) {
   45793             :                                 unsigned long long test_var;
   45794           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   45795           0 :                                 if (PyErr_Occurred() != NULL) {
   45796           0 :                                         return -1;
   45797             :                                 }
   45798           0 :                                 if (test_var > uint_max) {
   45799           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   45800             :                                           PyLong_Type.tp_name, uint_max, test_var);
   45801           0 :                                         return -1;
   45802             :                                 }
   45803           0 :                                 *object->in.parm_error = test_var;
   45804             :                         } else {
   45805           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   45806             :                                   PyLong_Type.tp_name);
   45807           0 :                                 return -1;
   45808             :                         }
   45809             :                 }
   45810             :         }
   45811           0 :         return 0;
   45812             : }
   45813             : 
   45814           0 : static PyObject *py_srvsvc_NetSrvSetInfo_out_get_parm_error(PyObject *obj, void *closure)
   45815             : {
   45816           0 :         struct srvsvc_NetSrvSetInfo *object = (struct srvsvc_NetSrvSetInfo *)pytalloc_get_ptr(obj);
   45817             :         PyObject *py_parm_error;
   45818           0 :         if (object->out.parm_error == NULL) {
   45819           0 :                 Py_RETURN_NONE;
   45820             :         }
   45821           0 :         if (object->out.parm_error == NULL) {
   45822           0 :                 py_parm_error = Py_None;
   45823           0 :                 Py_INCREF(py_parm_error);
   45824             :         } else {
   45825           0 :                 py_parm_error = PyLong_FromUnsignedLongLong((uint32_t)*object->out.parm_error);
   45826             :         }
   45827           0 :         return py_parm_error;
   45828             : }
   45829             : 
   45830           0 : static int py_srvsvc_NetSrvSetInfo_out_set_parm_error(PyObject *py_obj, PyObject *value, void *closure)
   45831             : {
   45832           0 :         struct srvsvc_NetSrvSetInfo *object = (struct srvsvc_NetSrvSetInfo *)pytalloc_get_ptr(py_obj);
   45833           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.parm_error));
   45834           0 :         if (value == NULL) {
   45835           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.parm_error");
   45836           0 :                 return -1;
   45837             :         }
   45838           0 :         if (value == Py_None) {
   45839           0 :                 object->out.parm_error = NULL;
   45840             :         } else {
   45841           0 :                 object->out.parm_error = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.parm_error);
   45842           0 :                 if (object->out.parm_error == NULL) {
   45843           0 :                         PyErr_NoMemory();
   45844           0 :                         return -1;
   45845             :                 }
   45846             :                 {
   45847           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.parm_error));
   45848           0 :                         if (PyLong_Check(value)) {
   45849             :                                 unsigned long long test_var;
   45850           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   45851           0 :                                 if (PyErr_Occurred() != NULL) {
   45852           0 :                                         return -1;
   45853             :                                 }
   45854           0 :                                 if (test_var > uint_max) {
   45855           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   45856             :                                           PyLong_Type.tp_name, uint_max, test_var);
   45857           0 :                                         return -1;
   45858             :                                 }
   45859           0 :                                 *object->out.parm_error = test_var;
   45860             :                         } else {
   45861           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   45862             :                                   PyLong_Type.tp_name);
   45863           0 :                                 return -1;
   45864             :                         }
   45865             :                 }
   45866             :         }
   45867           0 :         return 0;
   45868             : }
   45869             : 
   45870           0 : static PyObject *py_srvsvc_NetSrvSetInfo_get_result(PyObject *obj, void *closure)
   45871             : {
   45872           0 :         struct srvsvc_NetSrvSetInfo *object = (struct srvsvc_NetSrvSetInfo *)pytalloc_get_ptr(obj);
   45873             :         PyObject *py_result;
   45874           0 :         py_result = PyErr_FromWERROR(object->out.result);
   45875           0 :         return py_result;
   45876             : }
   45877             : 
   45878           0 : static int py_srvsvc_NetSrvSetInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
   45879             : {
   45880           0 :         struct srvsvc_NetSrvSetInfo *object = (struct srvsvc_NetSrvSetInfo *)pytalloc_get_ptr(py_obj);
   45881           0 :         if (value == NULL) {
   45882           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   45883           0 :                 return -1;
   45884             :         }
   45885           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   45886           0 :         return 0;
   45887             : }
   45888             : 
   45889             : static PyGetSetDef py_srvsvc_NetSrvSetInfo_getsetters[] = {
   45890             :         {
   45891             :                 .name = discard_const_p(char, "in_server_unc"),
   45892             :                 .get = py_srvsvc_NetSrvSetInfo_in_get_server_unc,
   45893             :                 .set = py_srvsvc_NetSrvSetInfo_in_set_server_unc,
   45894             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   45895             :         },
   45896             :         {
   45897             :                 .name = discard_const_p(char, "in_level"),
   45898             :                 .get = py_srvsvc_NetSrvSetInfo_in_get_level,
   45899             :                 .set = py_srvsvc_NetSrvSetInfo_in_set_level,
   45900             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   45901             :         },
   45902             :         {
   45903             :                 .name = discard_const_p(char, "in_info"),
   45904             :                 .get = py_srvsvc_NetSrvSetInfo_in_get_info,
   45905             :                 .set = py_srvsvc_NetSrvSetInfo_in_set_info,
   45906             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetSrvInfo")
   45907             :         },
   45908             :         {
   45909             :                 .name = discard_const_p(char, "in_parm_error"),
   45910             :                 .get = py_srvsvc_NetSrvSetInfo_in_get_parm_error,
   45911             :                 .set = py_srvsvc_NetSrvSetInfo_in_set_parm_error,
   45912             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   45913             :         },
   45914             :         {
   45915             :                 .name = discard_const_p(char, "out_parm_error"),
   45916             :                 .get = py_srvsvc_NetSrvSetInfo_out_get_parm_error,
   45917             :                 .set = py_srvsvc_NetSrvSetInfo_out_set_parm_error,
   45918             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   45919             :         },
   45920             :         {
   45921             :                 .name = discard_const_p(char, "result"),
   45922             :                 .get = py_srvsvc_NetSrvSetInfo_get_result,
   45923             :                 .set = py_srvsvc_NetSrvSetInfo_set_result,
   45924             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   45925             :         },
   45926             :         { .name = NULL }
   45927             : };
   45928             : 
   45929           0 : static PyObject *py_srvsvc_NetSrvSetInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   45930             : {
   45931           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetSrvSetInfo, type);
   45932           0 :         struct srvsvc_NetSrvSetInfo *_self = (struct srvsvc_NetSrvSetInfo *)pytalloc_get_ptr(self);
   45933           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   45934           0 :         _self->in.info = talloc_zero(mem_ctx, union srvsvc_NetSrvInfo);
   45935           0 :         return self;
   45936             : }
   45937             : 
   45938           0 : static PyObject *py_srvsvc_NetSrvSetInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   45939             : {
   45940             : 
   45941             : 
   45942           0 :         return PyLong_FromLong(22);
   45943             : }
   45944             : 
   45945           0 : static PyObject *py_srvsvc_NetSrvSetInfo_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   45946             : {
   45947           0 :         const struct ndr_interface_call *call = NULL;
   45948           0 :         struct srvsvc_NetSrvSetInfo *object = (struct srvsvc_NetSrvSetInfo *)pytalloc_get_ptr(py_obj);
   45949           0 :         PyObject *ret = NULL;
   45950           0 :         struct ndr_push *push = NULL;
   45951             :         DATA_BLOB blob;
   45952             :         enum ndr_err_code err;
   45953             : 
   45954           0 :         if (ndr_table_srvsvc.num_calls < 23) {
   45955           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSrvSetInfo_ndr_pack");
   45956           0 :                 return NULL;
   45957             :         }
   45958           0 :         call = &ndr_table_srvsvc.calls[22];
   45959             : 
   45960           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   45961           0 :         if (push == NULL) {
   45962           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   45963           0 :                 return NULL;
   45964             :         }
   45965             : 
   45966           0 :         push->flags |= ndr_push_flags;
   45967             : 
   45968           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   45969           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   45970           0 :                 TALLOC_FREE(push);
   45971           0 :                 PyErr_SetNdrError(err);
   45972           0 :                 return NULL;
   45973             :         }
   45974           0 :         blob = ndr_push_blob(push);
   45975           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   45976           0 :         TALLOC_FREE(push);
   45977           0 :         return ret;
   45978             : }
   45979             : 
   45980           0 : static PyObject *py_srvsvc_NetSrvSetInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   45981             : {
   45982           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   45983           0 :         PyObject *bigendian_obj = NULL;
   45984           0 :         PyObject *ndr64_obj = NULL;
   45985           0 :         uint32_t ndr_push_flags = 0;
   45986             : 
   45987           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   45988             :                 discard_const_p(char *, kwnames),
   45989             :                 &bigendian_obj,
   45990             :                 &ndr64_obj)) {
   45991           0 :                 return NULL;
   45992             :         }
   45993             : 
   45994           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   45995           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   45996             :         }
   45997           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   45998           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   45999             :         }
   46000             : 
   46001           0 :         return py_srvsvc_NetSrvSetInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   46002             : }
   46003             : 
   46004           0 : static PyObject *py_srvsvc_NetSrvSetInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46005             : {
   46006           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   46007           0 :         PyObject *bigendian_obj = NULL;
   46008           0 :         PyObject *ndr64_obj = NULL;
   46009           0 :         uint32_t ndr_push_flags = 0;
   46010             : 
   46011           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   46012             :                 discard_const_p(char *, kwnames),
   46013             :                 &bigendian_obj,
   46014             :                 &ndr64_obj)) {
   46015           0 :                 return NULL;
   46016             :         }
   46017             : 
   46018           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46019           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   46020             :         }
   46021           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   46022           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   46023             :         }
   46024             : 
   46025           0 :         return py_srvsvc_NetSrvSetInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   46026             : }
   46027             : 
   46028           0 : static PyObject *py_srvsvc_NetSrvSetInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   46029             : {
   46030           0 :         const struct ndr_interface_call *call = NULL;
   46031           0 :         struct srvsvc_NetSrvSetInfo *object = (struct srvsvc_NetSrvSetInfo *)pytalloc_get_ptr(py_obj);
   46032           0 :         struct ndr_pull *pull = NULL;
   46033             :         enum ndr_err_code err;
   46034             : 
   46035           0 :         if (ndr_table_srvsvc.num_calls < 23) {
   46036           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSrvSetInfo_ndr_unpack");
   46037           0 :                 return NULL;
   46038             :         }
   46039           0 :         call = &ndr_table_srvsvc.calls[22];
   46040             : 
   46041           0 :         pull = ndr_pull_init_blob(blob, object);
   46042           0 :         if (pull == NULL) {
   46043           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   46044           0 :                 return NULL;
   46045             :         }
   46046             : 
   46047           0 :         pull->flags |= ndr_pull_flags;
   46048             : 
   46049           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   46050           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   46051           0 :                 TALLOC_FREE(pull);
   46052           0 :                 PyErr_SetNdrError(err);
   46053           0 :                 return NULL;
   46054             :         }
   46055           0 :         if (!allow_remaining) {
   46056             :                 uint32_t highest_ofs;
   46057             : 
   46058           0 :                 if (pull->offset > pull->relative_highest_offset) {
   46059           0 :                         highest_ofs = pull->offset;
   46060             :                 } else {
   46061           0 :                         highest_ofs = pull->relative_highest_offset;
   46062             :                 }
   46063           0 :                 if (highest_ofs < pull->data_size) {
   46064           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   46065             :                                 "not all bytes consumed ofs[%u] size[%u]",
   46066             :                                 highest_ofs, pull->data_size);
   46067           0 :                         TALLOC_FREE(pull);
   46068           0 :                         PyErr_SetNdrError(err);
   46069           0 :                         return NULL;
   46070             :                 }
   46071             :         }
   46072             : 
   46073           0 :         TALLOC_FREE(pull);
   46074           0 :         Py_RETURN_NONE;
   46075             : }
   46076             : 
   46077           0 : static PyObject *py_srvsvc_NetSrvSetInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46078             : {
   46079             :         DATA_BLOB blob;
   46080           0 :         Py_ssize_t blob_length = 0;
   46081           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   46082           0 :         PyObject *bigendian_obj = NULL;
   46083           0 :         PyObject *ndr64_obj = NULL;
   46084           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   46085           0 :         PyObject *allow_remaining_obj = NULL;
   46086           0 :         bool allow_remaining = false;
   46087             : 
   46088           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   46089             :                 discard_const_p(char *, kwnames),
   46090             :                 &blob.data, &blob_length,
   46091             :                 &bigendian_obj,
   46092             :                 &ndr64_obj,
   46093             :                 &allow_remaining_obj)) {
   46094           0 :                 return NULL;
   46095             :         }
   46096           0 :         blob.length = blob_length;
   46097             : 
   46098           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46099           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   46100             :         }
   46101           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   46102           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   46103             :         }
   46104             : 
   46105           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   46106           0 :                 allow_remaining = true;
   46107             :         }
   46108             : 
   46109           0 :         return py_srvsvc_NetSrvSetInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   46110             : }
   46111             : 
   46112           0 : static PyObject *py_srvsvc_NetSrvSetInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46113             : {
   46114             :         DATA_BLOB blob;
   46115           0 :         Py_ssize_t blob_length = 0;
   46116           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   46117           0 :         PyObject *bigendian_obj = NULL;
   46118           0 :         PyObject *ndr64_obj = NULL;
   46119           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   46120           0 :         PyObject *allow_remaining_obj = NULL;
   46121           0 :         bool allow_remaining = false;
   46122             : 
   46123           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   46124             :                 discard_const_p(char *, kwnames),
   46125             :                 &blob.data, &blob_length,
   46126             :                 &bigendian_obj,
   46127             :                 &ndr64_obj,
   46128             :                 &allow_remaining_obj)) {
   46129           0 :                 return NULL;
   46130             :         }
   46131           0 :         blob.length = blob_length;
   46132             : 
   46133           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46134           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   46135             :         }
   46136           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   46137           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   46138             :         }
   46139             : 
   46140           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   46141           0 :                 allow_remaining = true;
   46142             :         }
   46143             : 
   46144           0 :         return py_srvsvc_NetSrvSetInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   46145             : }
   46146             : 
   46147           0 : static PyObject *py_srvsvc_NetSrvSetInfo_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   46148             : {
   46149           0 :         const struct ndr_interface_call *call = NULL;
   46150           0 :         struct srvsvc_NetSrvSetInfo *object = (struct srvsvc_NetSrvSetInfo *)pytalloc_get_ptr(py_obj);
   46151             :         PyObject *ret;
   46152             :         char *retstr;
   46153             : 
   46154           0 :         if (ndr_table_srvsvc.num_calls < 23) {
   46155           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSrvSetInfo_ndr_print");
   46156           0 :                 return NULL;
   46157             :         }
   46158           0 :         call = &ndr_table_srvsvc.calls[22];
   46159             : 
   46160           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   46161           0 :         ret = PyUnicode_FromString(retstr);
   46162           0 :         TALLOC_FREE(retstr);
   46163             : 
   46164           0 :         return ret;
   46165             : }
   46166             : 
   46167           0 : static PyObject *py_srvsvc_NetSrvSetInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   46168             : {
   46169           0 :         return py_srvsvc_NetSrvSetInfo_ndr_print(py_obj, "srvsvc_NetSrvSetInfo_in", NDR_IN);
   46170             : }
   46171             : 
   46172           0 : static PyObject *py_srvsvc_NetSrvSetInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   46173             : {
   46174           0 :         return py_srvsvc_NetSrvSetInfo_ndr_print(py_obj, "srvsvc_NetSrvSetInfo_out", NDR_OUT);
   46175             : }
   46176             : 
   46177             : static PyMethodDef py_srvsvc_NetSrvSetInfo_methods[] = {
   46178             :         { "opnum", (PyCFunction)py_srvsvc_NetSrvSetInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
   46179             :                 "srvsvc.NetSrvSetInfo.opnum() -> 22 (0x16) " },
   46180             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSrvSetInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   46181             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   46182             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSrvSetInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   46183             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   46184             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSrvSetInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   46185             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   46186             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSrvSetInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   46187             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   46188             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetSrvSetInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   46189             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetSrvSetInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   46190             :         { NULL, NULL, 0, NULL }
   46191             : };
   46192             : 
   46193             : 
   46194             : static PyTypeObject srvsvc_NetSrvSetInfo_Type = {
   46195             :         PyVarObject_HEAD_INIT(NULL, 0)
   46196             :         .tp_name = "srvsvc.NetSrvSetInfo",
   46197             :         .tp_getset = py_srvsvc_NetSrvSetInfo_getsetters,
   46198             :         .tp_methods = py_srvsvc_NetSrvSetInfo_methods,
   46199             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   46200             :         .tp_new = py_srvsvc_NetSrvSetInfo_new,
   46201             : };
   46202             : 
   46203           0 : static bool pack_py_srvsvc_NetSrvSetInfo_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetSrvSetInfo *r)
   46204             : {
   46205             :         PyObject *py_server_unc;
   46206             :         PyObject *py_level;
   46207             :         PyObject *py_info;
   46208             :         PyObject *py_parm_error;
   46209           0 :         const char *kwnames[] = {
   46210             :                 "server_unc", "level", "info", "parm_error", NULL
   46211             :         };
   46212             : 
   46213           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetSrvSetInfo", discard_const_p(char *, kwnames), &py_server_unc, &py_level, &py_info, &py_parm_error)) {
   46214           0 :                 return false;
   46215             :         }
   46216             : 
   46217           0 :         if (py_server_unc == NULL) {
   46218           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   46219           0 :                 return false;
   46220             :         }
   46221           0 :         if (py_server_unc == Py_None) {
   46222           0 :                 r->in.server_unc = NULL;
   46223             :         } else {
   46224           0 :                 r->in.server_unc = NULL;
   46225             :                 {
   46226             :                         const char *test_str;
   46227             :                         const char *talloc_str;
   46228           0 :                         PyObject *unicode = NULL;
   46229           0 :                         if (PyUnicode_Check(py_server_unc)) {
   46230           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   46231           0 :                                 if (unicode == NULL) {
   46232           0 :                                         PyErr_NoMemory();
   46233           0 :                                         return false;
   46234             :                                 }
   46235           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   46236           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   46237           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   46238             :                         } else {
   46239           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   46240           0 :                                 return false;
   46241             :                         }
   46242           0 :                         talloc_str = talloc_strdup(r, test_str);
   46243           0 :                         if (unicode != NULL) {
   46244           0 :                                 Py_DECREF(unicode);
   46245             :                         }
   46246           0 :                         if (talloc_str == NULL) {
   46247           0 :                                 PyErr_NoMemory();
   46248           0 :                                 return false;
   46249             :                         }
   46250           0 :                         r->in.server_unc = talloc_str;
   46251             :                 }
   46252             :         }
   46253           0 :         if (py_level == NULL) {
   46254           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   46255           0 :                 return false;
   46256             :         }
   46257             :         {
   46258           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   46259           0 :                 if (PyLong_Check(py_level)) {
   46260             :                         unsigned long long test_var;
   46261           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   46262           0 :                         if (PyErr_Occurred() != NULL) {
   46263           0 :                                 return false;
   46264             :                         }
   46265           0 :                         if (test_var > uint_max) {
   46266           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   46267             :                                   PyLong_Type.tp_name, uint_max, test_var);
   46268           0 :                                 return false;
   46269             :                         }
   46270           0 :                         r->in.level = test_var;
   46271             :                 } else {
   46272           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   46273             :                           PyLong_Type.tp_name);
   46274           0 :                         return false;
   46275             :                 }
   46276             :         }
   46277           0 :         if (py_info == NULL) {
   46278           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info");
   46279           0 :                 return false;
   46280             :         }
   46281           0 :         r->in.info = talloc_ptrtype(r, r->in.info);
   46282           0 :         if (r->in.info == NULL) {
   46283           0 :                 PyErr_NoMemory();
   46284           0 :                 return false;
   46285             :         }
   46286             :         {
   46287             :                 union srvsvc_NetSrvInfo *info_switch_1;
   46288           0 :                 info_switch_1 = (union srvsvc_NetSrvInfo *)pyrpc_export_union(&srvsvc_NetSrvInfo_Type, r, r->in.level, py_info, "union srvsvc_NetSrvInfo");
   46289           0 :                 if (info_switch_1 == NULL) {
   46290           0 :                         return false;
   46291             :                 }
   46292           0 :                 r->in.info = info_switch_1;
   46293             :         }
   46294           0 :         if (py_parm_error == NULL) {
   46295           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.parm_error");
   46296           0 :                 return false;
   46297             :         }
   46298           0 :         if (py_parm_error == Py_None) {
   46299           0 :                 r->in.parm_error = NULL;
   46300             :         } else {
   46301           0 :                 r->in.parm_error = talloc_ptrtype(r, r->in.parm_error);
   46302           0 :                 if (r->in.parm_error == NULL) {
   46303           0 :                         PyErr_NoMemory();
   46304           0 :                         return false;
   46305             :                 }
   46306             :                 {
   46307           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.parm_error));
   46308           0 :                         if (PyLong_Check(py_parm_error)) {
   46309             :                                 unsigned long long test_var;
   46310           0 :                                 test_var = PyLong_AsUnsignedLongLong(py_parm_error);
   46311           0 :                                 if (PyErr_Occurred() != NULL) {
   46312           0 :                                         return false;
   46313             :                                 }
   46314           0 :                                 if (test_var > uint_max) {
   46315           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   46316             :                                           PyLong_Type.tp_name, uint_max, test_var);
   46317           0 :                                         return false;
   46318             :                                 }
   46319           0 :                                 *r->in.parm_error = test_var;
   46320             :                         } else {
   46321           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   46322             :                                   PyLong_Type.tp_name);
   46323           0 :                                 return false;
   46324             :                         }
   46325             :                 }
   46326             :         }
   46327           0 :         return true;
   46328             : }
   46329             : 
   46330           0 : static PyObject *unpack_py_srvsvc_NetSrvSetInfo_args_out(struct srvsvc_NetSrvSetInfo *r)
   46331             : {
   46332             :         PyObject *result;
   46333             :         PyObject *py_parm_error;
   46334           0 :         if (r->out.parm_error == NULL) {
   46335           0 :                 py_parm_error = Py_None;
   46336           0 :                 Py_INCREF(py_parm_error);
   46337             :         } else {
   46338           0 :                 py_parm_error = PyLong_FromUnsignedLongLong((uint32_t)*r->out.parm_error);
   46339             :         }
   46340           0 :         result = py_parm_error;
   46341           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   46342           0 :                 PyErr_SetWERROR(r->out.result);
   46343           0 :                 return NULL;
   46344             :         }
   46345             : 
   46346           0 :         return result;
   46347             : }
   46348             : 
   46349             : 
   46350           0 : static PyObject *py_srvsvc_NetDiskEnum_in_get_server_unc(PyObject *obj, void *closure)
   46351             : {
   46352           0 :         struct srvsvc_NetDiskEnum *object = (struct srvsvc_NetDiskEnum *)pytalloc_get_ptr(obj);
   46353             :         PyObject *py_server_unc;
   46354           0 :         if (object->in.server_unc == NULL) {
   46355           0 :                 Py_RETURN_NONE;
   46356             :         }
   46357           0 :         if (object->in.server_unc == NULL) {
   46358           0 :                 py_server_unc = Py_None;
   46359           0 :                 Py_INCREF(py_server_unc);
   46360             :         } else {
   46361           0 :                 if (object->in.server_unc == NULL) {
   46362           0 :                         py_server_unc = Py_None;
   46363           0 :                         Py_INCREF(py_server_unc);
   46364             :                 } else {
   46365           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   46366             :                 }
   46367             :         }
   46368           0 :         return py_server_unc;
   46369             : }
   46370             : 
   46371           0 : static int py_srvsvc_NetDiskEnum_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   46372             : {
   46373           0 :         struct srvsvc_NetDiskEnum *object = (struct srvsvc_NetDiskEnum *)pytalloc_get_ptr(py_obj);
   46374           0 :         if (value == NULL) {
   46375           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   46376           0 :                 return -1;
   46377             :         }
   46378           0 :         if (value == Py_None) {
   46379           0 :                 object->in.server_unc = NULL;
   46380             :         } else {
   46381           0 :                 object->in.server_unc = NULL;
   46382             :                 {
   46383             :                         const char *test_str;
   46384             :                         const char *talloc_str;
   46385           0 :                         PyObject *unicode = NULL;
   46386           0 :                         if (PyUnicode_Check(value)) {
   46387           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   46388           0 :                                 if (unicode == NULL) {
   46389           0 :                                         PyErr_NoMemory();
   46390           0 :                                         return -1;
   46391             :                                 }
   46392           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   46393           0 :                         } else if (PyBytes_Check(value)) {
   46394           0 :                                 test_str = PyBytes_AS_STRING(value);
   46395             :                         } else {
   46396           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   46397           0 :                                 return -1;
   46398             :                         }
   46399           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   46400           0 :                         if (unicode != NULL) {
   46401           0 :                                 Py_DECREF(unicode);
   46402             :                         }
   46403           0 :                         if (talloc_str == NULL) {
   46404           0 :                                 PyErr_NoMemory();
   46405           0 :                                 return -1;
   46406             :                         }
   46407           0 :                         object->in.server_unc = talloc_str;
   46408             :                 }
   46409             :         }
   46410           0 :         return 0;
   46411             : }
   46412             : 
   46413           0 : static PyObject *py_srvsvc_NetDiskEnum_in_get_level(PyObject *obj, void *closure)
   46414             : {
   46415           0 :         struct srvsvc_NetDiskEnum *object = (struct srvsvc_NetDiskEnum *)pytalloc_get_ptr(obj);
   46416             :         PyObject *py_level;
   46417           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   46418           0 :         return py_level;
   46419             : }
   46420             : 
   46421           0 : static int py_srvsvc_NetDiskEnum_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   46422             : {
   46423           0 :         struct srvsvc_NetDiskEnum *object = (struct srvsvc_NetDiskEnum *)pytalloc_get_ptr(py_obj);
   46424           0 :         if (value == NULL) {
   46425           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   46426           0 :                 return -1;
   46427             :         }
   46428             :         {
   46429           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   46430           0 :                 if (PyLong_Check(value)) {
   46431             :                         unsigned long long test_var;
   46432           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   46433           0 :                         if (PyErr_Occurred() != NULL) {
   46434           0 :                                 return -1;
   46435             :                         }
   46436           0 :                         if (test_var > uint_max) {
   46437           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   46438             :                                   PyLong_Type.tp_name, uint_max, test_var);
   46439           0 :                                 return -1;
   46440             :                         }
   46441           0 :                         object->in.level = test_var;
   46442             :                 } else {
   46443           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   46444             :                           PyLong_Type.tp_name);
   46445           0 :                         return -1;
   46446             :                 }
   46447             :         }
   46448           0 :         return 0;
   46449             : }
   46450             : 
   46451           0 : static PyObject *py_srvsvc_NetDiskEnum_in_get_info(PyObject *obj, void *closure)
   46452             : {
   46453           0 :         struct srvsvc_NetDiskEnum *object = (struct srvsvc_NetDiskEnum *)pytalloc_get_ptr(obj);
   46454             :         PyObject *py_info;
   46455           0 :         if (object->in.info == NULL) {
   46456           0 :                 Py_RETURN_NONE;
   46457             :         }
   46458           0 :         py_info = pytalloc_reference_ex(&srvsvc_NetDiskInfo_Type, object->in.info, object->in.info);
   46459           0 :         return py_info;
   46460             : }
   46461             : 
   46462           0 : static int py_srvsvc_NetDiskEnum_in_set_info(PyObject *py_obj, PyObject *value, void *closure)
   46463             : {
   46464           0 :         struct srvsvc_NetDiskEnum *object = (struct srvsvc_NetDiskEnum *)pytalloc_get_ptr(py_obj);
   46465           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info));
   46466           0 :         if (value == NULL) {
   46467           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.info");
   46468           0 :                 return -1;
   46469             :         }
   46470           0 :         object->in.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info);
   46471           0 :         if (object->in.info == NULL) {
   46472           0 :                 PyErr_NoMemory();
   46473           0 :                 return -1;
   46474             :         }
   46475           0 :         PY_CHECK_TYPE(&srvsvc_NetDiskInfo_Type, value, return -1;);
   46476           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   46477           0 :                 PyErr_NoMemory();
   46478           0 :                 return -1;
   46479             :         }
   46480           0 :         object->in.info = (struct srvsvc_NetDiskInfo *)pytalloc_get_ptr(value);
   46481           0 :         return 0;
   46482             : }
   46483             : 
   46484           0 : static PyObject *py_srvsvc_NetDiskEnum_out_get_info(PyObject *obj, void *closure)
   46485             : {
   46486           0 :         struct srvsvc_NetDiskEnum *object = (struct srvsvc_NetDiskEnum *)pytalloc_get_ptr(obj);
   46487             :         PyObject *py_info;
   46488           0 :         if (object->out.info == NULL) {
   46489           0 :                 Py_RETURN_NONE;
   46490             :         }
   46491           0 :         py_info = pytalloc_reference_ex(&srvsvc_NetDiskInfo_Type, object->out.info, object->out.info);
   46492           0 :         return py_info;
   46493             : }
   46494             : 
   46495           0 : static int py_srvsvc_NetDiskEnum_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   46496             : {
   46497           0 :         struct srvsvc_NetDiskEnum *object = (struct srvsvc_NetDiskEnum *)pytalloc_get_ptr(py_obj);
   46498           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   46499           0 :         if (value == NULL) {
   46500           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info");
   46501           0 :                 return -1;
   46502             :         }
   46503           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   46504           0 :         if (object->out.info == NULL) {
   46505           0 :                 PyErr_NoMemory();
   46506           0 :                 return -1;
   46507             :         }
   46508           0 :         PY_CHECK_TYPE(&srvsvc_NetDiskInfo_Type, value, return -1;);
   46509           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   46510           0 :                 PyErr_NoMemory();
   46511           0 :                 return -1;
   46512             :         }
   46513           0 :         object->out.info = (struct srvsvc_NetDiskInfo *)pytalloc_get_ptr(value);
   46514           0 :         return 0;
   46515             : }
   46516             : 
   46517           0 : static PyObject *py_srvsvc_NetDiskEnum_in_get_maxlen(PyObject *obj, void *closure)
   46518             : {
   46519           0 :         struct srvsvc_NetDiskEnum *object = (struct srvsvc_NetDiskEnum *)pytalloc_get_ptr(obj);
   46520             :         PyObject *py_maxlen;
   46521           0 :         py_maxlen = PyLong_FromUnsignedLongLong((uint32_t)object->in.maxlen);
   46522           0 :         return py_maxlen;
   46523             : }
   46524             : 
   46525           0 : static int py_srvsvc_NetDiskEnum_in_set_maxlen(PyObject *py_obj, PyObject *value, void *closure)
   46526             : {
   46527           0 :         struct srvsvc_NetDiskEnum *object = (struct srvsvc_NetDiskEnum *)pytalloc_get_ptr(py_obj);
   46528           0 :         if (value == NULL) {
   46529           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.maxlen");
   46530           0 :                 return -1;
   46531             :         }
   46532             :         {
   46533           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.maxlen));
   46534           0 :                 if (PyLong_Check(value)) {
   46535             :                         unsigned long long test_var;
   46536           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   46537           0 :                         if (PyErr_Occurred() != NULL) {
   46538           0 :                                 return -1;
   46539             :                         }
   46540           0 :                         if (test_var > uint_max) {
   46541           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   46542             :                                   PyLong_Type.tp_name, uint_max, test_var);
   46543           0 :                                 return -1;
   46544             :                         }
   46545           0 :                         object->in.maxlen = test_var;
   46546             :                 } else {
   46547           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   46548             :                           PyLong_Type.tp_name);
   46549           0 :                         return -1;
   46550             :                 }
   46551             :         }
   46552           0 :         return 0;
   46553             : }
   46554             : 
   46555           0 : static PyObject *py_srvsvc_NetDiskEnum_out_get_totalentries(PyObject *obj, void *closure)
   46556             : {
   46557           0 :         struct srvsvc_NetDiskEnum *object = (struct srvsvc_NetDiskEnum *)pytalloc_get_ptr(obj);
   46558             :         PyObject *py_totalentries;
   46559           0 :         if (object->out.totalentries == NULL) {
   46560           0 :                 Py_RETURN_NONE;
   46561             :         }
   46562           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)*object->out.totalentries);
   46563           0 :         return py_totalentries;
   46564             : }
   46565             : 
   46566           0 : static int py_srvsvc_NetDiskEnum_out_set_totalentries(PyObject *py_obj, PyObject *value, void *closure)
   46567             : {
   46568           0 :         struct srvsvc_NetDiskEnum *object = (struct srvsvc_NetDiskEnum *)pytalloc_get_ptr(py_obj);
   46569           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.totalentries));
   46570           0 :         if (value == NULL) {
   46571           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.totalentries");
   46572           0 :                 return -1;
   46573             :         }
   46574           0 :         object->out.totalentries = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.totalentries);
   46575           0 :         if (object->out.totalentries == NULL) {
   46576           0 :                 PyErr_NoMemory();
   46577           0 :                 return -1;
   46578             :         }
   46579             :         {
   46580           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.totalentries));
   46581           0 :                 if (PyLong_Check(value)) {
   46582             :                         unsigned long long test_var;
   46583           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   46584           0 :                         if (PyErr_Occurred() != NULL) {
   46585           0 :                                 return -1;
   46586             :                         }
   46587           0 :                         if (test_var > uint_max) {
   46588           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   46589             :                                   PyLong_Type.tp_name, uint_max, test_var);
   46590           0 :                                 return -1;
   46591             :                         }
   46592           0 :                         *object->out.totalentries = test_var;
   46593             :                 } else {
   46594           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   46595             :                           PyLong_Type.tp_name);
   46596           0 :                         return -1;
   46597             :                 }
   46598             :         }
   46599           0 :         return 0;
   46600             : }
   46601             : 
   46602           0 : static PyObject *py_srvsvc_NetDiskEnum_in_get_resume_handle(PyObject *obj, void *closure)
   46603             : {
   46604           0 :         struct srvsvc_NetDiskEnum *object = (struct srvsvc_NetDiskEnum *)pytalloc_get_ptr(obj);
   46605             :         PyObject *py_resume_handle;
   46606           0 :         if (object->in.resume_handle == NULL) {
   46607           0 :                 Py_RETURN_NONE;
   46608             :         }
   46609           0 :         if (object->in.resume_handle == NULL) {
   46610           0 :                 py_resume_handle = Py_None;
   46611           0 :                 Py_INCREF(py_resume_handle);
   46612             :         } else {
   46613           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)*object->in.resume_handle);
   46614             :         }
   46615           0 :         return py_resume_handle;
   46616             : }
   46617             : 
   46618           0 : static int py_srvsvc_NetDiskEnum_in_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   46619             : {
   46620           0 :         struct srvsvc_NetDiskEnum *object = (struct srvsvc_NetDiskEnum *)pytalloc_get_ptr(py_obj);
   46621           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.resume_handle));
   46622           0 :         if (value == NULL) {
   46623           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.resume_handle");
   46624           0 :                 return -1;
   46625             :         }
   46626           0 :         if (value == Py_None) {
   46627           0 :                 object->in.resume_handle = NULL;
   46628             :         } else {
   46629           0 :                 object->in.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.resume_handle);
   46630           0 :                 if (object->in.resume_handle == NULL) {
   46631           0 :                         PyErr_NoMemory();
   46632           0 :                         return -1;
   46633             :                 }
   46634             :                 {
   46635           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.resume_handle));
   46636           0 :                         if (PyLong_Check(value)) {
   46637             :                                 unsigned long long test_var;
   46638           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   46639           0 :                                 if (PyErr_Occurred() != NULL) {
   46640           0 :                                         return -1;
   46641             :                                 }
   46642           0 :                                 if (test_var > uint_max) {
   46643           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   46644             :                                           PyLong_Type.tp_name, uint_max, test_var);
   46645           0 :                                         return -1;
   46646             :                                 }
   46647           0 :                                 *object->in.resume_handle = test_var;
   46648             :                         } else {
   46649           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   46650             :                                   PyLong_Type.tp_name);
   46651           0 :                                 return -1;
   46652             :                         }
   46653             :                 }
   46654             :         }
   46655           0 :         return 0;
   46656             : }
   46657             : 
   46658           0 : static PyObject *py_srvsvc_NetDiskEnum_out_get_resume_handle(PyObject *obj, void *closure)
   46659             : {
   46660           0 :         struct srvsvc_NetDiskEnum *object = (struct srvsvc_NetDiskEnum *)pytalloc_get_ptr(obj);
   46661             :         PyObject *py_resume_handle;
   46662           0 :         if (object->out.resume_handle == NULL) {
   46663           0 :                 Py_RETURN_NONE;
   46664             :         }
   46665           0 :         if (object->out.resume_handle == NULL) {
   46666           0 :                 py_resume_handle = Py_None;
   46667           0 :                 Py_INCREF(py_resume_handle);
   46668             :         } else {
   46669           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)*object->out.resume_handle);
   46670             :         }
   46671           0 :         return py_resume_handle;
   46672             : }
   46673             : 
   46674           0 : static int py_srvsvc_NetDiskEnum_out_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   46675             : {
   46676           0 :         struct srvsvc_NetDiskEnum *object = (struct srvsvc_NetDiskEnum *)pytalloc_get_ptr(py_obj);
   46677           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.resume_handle));
   46678           0 :         if (value == NULL) {
   46679           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.resume_handle");
   46680           0 :                 return -1;
   46681             :         }
   46682           0 :         if (value == Py_None) {
   46683           0 :                 object->out.resume_handle = NULL;
   46684             :         } else {
   46685           0 :                 object->out.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.resume_handle);
   46686           0 :                 if (object->out.resume_handle == NULL) {
   46687           0 :                         PyErr_NoMemory();
   46688           0 :                         return -1;
   46689             :                 }
   46690             :                 {
   46691           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.resume_handle));
   46692           0 :                         if (PyLong_Check(value)) {
   46693             :                                 unsigned long long test_var;
   46694           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   46695           0 :                                 if (PyErr_Occurred() != NULL) {
   46696           0 :                                         return -1;
   46697             :                                 }
   46698           0 :                                 if (test_var > uint_max) {
   46699           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   46700             :                                           PyLong_Type.tp_name, uint_max, test_var);
   46701           0 :                                         return -1;
   46702             :                                 }
   46703           0 :                                 *object->out.resume_handle = test_var;
   46704             :                         } else {
   46705           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   46706             :                                   PyLong_Type.tp_name);
   46707           0 :                                 return -1;
   46708             :                         }
   46709             :                 }
   46710             :         }
   46711           0 :         return 0;
   46712             : }
   46713             : 
   46714           0 : static PyObject *py_srvsvc_NetDiskEnum_get_result(PyObject *obj, void *closure)
   46715             : {
   46716           0 :         struct srvsvc_NetDiskEnum *object = (struct srvsvc_NetDiskEnum *)pytalloc_get_ptr(obj);
   46717             :         PyObject *py_result;
   46718           0 :         py_result = PyErr_FromWERROR(object->out.result);
   46719           0 :         return py_result;
   46720             : }
   46721             : 
   46722           0 : static int py_srvsvc_NetDiskEnum_set_result(PyObject *py_obj, PyObject *value, void *closure)
   46723             : {
   46724           0 :         struct srvsvc_NetDiskEnum *object = (struct srvsvc_NetDiskEnum *)pytalloc_get_ptr(py_obj);
   46725           0 :         if (value == NULL) {
   46726           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   46727           0 :                 return -1;
   46728             :         }
   46729           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   46730           0 :         return 0;
   46731             : }
   46732             : 
   46733             : static PyGetSetDef py_srvsvc_NetDiskEnum_getsetters[] = {
   46734             :         {
   46735             :                 .name = discard_const_p(char, "in_server_unc"),
   46736             :                 .get = py_srvsvc_NetDiskEnum_in_get_server_unc,
   46737             :                 .set = py_srvsvc_NetDiskEnum_in_set_server_unc,
   46738             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   46739             :         },
   46740             :         {
   46741             :                 .name = discard_const_p(char, "in_level"),
   46742             :                 .get = py_srvsvc_NetDiskEnum_in_get_level,
   46743             :                 .set = py_srvsvc_NetDiskEnum_in_set_level,
   46744             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   46745             :         },
   46746             :         {
   46747             :                 .name = discard_const_p(char, "in_info"),
   46748             :                 .get = py_srvsvc_NetDiskEnum_in_get_info,
   46749             :                 .set = py_srvsvc_NetDiskEnum_in_set_info,
   46750             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetDiskInfo")
   46751             :         },
   46752             :         {
   46753             :                 .name = discard_const_p(char, "out_info"),
   46754             :                 .get = py_srvsvc_NetDiskEnum_out_get_info,
   46755             :                 .set = py_srvsvc_NetDiskEnum_out_set_info,
   46756             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetDiskInfo")
   46757             :         },
   46758             :         {
   46759             :                 .name = discard_const_p(char, "in_maxlen"),
   46760             :                 .get = py_srvsvc_NetDiskEnum_in_get_maxlen,
   46761             :                 .set = py_srvsvc_NetDiskEnum_in_set_maxlen,
   46762             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   46763             :         },
   46764             :         {
   46765             :                 .name = discard_const_p(char, "out_totalentries"),
   46766             :                 .get = py_srvsvc_NetDiskEnum_out_get_totalentries,
   46767             :                 .set = py_srvsvc_NetDiskEnum_out_set_totalentries,
   46768             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   46769             :         },
   46770             :         {
   46771             :                 .name = discard_const_p(char, "in_resume_handle"),
   46772             :                 .get = py_srvsvc_NetDiskEnum_in_get_resume_handle,
   46773             :                 .set = py_srvsvc_NetDiskEnum_in_set_resume_handle,
   46774             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   46775             :         },
   46776             :         {
   46777             :                 .name = discard_const_p(char, "out_resume_handle"),
   46778             :                 .get = py_srvsvc_NetDiskEnum_out_get_resume_handle,
   46779             :                 .set = py_srvsvc_NetDiskEnum_out_set_resume_handle,
   46780             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   46781             :         },
   46782             :         {
   46783             :                 .name = discard_const_p(char, "result"),
   46784             :                 .get = py_srvsvc_NetDiskEnum_get_result,
   46785             :                 .set = py_srvsvc_NetDiskEnum_set_result,
   46786             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   46787             :         },
   46788             :         { .name = NULL }
   46789             : };
   46790             : 
   46791           0 : static PyObject *py_srvsvc_NetDiskEnum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   46792             : {
   46793           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetDiskEnum, type);
   46794           0 :         struct srvsvc_NetDiskEnum *_self = (struct srvsvc_NetDiskEnum *)pytalloc_get_ptr(self);
   46795           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   46796           0 :         _self->in.info = talloc_zero(mem_ctx, struct srvsvc_NetDiskInfo);
   46797           0 :         _self->out.info = talloc_zero(mem_ctx, struct srvsvc_NetDiskInfo);
   46798           0 :         _self->out.totalentries = talloc_zero(mem_ctx, uint32_t);
   46799           0 :         return self;
   46800             : }
   46801             : 
   46802           0 : static PyObject *py_srvsvc_NetDiskEnum_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   46803             : {
   46804             : 
   46805             : 
   46806           0 :         return PyLong_FromLong(23);
   46807             : }
   46808             : 
   46809           0 : static PyObject *py_srvsvc_NetDiskEnum_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   46810             : {
   46811           0 :         const struct ndr_interface_call *call = NULL;
   46812           0 :         struct srvsvc_NetDiskEnum *object = (struct srvsvc_NetDiskEnum *)pytalloc_get_ptr(py_obj);
   46813           0 :         PyObject *ret = NULL;
   46814           0 :         struct ndr_push *push = NULL;
   46815             :         DATA_BLOB blob;
   46816             :         enum ndr_err_code err;
   46817             : 
   46818           0 :         if (ndr_table_srvsvc.num_calls < 24) {
   46819           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetDiskEnum_ndr_pack");
   46820           0 :                 return NULL;
   46821             :         }
   46822           0 :         call = &ndr_table_srvsvc.calls[23];
   46823             : 
   46824           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   46825           0 :         if (push == NULL) {
   46826           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   46827           0 :                 return NULL;
   46828             :         }
   46829             : 
   46830           0 :         push->flags |= ndr_push_flags;
   46831             : 
   46832           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   46833           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   46834           0 :                 TALLOC_FREE(push);
   46835           0 :                 PyErr_SetNdrError(err);
   46836           0 :                 return NULL;
   46837             :         }
   46838           0 :         blob = ndr_push_blob(push);
   46839           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   46840           0 :         TALLOC_FREE(push);
   46841           0 :         return ret;
   46842             : }
   46843             : 
   46844           0 : static PyObject *py_srvsvc_NetDiskEnum_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46845             : {
   46846           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   46847           0 :         PyObject *bigendian_obj = NULL;
   46848           0 :         PyObject *ndr64_obj = NULL;
   46849           0 :         uint32_t ndr_push_flags = 0;
   46850             : 
   46851           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   46852             :                 discard_const_p(char *, kwnames),
   46853             :                 &bigendian_obj,
   46854             :                 &ndr64_obj)) {
   46855           0 :                 return NULL;
   46856             :         }
   46857             : 
   46858           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46859           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   46860             :         }
   46861           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   46862           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   46863             :         }
   46864             : 
   46865           0 :         return py_srvsvc_NetDiskEnum_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   46866             : }
   46867             : 
   46868           0 : static PyObject *py_srvsvc_NetDiskEnum_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46869             : {
   46870           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   46871           0 :         PyObject *bigendian_obj = NULL;
   46872           0 :         PyObject *ndr64_obj = NULL;
   46873           0 :         uint32_t ndr_push_flags = 0;
   46874             : 
   46875           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   46876             :                 discard_const_p(char *, kwnames),
   46877             :                 &bigendian_obj,
   46878             :                 &ndr64_obj)) {
   46879           0 :                 return NULL;
   46880             :         }
   46881             : 
   46882           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46883           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   46884             :         }
   46885           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   46886           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   46887             :         }
   46888             : 
   46889           0 :         return py_srvsvc_NetDiskEnum_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   46890             : }
   46891             : 
   46892           0 : static PyObject *py_srvsvc_NetDiskEnum_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   46893             : {
   46894           0 :         const struct ndr_interface_call *call = NULL;
   46895           0 :         struct srvsvc_NetDiskEnum *object = (struct srvsvc_NetDiskEnum *)pytalloc_get_ptr(py_obj);
   46896           0 :         struct ndr_pull *pull = NULL;
   46897             :         enum ndr_err_code err;
   46898             : 
   46899           0 :         if (ndr_table_srvsvc.num_calls < 24) {
   46900           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetDiskEnum_ndr_unpack");
   46901           0 :                 return NULL;
   46902             :         }
   46903           0 :         call = &ndr_table_srvsvc.calls[23];
   46904             : 
   46905           0 :         pull = ndr_pull_init_blob(blob, object);
   46906           0 :         if (pull == NULL) {
   46907           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   46908           0 :                 return NULL;
   46909             :         }
   46910             : 
   46911           0 :         pull->flags |= ndr_pull_flags;
   46912             : 
   46913           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   46914           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   46915           0 :                 TALLOC_FREE(pull);
   46916           0 :                 PyErr_SetNdrError(err);
   46917           0 :                 return NULL;
   46918             :         }
   46919           0 :         if (!allow_remaining) {
   46920             :                 uint32_t highest_ofs;
   46921             : 
   46922           0 :                 if (pull->offset > pull->relative_highest_offset) {
   46923           0 :                         highest_ofs = pull->offset;
   46924             :                 } else {
   46925           0 :                         highest_ofs = pull->relative_highest_offset;
   46926             :                 }
   46927           0 :                 if (highest_ofs < pull->data_size) {
   46928           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   46929             :                                 "not all bytes consumed ofs[%u] size[%u]",
   46930             :                                 highest_ofs, pull->data_size);
   46931           0 :                         TALLOC_FREE(pull);
   46932           0 :                         PyErr_SetNdrError(err);
   46933           0 :                         return NULL;
   46934             :                 }
   46935             :         }
   46936             : 
   46937           0 :         TALLOC_FREE(pull);
   46938           0 :         Py_RETURN_NONE;
   46939             : }
   46940             : 
   46941           0 : static PyObject *py_srvsvc_NetDiskEnum_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46942             : {
   46943             :         DATA_BLOB blob;
   46944           0 :         Py_ssize_t blob_length = 0;
   46945           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   46946           0 :         PyObject *bigendian_obj = NULL;
   46947           0 :         PyObject *ndr64_obj = NULL;
   46948           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   46949           0 :         PyObject *allow_remaining_obj = NULL;
   46950           0 :         bool allow_remaining = false;
   46951             : 
   46952           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   46953             :                 discard_const_p(char *, kwnames),
   46954             :                 &blob.data, &blob_length,
   46955             :                 &bigendian_obj,
   46956             :                 &ndr64_obj,
   46957             :                 &allow_remaining_obj)) {
   46958           0 :                 return NULL;
   46959             :         }
   46960           0 :         blob.length = blob_length;
   46961             : 
   46962           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46963           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   46964             :         }
   46965           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   46966           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   46967             :         }
   46968             : 
   46969           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   46970           0 :                 allow_remaining = true;
   46971             :         }
   46972             : 
   46973           0 :         return py_srvsvc_NetDiskEnum_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   46974             : }
   46975             : 
   46976           0 : static PyObject *py_srvsvc_NetDiskEnum_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46977             : {
   46978             :         DATA_BLOB blob;
   46979           0 :         Py_ssize_t blob_length = 0;
   46980           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   46981           0 :         PyObject *bigendian_obj = NULL;
   46982           0 :         PyObject *ndr64_obj = NULL;
   46983           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   46984           0 :         PyObject *allow_remaining_obj = NULL;
   46985           0 :         bool allow_remaining = false;
   46986             : 
   46987           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   46988             :                 discard_const_p(char *, kwnames),
   46989             :                 &blob.data, &blob_length,
   46990             :                 &bigendian_obj,
   46991             :                 &ndr64_obj,
   46992             :                 &allow_remaining_obj)) {
   46993           0 :                 return NULL;
   46994             :         }
   46995           0 :         blob.length = blob_length;
   46996             : 
   46997           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46998           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   46999             :         }
   47000           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   47001           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   47002             :         }
   47003             : 
   47004           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   47005           0 :                 allow_remaining = true;
   47006             :         }
   47007             : 
   47008           0 :         return py_srvsvc_NetDiskEnum_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   47009             : }
   47010             : 
   47011           0 : static PyObject *py_srvsvc_NetDiskEnum_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   47012             : {
   47013           0 :         const struct ndr_interface_call *call = NULL;
   47014           0 :         struct srvsvc_NetDiskEnum *object = (struct srvsvc_NetDiskEnum *)pytalloc_get_ptr(py_obj);
   47015             :         PyObject *ret;
   47016             :         char *retstr;
   47017             : 
   47018           0 :         if (ndr_table_srvsvc.num_calls < 24) {
   47019           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetDiskEnum_ndr_print");
   47020           0 :                 return NULL;
   47021             :         }
   47022           0 :         call = &ndr_table_srvsvc.calls[23];
   47023             : 
   47024           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   47025           0 :         ret = PyUnicode_FromString(retstr);
   47026           0 :         TALLOC_FREE(retstr);
   47027             : 
   47028           0 :         return ret;
   47029             : }
   47030             : 
   47031           0 : static PyObject *py_srvsvc_NetDiskEnum_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   47032             : {
   47033           0 :         return py_srvsvc_NetDiskEnum_ndr_print(py_obj, "srvsvc_NetDiskEnum_in", NDR_IN);
   47034             : }
   47035             : 
   47036           0 : static PyObject *py_srvsvc_NetDiskEnum_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   47037             : {
   47038           0 :         return py_srvsvc_NetDiskEnum_ndr_print(py_obj, "srvsvc_NetDiskEnum_out", NDR_OUT);
   47039             : }
   47040             : 
   47041             : static PyMethodDef py_srvsvc_NetDiskEnum_methods[] = {
   47042             :         { "opnum", (PyCFunction)py_srvsvc_NetDiskEnum_ndr_opnum, METH_NOARGS|METH_CLASS,
   47043             :                 "srvsvc.NetDiskEnum.opnum() -> 23 (0x17) " },
   47044             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetDiskEnum_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   47045             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   47046             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetDiskEnum_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   47047             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   47048             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetDiskEnum_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   47049             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   47050             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetDiskEnum_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   47051             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   47052             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetDiskEnum_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   47053             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetDiskEnum_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   47054             :         { NULL, NULL, 0, NULL }
   47055             : };
   47056             : 
   47057             : 
   47058             : static PyTypeObject srvsvc_NetDiskEnum_Type = {
   47059             :         PyVarObject_HEAD_INIT(NULL, 0)
   47060             :         .tp_name = "srvsvc.NetDiskEnum",
   47061             :         .tp_getset = py_srvsvc_NetDiskEnum_getsetters,
   47062             :         .tp_methods = py_srvsvc_NetDiskEnum_methods,
   47063             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   47064             :         .tp_new = py_srvsvc_NetDiskEnum_new,
   47065             : };
   47066             : 
   47067           0 : static bool pack_py_srvsvc_NetDiskEnum_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetDiskEnum *r)
   47068             : {
   47069             :         PyObject *py_server_unc;
   47070             :         PyObject *py_level;
   47071             :         PyObject *py_info;
   47072             :         PyObject *py_maxlen;
   47073             :         PyObject *py_resume_handle;
   47074           0 :         const char *kwnames[] = {
   47075             :                 "server_unc", "level", "info", "maxlen", "resume_handle", NULL
   47076             :         };
   47077             : 
   47078           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:srvsvc_NetDiskEnum", discard_const_p(char *, kwnames), &py_server_unc, &py_level, &py_info, &py_maxlen, &py_resume_handle)) {
   47079           0 :                 return false;
   47080             :         }
   47081             : 
   47082           0 :         if (py_server_unc == NULL) {
   47083           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   47084           0 :                 return false;
   47085             :         }
   47086           0 :         if (py_server_unc == Py_None) {
   47087           0 :                 r->in.server_unc = NULL;
   47088             :         } else {
   47089           0 :                 r->in.server_unc = NULL;
   47090             :                 {
   47091             :                         const char *test_str;
   47092             :                         const char *talloc_str;
   47093           0 :                         PyObject *unicode = NULL;
   47094           0 :                         if (PyUnicode_Check(py_server_unc)) {
   47095           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   47096           0 :                                 if (unicode == NULL) {
   47097           0 :                                         PyErr_NoMemory();
   47098           0 :                                         return false;
   47099             :                                 }
   47100           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   47101           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   47102           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   47103             :                         } else {
   47104           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   47105           0 :                                 return false;
   47106             :                         }
   47107           0 :                         talloc_str = talloc_strdup(r, test_str);
   47108           0 :                         if (unicode != NULL) {
   47109           0 :                                 Py_DECREF(unicode);
   47110             :                         }
   47111           0 :                         if (talloc_str == NULL) {
   47112           0 :                                 PyErr_NoMemory();
   47113           0 :                                 return false;
   47114             :                         }
   47115           0 :                         r->in.server_unc = talloc_str;
   47116             :                 }
   47117             :         }
   47118           0 :         if (py_level == NULL) {
   47119           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   47120           0 :                 return false;
   47121             :         }
   47122             :         {
   47123           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   47124           0 :                 if (PyLong_Check(py_level)) {
   47125             :                         unsigned long long test_var;
   47126           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   47127           0 :                         if (PyErr_Occurred() != NULL) {
   47128           0 :                                 return false;
   47129             :                         }
   47130           0 :                         if (test_var > uint_max) {
   47131           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   47132             :                                   PyLong_Type.tp_name, uint_max, test_var);
   47133           0 :                                 return false;
   47134             :                         }
   47135           0 :                         r->in.level = test_var;
   47136             :                 } else {
   47137           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   47138             :                           PyLong_Type.tp_name);
   47139           0 :                         return false;
   47140             :                 }
   47141             :         }
   47142           0 :         if (py_info == NULL) {
   47143           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info");
   47144           0 :                 return false;
   47145             :         }
   47146           0 :         r->in.info = talloc_ptrtype(r, r->in.info);
   47147           0 :         if (r->in.info == NULL) {
   47148           0 :                 PyErr_NoMemory();
   47149           0 :                 return false;
   47150             :         }
   47151           0 :         PY_CHECK_TYPE(&srvsvc_NetDiskInfo_Type, py_info, return false;);
   47152           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_info)) == NULL) {
   47153           0 :                 PyErr_NoMemory();
   47154           0 :                 return false;
   47155             :         }
   47156           0 :         r->in.info = (struct srvsvc_NetDiskInfo *)pytalloc_get_ptr(py_info);
   47157           0 :         if (py_maxlen == NULL) {
   47158           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.maxlen");
   47159           0 :                 return false;
   47160             :         }
   47161             :         {
   47162           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.maxlen));
   47163           0 :                 if (PyLong_Check(py_maxlen)) {
   47164             :                         unsigned long long test_var;
   47165           0 :                         test_var = PyLong_AsUnsignedLongLong(py_maxlen);
   47166           0 :                         if (PyErr_Occurred() != NULL) {
   47167           0 :                                 return false;
   47168             :                         }
   47169           0 :                         if (test_var > uint_max) {
   47170           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   47171             :                                   PyLong_Type.tp_name, uint_max, test_var);
   47172           0 :                                 return false;
   47173             :                         }
   47174           0 :                         r->in.maxlen = test_var;
   47175             :                 } else {
   47176           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   47177             :                           PyLong_Type.tp_name);
   47178           0 :                         return false;
   47179             :                 }
   47180             :         }
   47181           0 :         if (py_resume_handle == NULL) {
   47182           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.resume_handle");
   47183           0 :                 return false;
   47184             :         }
   47185           0 :         if (py_resume_handle == Py_None) {
   47186           0 :                 r->in.resume_handle = NULL;
   47187             :         } else {
   47188           0 :                 r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
   47189           0 :                 if (r->in.resume_handle == NULL) {
   47190           0 :                         PyErr_NoMemory();
   47191           0 :                         return false;
   47192             :                 }
   47193             :                 {
   47194           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
   47195           0 :                         if (PyLong_Check(py_resume_handle)) {
   47196             :                                 unsigned long long test_var;
   47197           0 :                                 test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
   47198           0 :                                 if (PyErr_Occurred() != NULL) {
   47199           0 :                                         return false;
   47200             :                                 }
   47201           0 :                                 if (test_var > uint_max) {
   47202           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   47203             :                                           PyLong_Type.tp_name, uint_max, test_var);
   47204           0 :                                         return false;
   47205             :                                 }
   47206           0 :                                 *r->in.resume_handle = test_var;
   47207             :                         } else {
   47208           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   47209             :                                   PyLong_Type.tp_name);
   47210           0 :                                 return false;
   47211             :                         }
   47212             :                 }
   47213             :         }
   47214           0 :         return true;
   47215             : }
   47216             : 
   47217           0 : static PyObject *unpack_py_srvsvc_NetDiskEnum_args_out(struct srvsvc_NetDiskEnum *r)
   47218             : {
   47219             :         PyObject *result;
   47220             :         PyObject *py_info;
   47221             :         PyObject *py_totalentries;
   47222             :         PyObject *py_resume_handle;
   47223           0 :         result = PyTuple_New(3);
   47224           0 :         py_info = pytalloc_reference_ex(&srvsvc_NetDiskInfo_Type, r->out.info, r->out.info);
   47225           0 :         PyTuple_SetItem(result, 0, py_info);
   47226           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)*r->out.totalentries);
   47227           0 :         PyTuple_SetItem(result, 1, py_totalentries);
   47228           0 :         if (r->out.resume_handle == NULL) {
   47229           0 :                 py_resume_handle = Py_None;
   47230           0 :                 Py_INCREF(py_resume_handle);
   47231             :         } else {
   47232           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)*r->out.resume_handle);
   47233             :         }
   47234           0 :         PyTuple_SetItem(result, 2, py_resume_handle);
   47235           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   47236           0 :                 PyErr_SetWERROR(r->out.result);
   47237           0 :                 return NULL;
   47238             :         }
   47239             : 
   47240           0 :         return result;
   47241             : }
   47242             : 
   47243             : 
   47244           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_in_get_server_unc(PyObject *obj, void *closure)
   47245             : {
   47246           0 :         struct srvsvc_NetServerStatisticsGet *object = (struct srvsvc_NetServerStatisticsGet *)pytalloc_get_ptr(obj);
   47247             :         PyObject *py_server_unc;
   47248           0 :         if (object->in.server_unc == NULL) {
   47249           0 :                 Py_RETURN_NONE;
   47250             :         }
   47251           0 :         if (object->in.server_unc == NULL) {
   47252           0 :                 py_server_unc = Py_None;
   47253           0 :                 Py_INCREF(py_server_unc);
   47254             :         } else {
   47255           0 :                 if (object->in.server_unc == NULL) {
   47256           0 :                         py_server_unc = Py_None;
   47257           0 :                         Py_INCREF(py_server_unc);
   47258             :                 } else {
   47259           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   47260             :                 }
   47261             :         }
   47262           0 :         return py_server_unc;
   47263             : }
   47264             : 
   47265           0 : static int py_srvsvc_NetServerStatisticsGet_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   47266             : {
   47267           0 :         struct srvsvc_NetServerStatisticsGet *object = (struct srvsvc_NetServerStatisticsGet *)pytalloc_get_ptr(py_obj);
   47268           0 :         if (value == NULL) {
   47269           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   47270           0 :                 return -1;
   47271             :         }
   47272           0 :         if (value == Py_None) {
   47273           0 :                 object->in.server_unc = NULL;
   47274             :         } else {
   47275           0 :                 object->in.server_unc = NULL;
   47276             :                 {
   47277             :                         const char *test_str;
   47278             :                         const char *talloc_str;
   47279           0 :                         PyObject *unicode = NULL;
   47280           0 :                         if (PyUnicode_Check(value)) {
   47281           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   47282           0 :                                 if (unicode == NULL) {
   47283           0 :                                         PyErr_NoMemory();
   47284           0 :                                         return -1;
   47285             :                                 }
   47286           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   47287           0 :                         } else if (PyBytes_Check(value)) {
   47288           0 :                                 test_str = PyBytes_AS_STRING(value);
   47289             :                         } else {
   47290           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   47291           0 :                                 return -1;
   47292             :                         }
   47293           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   47294           0 :                         if (unicode != NULL) {
   47295           0 :                                 Py_DECREF(unicode);
   47296             :                         }
   47297           0 :                         if (talloc_str == NULL) {
   47298           0 :                                 PyErr_NoMemory();
   47299           0 :                                 return -1;
   47300             :                         }
   47301           0 :                         object->in.server_unc = talloc_str;
   47302             :                 }
   47303             :         }
   47304           0 :         return 0;
   47305             : }
   47306             : 
   47307           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_in_get_service(PyObject *obj, void *closure)
   47308             : {
   47309           0 :         struct srvsvc_NetServerStatisticsGet *object = (struct srvsvc_NetServerStatisticsGet *)pytalloc_get_ptr(obj);
   47310             :         PyObject *py_service;
   47311           0 :         if (object->in.service == NULL) {
   47312           0 :                 Py_RETURN_NONE;
   47313             :         }
   47314           0 :         if (object->in.service == NULL) {
   47315           0 :                 py_service = Py_None;
   47316           0 :                 Py_INCREF(py_service);
   47317             :         } else {
   47318           0 :                 if (object->in.service == NULL) {
   47319           0 :                         py_service = Py_None;
   47320           0 :                         Py_INCREF(py_service);
   47321             :                 } else {
   47322           0 :                         py_service = PyUnicode_Decode(object->in.service, strlen(object->in.service), "utf-8", "ignore");
   47323             :                 }
   47324             :         }
   47325           0 :         return py_service;
   47326             : }
   47327             : 
   47328           0 : static int py_srvsvc_NetServerStatisticsGet_in_set_service(PyObject *py_obj, PyObject *value, void *closure)
   47329             : {
   47330           0 :         struct srvsvc_NetServerStatisticsGet *object = (struct srvsvc_NetServerStatisticsGet *)pytalloc_get_ptr(py_obj);
   47331           0 :         if (value == NULL) {
   47332           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.service");
   47333           0 :                 return -1;
   47334             :         }
   47335           0 :         if (value == Py_None) {
   47336           0 :                 object->in.service = NULL;
   47337             :         } else {
   47338           0 :                 object->in.service = NULL;
   47339             :                 {
   47340             :                         const char *test_str;
   47341             :                         const char *talloc_str;
   47342           0 :                         PyObject *unicode = NULL;
   47343           0 :                         if (PyUnicode_Check(value)) {
   47344           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   47345           0 :                                 if (unicode == NULL) {
   47346           0 :                                         PyErr_NoMemory();
   47347           0 :                                         return -1;
   47348             :                                 }
   47349           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   47350           0 :                         } else if (PyBytes_Check(value)) {
   47351           0 :                                 test_str = PyBytes_AS_STRING(value);
   47352             :                         } else {
   47353           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   47354           0 :                                 return -1;
   47355             :                         }
   47356           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   47357           0 :                         if (unicode != NULL) {
   47358           0 :                                 Py_DECREF(unicode);
   47359             :                         }
   47360           0 :                         if (talloc_str == NULL) {
   47361           0 :                                 PyErr_NoMemory();
   47362           0 :                                 return -1;
   47363             :                         }
   47364           0 :                         object->in.service = talloc_str;
   47365             :                 }
   47366             :         }
   47367           0 :         return 0;
   47368             : }
   47369             : 
   47370           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_in_get_level(PyObject *obj, void *closure)
   47371             : {
   47372           0 :         struct srvsvc_NetServerStatisticsGet *object = (struct srvsvc_NetServerStatisticsGet *)pytalloc_get_ptr(obj);
   47373             :         PyObject *py_level;
   47374           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   47375           0 :         return py_level;
   47376             : }
   47377             : 
   47378           0 : static int py_srvsvc_NetServerStatisticsGet_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   47379             : {
   47380           0 :         struct srvsvc_NetServerStatisticsGet *object = (struct srvsvc_NetServerStatisticsGet *)pytalloc_get_ptr(py_obj);
   47381           0 :         if (value == NULL) {
   47382           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   47383           0 :                 return -1;
   47384             :         }
   47385             :         {
   47386           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   47387           0 :                 if (PyLong_Check(value)) {
   47388             :                         unsigned long long test_var;
   47389           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   47390           0 :                         if (PyErr_Occurred() != NULL) {
   47391           0 :                                 return -1;
   47392             :                         }
   47393           0 :                         if (test_var > uint_max) {
   47394           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   47395             :                                   PyLong_Type.tp_name, uint_max, test_var);
   47396           0 :                                 return -1;
   47397             :                         }
   47398           0 :                         object->in.level = test_var;
   47399             :                 } else {
   47400           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   47401             :                           PyLong_Type.tp_name);
   47402           0 :                         return -1;
   47403             :                 }
   47404             :         }
   47405           0 :         return 0;
   47406             : }
   47407             : 
   47408           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_in_get_options(PyObject *obj, void *closure)
   47409             : {
   47410           0 :         struct srvsvc_NetServerStatisticsGet *object = (struct srvsvc_NetServerStatisticsGet *)pytalloc_get_ptr(obj);
   47411             :         PyObject *py_options;
   47412           0 :         py_options = PyLong_FromUnsignedLongLong((uint32_t)object->in.options);
   47413           0 :         return py_options;
   47414             : }
   47415             : 
   47416           0 : static int py_srvsvc_NetServerStatisticsGet_in_set_options(PyObject *py_obj, PyObject *value, void *closure)
   47417             : {
   47418           0 :         struct srvsvc_NetServerStatisticsGet *object = (struct srvsvc_NetServerStatisticsGet *)pytalloc_get_ptr(py_obj);
   47419           0 :         if (value == NULL) {
   47420           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.options");
   47421           0 :                 return -1;
   47422             :         }
   47423             :         {
   47424           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.options));
   47425           0 :                 if (PyLong_Check(value)) {
   47426             :                         unsigned long long test_var;
   47427           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   47428           0 :                         if (PyErr_Occurred() != NULL) {
   47429           0 :                                 return -1;
   47430             :                         }
   47431           0 :                         if (test_var > uint_max) {
   47432           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   47433             :                                   PyLong_Type.tp_name, uint_max, test_var);
   47434           0 :                                 return -1;
   47435             :                         }
   47436           0 :                         object->in.options = test_var;
   47437             :                 } else {
   47438           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   47439             :                           PyLong_Type.tp_name);
   47440           0 :                         return -1;
   47441             :                 }
   47442             :         }
   47443           0 :         return 0;
   47444             : }
   47445             : 
   47446           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_out_get_stats(PyObject *obj, void *closure)
   47447             : {
   47448           0 :         struct srvsvc_NetServerStatisticsGet *object = (struct srvsvc_NetServerStatisticsGet *)pytalloc_get_ptr(obj);
   47449             :         PyObject *py_stats;
   47450           0 :         if (object->out.stats == NULL) {
   47451           0 :                 Py_RETURN_NONE;
   47452             :         }
   47453           0 :         if (*object->out.stats == NULL) {
   47454           0 :                 py_stats = Py_None;
   47455           0 :                 Py_INCREF(py_stats);
   47456             :         } else {
   47457           0 :                 py_stats = pytalloc_reference_ex(&srvsvc_Statistics_Type, *object->out.stats, *object->out.stats);
   47458             :         }
   47459           0 :         return py_stats;
   47460             : }
   47461             : 
   47462           0 : static int py_srvsvc_NetServerStatisticsGet_out_set_stats(PyObject *py_obj, PyObject *value, void *closure)
   47463             : {
   47464           0 :         struct srvsvc_NetServerStatisticsGet *object = (struct srvsvc_NetServerStatisticsGet *)pytalloc_get_ptr(py_obj);
   47465           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.stats));
   47466           0 :         if (value == NULL) {
   47467           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.stats");
   47468           0 :                 return -1;
   47469             :         }
   47470           0 :         object->out.stats = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.stats);
   47471           0 :         if (object->out.stats == NULL) {
   47472           0 :                 PyErr_NoMemory();
   47473           0 :                 return -1;
   47474             :         }
   47475           0 :         if (value == Py_None) {
   47476           0 :                 *object->out.stats = NULL;
   47477             :         } else {
   47478           0 :                 *object->out.stats = NULL;
   47479           0 :                 PY_CHECK_TYPE(&srvsvc_Statistics_Type, value, return -1;);
   47480           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   47481           0 :                         PyErr_NoMemory();
   47482           0 :                         return -1;
   47483             :                 }
   47484           0 :                 *object->out.stats = (struct srvsvc_Statistics *)pytalloc_get_ptr(value);
   47485             :         }
   47486           0 :         return 0;
   47487             : }
   47488             : 
   47489           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_get_result(PyObject *obj, void *closure)
   47490             : {
   47491           0 :         struct srvsvc_NetServerStatisticsGet *object = (struct srvsvc_NetServerStatisticsGet *)pytalloc_get_ptr(obj);
   47492             :         PyObject *py_result;
   47493           0 :         py_result = PyErr_FromWERROR(object->out.result);
   47494           0 :         return py_result;
   47495             : }
   47496             : 
   47497           0 : static int py_srvsvc_NetServerStatisticsGet_set_result(PyObject *py_obj, PyObject *value, void *closure)
   47498             : {
   47499           0 :         struct srvsvc_NetServerStatisticsGet *object = (struct srvsvc_NetServerStatisticsGet *)pytalloc_get_ptr(py_obj);
   47500           0 :         if (value == NULL) {
   47501           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   47502           0 :                 return -1;
   47503             :         }
   47504           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   47505           0 :         return 0;
   47506             : }
   47507             : 
   47508             : static PyGetSetDef py_srvsvc_NetServerStatisticsGet_getsetters[] = {
   47509             :         {
   47510             :                 .name = discard_const_p(char, "in_server_unc"),
   47511             :                 .get = py_srvsvc_NetServerStatisticsGet_in_get_server_unc,
   47512             :                 .set = py_srvsvc_NetServerStatisticsGet_in_set_server_unc,
   47513             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   47514             :         },
   47515             :         {
   47516             :                 .name = discard_const_p(char, "in_service"),
   47517             :                 .get = py_srvsvc_NetServerStatisticsGet_in_get_service,
   47518             :                 .set = py_srvsvc_NetServerStatisticsGet_in_set_service,
   47519             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   47520             :         },
   47521             :         {
   47522             :                 .name = discard_const_p(char, "in_level"),
   47523             :                 .get = py_srvsvc_NetServerStatisticsGet_in_get_level,
   47524             :                 .set = py_srvsvc_NetServerStatisticsGet_in_set_level,
   47525             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   47526             :         },
   47527             :         {
   47528             :                 .name = discard_const_p(char, "in_options"),
   47529             :                 .get = py_srvsvc_NetServerStatisticsGet_in_get_options,
   47530             :                 .set = py_srvsvc_NetServerStatisticsGet_in_set_options,
   47531             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   47532             :         },
   47533             :         {
   47534             :                 .name = discard_const_p(char, "out_stats"),
   47535             :                 .get = py_srvsvc_NetServerStatisticsGet_out_get_stats,
   47536             :                 .set = py_srvsvc_NetServerStatisticsGet_out_set_stats,
   47537             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_Statistics")
   47538             :         },
   47539             :         {
   47540             :                 .name = discard_const_p(char, "result"),
   47541             :                 .get = py_srvsvc_NetServerStatisticsGet_get_result,
   47542             :                 .set = py_srvsvc_NetServerStatisticsGet_set_result,
   47543             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   47544             :         },
   47545             :         { .name = NULL }
   47546             : };
   47547             : 
   47548           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   47549             : {
   47550           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetServerStatisticsGet, type);
   47551           0 :         struct srvsvc_NetServerStatisticsGet *_self = (struct srvsvc_NetServerStatisticsGet *)pytalloc_get_ptr(self);
   47552           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   47553             :         /* a pointer to a NULL pointer */
   47554           0 :         _self->out.stats = talloc_zero(mem_ctx, struct srvsvc_Statistics *);
   47555           0 :         return self;
   47556             : }
   47557             : 
   47558           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   47559             : {
   47560             : 
   47561             : 
   47562           0 :         return PyLong_FromLong(24);
   47563             : }
   47564             : 
   47565           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   47566             : {
   47567           0 :         const struct ndr_interface_call *call = NULL;
   47568           0 :         struct srvsvc_NetServerStatisticsGet *object = (struct srvsvc_NetServerStatisticsGet *)pytalloc_get_ptr(py_obj);
   47569           0 :         PyObject *ret = NULL;
   47570           0 :         struct ndr_push *push = NULL;
   47571             :         DATA_BLOB blob;
   47572             :         enum ndr_err_code err;
   47573             : 
   47574           0 :         if (ndr_table_srvsvc.num_calls < 25) {
   47575           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetServerStatisticsGet_ndr_pack");
   47576           0 :                 return NULL;
   47577             :         }
   47578           0 :         call = &ndr_table_srvsvc.calls[24];
   47579             : 
   47580           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   47581           0 :         if (push == NULL) {
   47582           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   47583           0 :                 return NULL;
   47584             :         }
   47585             : 
   47586           0 :         push->flags |= ndr_push_flags;
   47587             : 
   47588           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   47589           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   47590           0 :                 TALLOC_FREE(push);
   47591           0 :                 PyErr_SetNdrError(err);
   47592           0 :                 return NULL;
   47593             :         }
   47594           0 :         blob = ndr_push_blob(push);
   47595           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   47596           0 :         TALLOC_FREE(push);
   47597           0 :         return ret;
   47598             : }
   47599             : 
   47600           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   47601             : {
   47602           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   47603           0 :         PyObject *bigendian_obj = NULL;
   47604           0 :         PyObject *ndr64_obj = NULL;
   47605           0 :         uint32_t ndr_push_flags = 0;
   47606             : 
   47607           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   47608             :                 discard_const_p(char *, kwnames),
   47609             :                 &bigendian_obj,
   47610             :                 &ndr64_obj)) {
   47611           0 :                 return NULL;
   47612             :         }
   47613             : 
   47614           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   47615           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   47616             :         }
   47617           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   47618           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   47619             :         }
   47620             : 
   47621           0 :         return py_srvsvc_NetServerStatisticsGet_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   47622             : }
   47623             : 
   47624           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   47625             : {
   47626           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   47627           0 :         PyObject *bigendian_obj = NULL;
   47628           0 :         PyObject *ndr64_obj = NULL;
   47629           0 :         uint32_t ndr_push_flags = 0;
   47630             : 
   47631           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   47632             :                 discard_const_p(char *, kwnames),
   47633             :                 &bigendian_obj,
   47634             :                 &ndr64_obj)) {
   47635           0 :                 return NULL;
   47636             :         }
   47637             : 
   47638           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   47639           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   47640             :         }
   47641           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   47642           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   47643             :         }
   47644             : 
   47645           0 :         return py_srvsvc_NetServerStatisticsGet_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   47646             : }
   47647             : 
   47648           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   47649             : {
   47650           0 :         const struct ndr_interface_call *call = NULL;
   47651           0 :         struct srvsvc_NetServerStatisticsGet *object = (struct srvsvc_NetServerStatisticsGet *)pytalloc_get_ptr(py_obj);
   47652           0 :         struct ndr_pull *pull = NULL;
   47653             :         enum ndr_err_code err;
   47654             : 
   47655           0 :         if (ndr_table_srvsvc.num_calls < 25) {
   47656           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetServerStatisticsGet_ndr_unpack");
   47657           0 :                 return NULL;
   47658             :         }
   47659           0 :         call = &ndr_table_srvsvc.calls[24];
   47660             : 
   47661           0 :         pull = ndr_pull_init_blob(blob, object);
   47662           0 :         if (pull == NULL) {
   47663           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   47664           0 :                 return NULL;
   47665             :         }
   47666             : 
   47667           0 :         pull->flags |= ndr_pull_flags;
   47668             : 
   47669           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   47670           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   47671           0 :                 TALLOC_FREE(pull);
   47672           0 :                 PyErr_SetNdrError(err);
   47673           0 :                 return NULL;
   47674             :         }
   47675           0 :         if (!allow_remaining) {
   47676             :                 uint32_t highest_ofs;
   47677             : 
   47678           0 :                 if (pull->offset > pull->relative_highest_offset) {
   47679           0 :                         highest_ofs = pull->offset;
   47680             :                 } else {
   47681           0 :                         highest_ofs = pull->relative_highest_offset;
   47682             :                 }
   47683           0 :                 if (highest_ofs < pull->data_size) {
   47684           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   47685             :                                 "not all bytes consumed ofs[%u] size[%u]",
   47686             :                                 highest_ofs, pull->data_size);
   47687           0 :                         TALLOC_FREE(pull);
   47688           0 :                         PyErr_SetNdrError(err);
   47689           0 :                         return NULL;
   47690             :                 }
   47691             :         }
   47692             : 
   47693           0 :         TALLOC_FREE(pull);
   47694           0 :         Py_RETURN_NONE;
   47695             : }
   47696             : 
   47697           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   47698             : {
   47699             :         DATA_BLOB blob;
   47700           0 :         Py_ssize_t blob_length = 0;
   47701           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   47702           0 :         PyObject *bigendian_obj = NULL;
   47703           0 :         PyObject *ndr64_obj = NULL;
   47704           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   47705           0 :         PyObject *allow_remaining_obj = NULL;
   47706           0 :         bool allow_remaining = false;
   47707             : 
   47708           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   47709             :                 discard_const_p(char *, kwnames),
   47710             :                 &blob.data, &blob_length,
   47711             :                 &bigendian_obj,
   47712             :                 &ndr64_obj,
   47713             :                 &allow_remaining_obj)) {
   47714           0 :                 return NULL;
   47715             :         }
   47716           0 :         blob.length = blob_length;
   47717             : 
   47718           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   47719           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   47720             :         }
   47721           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   47722           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   47723             :         }
   47724             : 
   47725           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   47726           0 :                 allow_remaining = true;
   47727             :         }
   47728             : 
   47729           0 :         return py_srvsvc_NetServerStatisticsGet_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   47730             : }
   47731             : 
   47732           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   47733             : {
   47734             :         DATA_BLOB blob;
   47735           0 :         Py_ssize_t blob_length = 0;
   47736           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   47737           0 :         PyObject *bigendian_obj = NULL;
   47738           0 :         PyObject *ndr64_obj = NULL;
   47739           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   47740           0 :         PyObject *allow_remaining_obj = NULL;
   47741           0 :         bool allow_remaining = false;
   47742             : 
   47743           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   47744             :                 discard_const_p(char *, kwnames),
   47745             :                 &blob.data, &blob_length,
   47746             :                 &bigendian_obj,
   47747             :                 &ndr64_obj,
   47748             :                 &allow_remaining_obj)) {
   47749           0 :                 return NULL;
   47750             :         }
   47751           0 :         blob.length = blob_length;
   47752             : 
   47753           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   47754           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   47755             :         }
   47756           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   47757           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   47758             :         }
   47759             : 
   47760           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   47761           0 :                 allow_remaining = true;
   47762             :         }
   47763             : 
   47764           0 :         return py_srvsvc_NetServerStatisticsGet_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   47765             : }
   47766             : 
   47767           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   47768             : {
   47769           0 :         const struct ndr_interface_call *call = NULL;
   47770           0 :         struct srvsvc_NetServerStatisticsGet *object = (struct srvsvc_NetServerStatisticsGet *)pytalloc_get_ptr(py_obj);
   47771             :         PyObject *ret;
   47772             :         char *retstr;
   47773             : 
   47774           0 :         if (ndr_table_srvsvc.num_calls < 25) {
   47775           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetServerStatisticsGet_ndr_print");
   47776           0 :                 return NULL;
   47777             :         }
   47778           0 :         call = &ndr_table_srvsvc.calls[24];
   47779             : 
   47780           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   47781           0 :         ret = PyUnicode_FromString(retstr);
   47782           0 :         TALLOC_FREE(retstr);
   47783             : 
   47784           0 :         return ret;
   47785             : }
   47786             : 
   47787           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   47788             : {
   47789           0 :         return py_srvsvc_NetServerStatisticsGet_ndr_print(py_obj, "srvsvc_NetServerStatisticsGet_in", NDR_IN);
   47790             : }
   47791             : 
   47792           0 : static PyObject *py_srvsvc_NetServerStatisticsGet_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   47793             : {
   47794           0 :         return py_srvsvc_NetServerStatisticsGet_ndr_print(py_obj, "srvsvc_NetServerStatisticsGet_out", NDR_OUT);
   47795             : }
   47796             : 
   47797             : static PyMethodDef py_srvsvc_NetServerStatisticsGet_methods[] = {
   47798             :         { "opnum", (PyCFunction)py_srvsvc_NetServerStatisticsGet_ndr_opnum, METH_NOARGS|METH_CLASS,
   47799             :                 "srvsvc.NetServerStatisticsGet.opnum() -> 24 (0x18) " },
   47800             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetServerStatisticsGet_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   47801             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   47802             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetServerStatisticsGet_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   47803             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   47804             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetServerStatisticsGet_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   47805             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   47806             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetServerStatisticsGet_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   47807             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   47808             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetServerStatisticsGet_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   47809             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetServerStatisticsGet_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   47810             :         { NULL, NULL, 0, NULL }
   47811             : };
   47812             : 
   47813             : 
   47814             : static PyTypeObject srvsvc_NetServerStatisticsGet_Type = {
   47815             :         PyVarObject_HEAD_INIT(NULL, 0)
   47816             :         .tp_name = "srvsvc.NetServerStatisticsGet",
   47817             :         .tp_getset = py_srvsvc_NetServerStatisticsGet_getsetters,
   47818             :         .tp_methods = py_srvsvc_NetServerStatisticsGet_methods,
   47819             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   47820             :         .tp_new = py_srvsvc_NetServerStatisticsGet_new,
   47821             : };
   47822             : 
   47823           0 : static bool pack_py_srvsvc_NetServerStatisticsGet_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetServerStatisticsGet *r)
   47824             : {
   47825             :         PyObject *py_server_unc;
   47826             :         PyObject *py_service;
   47827             :         PyObject *py_level;
   47828             :         PyObject *py_options;
   47829           0 :         const char *kwnames[] = {
   47830             :                 "server_unc", "service", "level", "options", NULL
   47831             :         };
   47832             : 
   47833           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetServerStatisticsGet", discard_const_p(char *, kwnames), &py_server_unc, &py_service, &py_level, &py_options)) {
   47834           0 :                 return false;
   47835             :         }
   47836             : 
   47837           0 :         if (py_server_unc == NULL) {
   47838           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   47839           0 :                 return false;
   47840             :         }
   47841           0 :         if (py_server_unc == Py_None) {
   47842           0 :                 r->in.server_unc = NULL;
   47843             :         } else {
   47844           0 :                 r->in.server_unc = NULL;
   47845             :                 {
   47846             :                         const char *test_str;
   47847             :                         const char *talloc_str;
   47848           0 :                         PyObject *unicode = NULL;
   47849           0 :                         if (PyUnicode_Check(py_server_unc)) {
   47850           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   47851           0 :                                 if (unicode == NULL) {
   47852           0 :                                         PyErr_NoMemory();
   47853           0 :                                         return false;
   47854             :                                 }
   47855           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   47856           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   47857           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   47858             :                         } else {
   47859           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   47860           0 :                                 return false;
   47861             :                         }
   47862           0 :                         talloc_str = talloc_strdup(r, test_str);
   47863           0 :                         if (unicode != NULL) {
   47864           0 :                                 Py_DECREF(unicode);
   47865             :                         }
   47866           0 :                         if (talloc_str == NULL) {
   47867           0 :                                 PyErr_NoMemory();
   47868           0 :                                 return false;
   47869             :                         }
   47870           0 :                         r->in.server_unc = talloc_str;
   47871             :                 }
   47872             :         }
   47873           0 :         if (py_service == NULL) {
   47874           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.service");
   47875           0 :                 return false;
   47876             :         }
   47877           0 :         if (py_service == Py_None) {
   47878           0 :                 r->in.service = NULL;
   47879             :         } else {
   47880           0 :                 r->in.service = NULL;
   47881             :                 {
   47882             :                         const char *test_str;
   47883             :                         const char *talloc_str;
   47884           0 :                         PyObject *unicode = NULL;
   47885           0 :                         if (PyUnicode_Check(py_service)) {
   47886           0 :                                 unicode = PyUnicode_AsEncodedString(py_service, "utf-8", "ignore");
   47887           0 :                                 if (unicode == NULL) {
   47888           0 :                                         PyErr_NoMemory();
   47889           0 :                                         return false;
   47890             :                                 }
   47891           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   47892           0 :                         } else if (PyBytes_Check(py_service)) {
   47893           0 :                                 test_str = PyBytes_AS_STRING(py_service);
   47894             :                         } else {
   47895           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_service)->tp_name);
   47896           0 :                                 return false;
   47897             :                         }
   47898           0 :                         talloc_str = talloc_strdup(r, test_str);
   47899           0 :                         if (unicode != NULL) {
   47900           0 :                                 Py_DECREF(unicode);
   47901             :                         }
   47902           0 :                         if (talloc_str == NULL) {
   47903           0 :                                 PyErr_NoMemory();
   47904           0 :                                 return false;
   47905             :                         }
   47906           0 :                         r->in.service = talloc_str;
   47907             :                 }
   47908             :         }
   47909           0 :         if (py_level == NULL) {
   47910           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   47911           0 :                 return false;
   47912             :         }
   47913             :         {
   47914           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   47915           0 :                 if (PyLong_Check(py_level)) {
   47916             :                         unsigned long long test_var;
   47917           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   47918           0 :                         if (PyErr_Occurred() != NULL) {
   47919           0 :                                 return false;
   47920             :                         }
   47921           0 :                         if (test_var > uint_max) {
   47922           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   47923             :                                   PyLong_Type.tp_name, uint_max, test_var);
   47924           0 :                                 return false;
   47925             :                         }
   47926           0 :                         r->in.level = test_var;
   47927             :                 } else {
   47928           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   47929             :                           PyLong_Type.tp_name);
   47930           0 :                         return false;
   47931             :                 }
   47932             :         }
   47933           0 :         if (py_options == NULL) {
   47934           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.options");
   47935           0 :                 return false;
   47936             :         }
   47937             :         {
   47938           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.options));
   47939           0 :                 if (PyLong_Check(py_options)) {
   47940             :                         unsigned long long test_var;
   47941           0 :                         test_var = PyLong_AsUnsignedLongLong(py_options);
   47942           0 :                         if (PyErr_Occurred() != NULL) {
   47943           0 :                                 return false;
   47944             :                         }
   47945           0 :                         if (test_var > uint_max) {
   47946           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   47947             :                                   PyLong_Type.tp_name, uint_max, test_var);
   47948           0 :                                 return false;
   47949             :                         }
   47950           0 :                         r->in.options = test_var;
   47951             :                 } else {
   47952           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   47953             :                           PyLong_Type.tp_name);
   47954           0 :                         return false;
   47955             :                 }
   47956             :         }
   47957           0 :         return true;
   47958             : }
   47959             : 
   47960           0 : static PyObject *unpack_py_srvsvc_NetServerStatisticsGet_args_out(struct srvsvc_NetServerStatisticsGet *r)
   47961             : {
   47962             :         PyObject *result;
   47963             :         PyObject *py_stats;
   47964           0 :         if (*r->out.stats == NULL) {
   47965           0 :                 py_stats = Py_None;
   47966           0 :                 Py_INCREF(py_stats);
   47967             :         } else {
   47968           0 :                 py_stats = pytalloc_reference_ex(&srvsvc_Statistics_Type, *r->out.stats, *r->out.stats);
   47969             :         }
   47970           0 :         result = py_stats;
   47971           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   47972           0 :                 PyErr_SetWERROR(r->out.result);
   47973           0 :                 return NULL;
   47974             :         }
   47975             : 
   47976           0 :         return result;
   47977             : }
   47978             : 
   47979             : 
   47980           0 : static PyObject *py_srvsvc_NetTransportAdd_in_get_server_unc(PyObject *obj, void *closure)
   47981             : {
   47982           0 :         struct srvsvc_NetTransportAdd *object = (struct srvsvc_NetTransportAdd *)pytalloc_get_ptr(obj);
   47983             :         PyObject *py_server_unc;
   47984           0 :         if (object->in.server_unc == NULL) {
   47985           0 :                 Py_RETURN_NONE;
   47986             :         }
   47987           0 :         if (object->in.server_unc == NULL) {
   47988           0 :                 py_server_unc = Py_None;
   47989           0 :                 Py_INCREF(py_server_unc);
   47990             :         } else {
   47991           0 :                 if (object->in.server_unc == NULL) {
   47992           0 :                         py_server_unc = Py_None;
   47993           0 :                         Py_INCREF(py_server_unc);
   47994             :                 } else {
   47995           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   47996             :                 }
   47997             :         }
   47998           0 :         return py_server_unc;
   47999             : }
   48000             : 
   48001           0 : static int py_srvsvc_NetTransportAdd_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   48002             : {
   48003           0 :         struct srvsvc_NetTransportAdd *object = (struct srvsvc_NetTransportAdd *)pytalloc_get_ptr(py_obj);
   48004           0 :         if (value == NULL) {
   48005           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   48006           0 :                 return -1;
   48007             :         }
   48008           0 :         if (value == Py_None) {
   48009           0 :                 object->in.server_unc = NULL;
   48010             :         } else {
   48011           0 :                 object->in.server_unc = NULL;
   48012             :                 {
   48013             :                         const char *test_str;
   48014             :                         const char *talloc_str;
   48015           0 :                         PyObject *unicode = NULL;
   48016           0 :                         if (PyUnicode_Check(value)) {
   48017           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   48018           0 :                                 if (unicode == NULL) {
   48019           0 :                                         PyErr_NoMemory();
   48020           0 :                                         return -1;
   48021             :                                 }
   48022           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   48023           0 :                         } else if (PyBytes_Check(value)) {
   48024           0 :                                 test_str = PyBytes_AS_STRING(value);
   48025             :                         } else {
   48026           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   48027           0 :                                 return -1;
   48028             :                         }
   48029           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   48030           0 :                         if (unicode != NULL) {
   48031           0 :                                 Py_DECREF(unicode);
   48032             :                         }
   48033           0 :                         if (talloc_str == NULL) {
   48034           0 :                                 PyErr_NoMemory();
   48035           0 :                                 return -1;
   48036             :                         }
   48037           0 :                         object->in.server_unc = talloc_str;
   48038             :                 }
   48039             :         }
   48040           0 :         return 0;
   48041             : }
   48042             : 
   48043           0 : static PyObject *py_srvsvc_NetTransportAdd_in_get_level(PyObject *obj, void *closure)
   48044             : {
   48045           0 :         struct srvsvc_NetTransportAdd *object = (struct srvsvc_NetTransportAdd *)pytalloc_get_ptr(obj);
   48046             :         PyObject *py_level;
   48047           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   48048           0 :         return py_level;
   48049             : }
   48050             : 
   48051           0 : static int py_srvsvc_NetTransportAdd_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   48052             : {
   48053           0 :         struct srvsvc_NetTransportAdd *object = (struct srvsvc_NetTransportAdd *)pytalloc_get_ptr(py_obj);
   48054           0 :         if (value == NULL) {
   48055           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   48056           0 :                 return -1;
   48057             :         }
   48058             :         {
   48059           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   48060           0 :                 if (PyLong_Check(value)) {
   48061             :                         unsigned long long test_var;
   48062           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   48063           0 :                         if (PyErr_Occurred() != NULL) {
   48064           0 :                                 return -1;
   48065             :                         }
   48066           0 :                         if (test_var > uint_max) {
   48067           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   48068             :                                   PyLong_Type.tp_name, uint_max, test_var);
   48069           0 :                                 return -1;
   48070             :                         }
   48071           0 :                         object->in.level = test_var;
   48072             :                 } else {
   48073           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   48074             :                           PyLong_Type.tp_name);
   48075           0 :                         return -1;
   48076             :                 }
   48077             :         }
   48078           0 :         return 0;
   48079             : }
   48080             : 
   48081           0 : static PyObject *py_srvsvc_NetTransportAdd_in_get_info(PyObject *obj, void *closure)
   48082             : {
   48083           0 :         struct srvsvc_NetTransportAdd *object = (struct srvsvc_NetTransportAdd *)pytalloc_get_ptr(obj);
   48084             :         PyObject *py_info;
   48085           0 :         py_info = pyrpc_import_union(&srvsvc_NetTransportInfo_Type, pytalloc_get_mem_ctx(obj), object->in.level, &object->in.info, "union srvsvc_NetTransportInfo");
   48086           0 :         if (py_info == NULL) {
   48087           0 :                 return NULL;
   48088             :         }
   48089           0 :         return py_info;
   48090             : }
   48091             : 
   48092           0 : static int py_srvsvc_NetTransportAdd_in_set_info(PyObject *py_obj, PyObject *value, void *closure)
   48093             : {
   48094           0 :         struct srvsvc_NetTransportAdd *object = (struct srvsvc_NetTransportAdd *)pytalloc_get_ptr(py_obj);
   48095           0 :         if (value == NULL) {
   48096           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.info");
   48097           0 :                 return -1;
   48098             :         }
   48099             :         {
   48100             :                 union srvsvc_NetTransportInfo *info_switch_0;
   48101           0 :                 info_switch_0 = (union srvsvc_NetTransportInfo *)pyrpc_export_union(&srvsvc_NetTransportInfo_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union srvsvc_NetTransportInfo");
   48102           0 :                 if (info_switch_0 == NULL) {
   48103           0 :                         return -1;
   48104             :                 }
   48105           0 :                 object->in.info = *info_switch_0;
   48106             :         }
   48107           0 :         return 0;
   48108             : }
   48109             : 
   48110           0 : static PyObject *py_srvsvc_NetTransportAdd_get_result(PyObject *obj, void *closure)
   48111             : {
   48112           0 :         struct srvsvc_NetTransportAdd *object = (struct srvsvc_NetTransportAdd *)pytalloc_get_ptr(obj);
   48113             :         PyObject *py_result;
   48114           0 :         py_result = PyErr_FromWERROR(object->out.result);
   48115           0 :         return py_result;
   48116             : }
   48117             : 
   48118           0 : static int py_srvsvc_NetTransportAdd_set_result(PyObject *py_obj, PyObject *value, void *closure)
   48119             : {
   48120           0 :         struct srvsvc_NetTransportAdd *object = (struct srvsvc_NetTransportAdd *)pytalloc_get_ptr(py_obj);
   48121           0 :         if (value == NULL) {
   48122           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   48123           0 :                 return -1;
   48124             :         }
   48125           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   48126           0 :         return 0;
   48127             : }
   48128             : 
   48129             : static PyGetSetDef py_srvsvc_NetTransportAdd_getsetters[] = {
   48130             :         {
   48131             :                 .name = discard_const_p(char, "in_server_unc"),
   48132             :                 .get = py_srvsvc_NetTransportAdd_in_get_server_unc,
   48133             :                 .set = py_srvsvc_NetTransportAdd_in_set_server_unc,
   48134             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   48135             :         },
   48136             :         {
   48137             :                 .name = discard_const_p(char, "in_level"),
   48138             :                 .get = py_srvsvc_NetTransportAdd_in_get_level,
   48139             :                 .set = py_srvsvc_NetTransportAdd_in_set_level,
   48140             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   48141             :         },
   48142             :         {
   48143             :                 .name = discard_const_p(char, "in_info"),
   48144             :                 .get = py_srvsvc_NetTransportAdd_in_get_info,
   48145             :                 .set = py_srvsvc_NetTransportAdd_in_set_info,
   48146             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetTransportInfo")
   48147             :         },
   48148             :         {
   48149             :                 .name = discard_const_p(char, "result"),
   48150             :                 .get = py_srvsvc_NetTransportAdd_get_result,
   48151             :                 .set = py_srvsvc_NetTransportAdd_set_result,
   48152             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   48153             :         },
   48154             :         { .name = NULL }
   48155             : };
   48156             : 
   48157           0 : static PyObject *py_srvsvc_NetTransportAdd_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   48158             : {
   48159           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetTransportAdd, type);
   48160           0 :         return self;
   48161             : }
   48162             : 
   48163           0 : static PyObject *py_srvsvc_NetTransportAdd_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   48164             : {
   48165             : 
   48166             : 
   48167           0 :         return PyLong_FromLong(25);
   48168             : }
   48169             : 
   48170           0 : static PyObject *py_srvsvc_NetTransportAdd_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   48171             : {
   48172           0 :         const struct ndr_interface_call *call = NULL;
   48173           0 :         struct srvsvc_NetTransportAdd *object = (struct srvsvc_NetTransportAdd *)pytalloc_get_ptr(py_obj);
   48174           0 :         PyObject *ret = NULL;
   48175           0 :         struct ndr_push *push = NULL;
   48176             :         DATA_BLOB blob;
   48177             :         enum ndr_err_code err;
   48178             : 
   48179           0 :         if (ndr_table_srvsvc.num_calls < 26) {
   48180           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetTransportAdd_ndr_pack");
   48181           0 :                 return NULL;
   48182             :         }
   48183           0 :         call = &ndr_table_srvsvc.calls[25];
   48184             : 
   48185           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   48186           0 :         if (push == NULL) {
   48187           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   48188           0 :                 return NULL;
   48189             :         }
   48190             : 
   48191           0 :         push->flags |= ndr_push_flags;
   48192             : 
   48193           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   48194           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   48195           0 :                 TALLOC_FREE(push);
   48196           0 :                 PyErr_SetNdrError(err);
   48197           0 :                 return NULL;
   48198             :         }
   48199           0 :         blob = ndr_push_blob(push);
   48200           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   48201           0 :         TALLOC_FREE(push);
   48202           0 :         return ret;
   48203             : }
   48204             : 
   48205           0 : static PyObject *py_srvsvc_NetTransportAdd_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   48206             : {
   48207           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   48208           0 :         PyObject *bigendian_obj = NULL;
   48209           0 :         PyObject *ndr64_obj = NULL;
   48210           0 :         uint32_t ndr_push_flags = 0;
   48211             : 
   48212           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   48213             :                 discard_const_p(char *, kwnames),
   48214             :                 &bigendian_obj,
   48215             :                 &ndr64_obj)) {
   48216           0 :                 return NULL;
   48217             :         }
   48218             : 
   48219           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   48220           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   48221             :         }
   48222           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   48223           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   48224             :         }
   48225             : 
   48226           0 :         return py_srvsvc_NetTransportAdd_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   48227             : }
   48228             : 
   48229           0 : static PyObject *py_srvsvc_NetTransportAdd_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   48230             : {
   48231           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   48232           0 :         PyObject *bigendian_obj = NULL;
   48233           0 :         PyObject *ndr64_obj = NULL;
   48234           0 :         uint32_t ndr_push_flags = 0;
   48235             : 
   48236           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   48237             :                 discard_const_p(char *, kwnames),
   48238             :                 &bigendian_obj,
   48239             :                 &ndr64_obj)) {
   48240           0 :                 return NULL;
   48241             :         }
   48242             : 
   48243           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   48244           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   48245             :         }
   48246           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   48247           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   48248             :         }
   48249             : 
   48250           0 :         return py_srvsvc_NetTransportAdd_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   48251             : }
   48252             : 
   48253           0 : static PyObject *py_srvsvc_NetTransportAdd_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   48254             : {
   48255           0 :         const struct ndr_interface_call *call = NULL;
   48256           0 :         struct srvsvc_NetTransportAdd *object = (struct srvsvc_NetTransportAdd *)pytalloc_get_ptr(py_obj);
   48257           0 :         struct ndr_pull *pull = NULL;
   48258             :         enum ndr_err_code err;
   48259             : 
   48260           0 :         if (ndr_table_srvsvc.num_calls < 26) {
   48261           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetTransportAdd_ndr_unpack");
   48262           0 :                 return NULL;
   48263             :         }
   48264           0 :         call = &ndr_table_srvsvc.calls[25];
   48265             : 
   48266           0 :         pull = ndr_pull_init_blob(blob, object);
   48267           0 :         if (pull == NULL) {
   48268           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   48269           0 :                 return NULL;
   48270             :         }
   48271             : 
   48272           0 :         pull->flags |= ndr_pull_flags;
   48273             : 
   48274           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   48275           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   48276           0 :                 TALLOC_FREE(pull);
   48277           0 :                 PyErr_SetNdrError(err);
   48278           0 :                 return NULL;
   48279             :         }
   48280           0 :         if (!allow_remaining) {
   48281             :                 uint32_t highest_ofs;
   48282             : 
   48283           0 :                 if (pull->offset > pull->relative_highest_offset) {
   48284           0 :                         highest_ofs = pull->offset;
   48285             :                 } else {
   48286           0 :                         highest_ofs = pull->relative_highest_offset;
   48287             :                 }
   48288           0 :                 if (highest_ofs < pull->data_size) {
   48289           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   48290             :                                 "not all bytes consumed ofs[%u] size[%u]",
   48291             :                                 highest_ofs, pull->data_size);
   48292           0 :                         TALLOC_FREE(pull);
   48293           0 :                         PyErr_SetNdrError(err);
   48294           0 :                         return NULL;
   48295             :                 }
   48296             :         }
   48297             : 
   48298           0 :         TALLOC_FREE(pull);
   48299           0 :         Py_RETURN_NONE;
   48300             : }
   48301             : 
   48302           0 : static PyObject *py_srvsvc_NetTransportAdd_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   48303             : {
   48304             :         DATA_BLOB blob;
   48305           0 :         Py_ssize_t blob_length = 0;
   48306           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   48307           0 :         PyObject *bigendian_obj = NULL;
   48308           0 :         PyObject *ndr64_obj = NULL;
   48309           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   48310           0 :         PyObject *allow_remaining_obj = NULL;
   48311           0 :         bool allow_remaining = false;
   48312             : 
   48313           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   48314             :                 discard_const_p(char *, kwnames),
   48315             :                 &blob.data, &blob_length,
   48316             :                 &bigendian_obj,
   48317             :                 &ndr64_obj,
   48318             :                 &allow_remaining_obj)) {
   48319           0 :                 return NULL;
   48320             :         }
   48321           0 :         blob.length = blob_length;
   48322             : 
   48323           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   48324           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   48325             :         }
   48326           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   48327           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   48328             :         }
   48329             : 
   48330           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   48331           0 :                 allow_remaining = true;
   48332             :         }
   48333             : 
   48334           0 :         return py_srvsvc_NetTransportAdd_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   48335             : }
   48336             : 
   48337           0 : static PyObject *py_srvsvc_NetTransportAdd_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   48338             : {
   48339             :         DATA_BLOB blob;
   48340           0 :         Py_ssize_t blob_length = 0;
   48341           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   48342           0 :         PyObject *bigendian_obj = NULL;
   48343           0 :         PyObject *ndr64_obj = NULL;
   48344           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   48345           0 :         PyObject *allow_remaining_obj = NULL;
   48346           0 :         bool allow_remaining = false;
   48347             : 
   48348           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   48349             :                 discard_const_p(char *, kwnames),
   48350             :                 &blob.data, &blob_length,
   48351             :                 &bigendian_obj,
   48352             :                 &ndr64_obj,
   48353             :                 &allow_remaining_obj)) {
   48354           0 :                 return NULL;
   48355             :         }
   48356           0 :         blob.length = blob_length;
   48357             : 
   48358           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   48359           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   48360             :         }
   48361           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   48362           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   48363             :         }
   48364             : 
   48365           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   48366           0 :                 allow_remaining = true;
   48367             :         }
   48368             : 
   48369           0 :         return py_srvsvc_NetTransportAdd_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   48370             : }
   48371             : 
   48372           0 : static PyObject *py_srvsvc_NetTransportAdd_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   48373             : {
   48374           0 :         const struct ndr_interface_call *call = NULL;
   48375           0 :         struct srvsvc_NetTransportAdd *object = (struct srvsvc_NetTransportAdd *)pytalloc_get_ptr(py_obj);
   48376             :         PyObject *ret;
   48377             :         char *retstr;
   48378             : 
   48379           0 :         if (ndr_table_srvsvc.num_calls < 26) {
   48380           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetTransportAdd_ndr_print");
   48381           0 :                 return NULL;
   48382             :         }
   48383           0 :         call = &ndr_table_srvsvc.calls[25];
   48384             : 
   48385           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   48386           0 :         ret = PyUnicode_FromString(retstr);
   48387           0 :         TALLOC_FREE(retstr);
   48388             : 
   48389           0 :         return ret;
   48390             : }
   48391             : 
   48392           0 : static PyObject *py_srvsvc_NetTransportAdd_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   48393             : {
   48394           0 :         return py_srvsvc_NetTransportAdd_ndr_print(py_obj, "srvsvc_NetTransportAdd_in", NDR_IN);
   48395             : }
   48396             : 
   48397           0 : static PyObject *py_srvsvc_NetTransportAdd_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   48398             : {
   48399           0 :         return py_srvsvc_NetTransportAdd_ndr_print(py_obj, "srvsvc_NetTransportAdd_out", NDR_OUT);
   48400             : }
   48401             : 
   48402             : static PyMethodDef py_srvsvc_NetTransportAdd_methods[] = {
   48403             :         { "opnum", (PyCFunction)py_srvsvc_NetTransportAdd_ndr_opnum, METH_NOARGS|METH_CLASS,
   48404             :                 "srvsvc.NetTransportAdd.opnum() -> 25 (0x19) " },
   48405             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportAdd_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   48406             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   48407             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportAdd_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   48408             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   48409             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportAdd_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   48410             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   48411             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportAdd_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   48412             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   48413             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetTransportAdd_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   48414             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetTransportAdd_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   48415             :         { NULL, NULL, 0, NULL }
   48416             : };
   48417             : 
   48418             : 
   48419             : static PyTypeObject srvsvc_NetTransportAdd_Type = {
   48420             :         PyVarObject_HEAD_INIT(NULL, 0)
   48421             :         .tp_name = "srvsvc.NetTransportAdd",
   48422             :         .tp_getset = py_srvsvc_NetTransportAdd_getsetters,
   48423             :         .tp_methods = py_srvsvc_NetTransportAdd_methods,
   48424             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   48425             :         .tp_new = py_srvsvc_NetTransportAdd_new,
   48426             : };
   48427             : 
   48428           0 : static bool pack_py_srvsvc_NetTransportAdd_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetTransportAdd *r)
   48429             : {
   48430             :         PyObject *py_server_unc;
   48431             :         PyObject *py_level;
   48432             :         PyObject *py_info;
   48433           0 :         const char *kwnames[] = {
   48434             :                 "server_unc", "level", "info", NULL
   48435             :         };
   48436             : 
   48437           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetTransportAdd", discard_const_p(char *, kwnames), &py_server_unc, &py_level, &py_info)) {
   48438           0 :                 return false;
   48439             :         }
   48440             : 
   48441           0 :         if (py_server_unc == NULL) {
   48442           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   48443           0 :                 return false;
   48444             :         }
   48445           0 :         if (py_server_unc == Py_None) {
   48446           0 :                 r->in.server_unc = NULL;
   48447             :         } else {
   48448           0 :                 r->in.server_unc = NULL;
   48449             :                 {
   48450             :                         const char *test_str;
   48451             :                         const char *talloc_str;
   48452           0 :                         PyObject *unicode = NULL;
   48453           0 :                         if (PyUnicode_Check(py_server_unc)) {
   48454           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   48455           0 :                                 if (unicode == NULL) {
   48456           0 :                                         PyErr_NoMemory();
   48457           0 :                                         return false;
   48458             :                                 }
   48459           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   48460           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   48461           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   48462             :                         } else {
   48463           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   48464           0 :                                 return false;
   48465             :                         }
   48466           0 :                         talloc_str = talloc_strdup(r, test_str);
   48467           0 :                         if (unicode != NULL) {
   48468           0 :                                 Py_DECREF(unicode);
   48469             :                         }
   48470           0 :                         if (talloc_str == NULL) {
   48471           0 :                                 PyErr_NoMemory();
   48472           0 :                                 return false;
   48473             :                         }
   48474           0 :                         r->in.server_unc = talloc_str;
   48475             :                 }
   48476             :         }
   48477           0 :         if (py_level == NULL) {
   48478           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   48479           0 :                 return false;
   48480             :         }
   48481             :         {
   48482           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   48483           0 :                 if (PyLong_Check(py_level)) {
   48484             :                         unsigned long long test_var;
   48485           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   48486           0 :                         if (PyErr_Occurred() != NULL) {
   48487           0 :                                 return false;
   48488             :                         }
   48489           0 :                         if (test_var > uint_max) {
   48490           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   48491             :                                   PyLong_Type.tp_name, uint_max, test_var);
   48492           0 :                                 return false;
   48493             :                         }
   48494           0 :                         r->in.level = test_var;
   48495             :                 } else {
   48496           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   48497             :                           PyLong_Type.tp_name);
   48498           0 :                         return false;
   48499             :                 }
   48500             :         }
   48501           0 :         if (py_info == NULL) {
   48502           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info");
   48503           0 :                 return false;
   48504             :         }
   48505             :         {
   48506             :                 union srvsvc_NetTransportInfo *info_switch_0;
   48507           0 :                 info_switch_0 = (union srvsvc_NetTransportInfo *)pyrpc_export_union(&srvsvc_NetTransportInfo_Type, r, r->in.level, py_info, "union srvsvc_NetTransportInfo");
   48508           0 :                 if (info_switch_0 == NULL) {
   48509           0 :                         return false;
   48510             :                 }
   48511           0 :                 r->in.info = *info_switch_0;
   48512             :         }
   48513           0 :         return true;
   48514             : }
   48515             : 
   48516           0 : static PyObject *unpack_py_srvsvc_NetTransportAdd_args_out(struct srvsvc_NetTransportAdd *r)
   48517             : {
   48518             :         PyObject *result;
   48519           0 :         result = Py_None;
   48520           0 :         Py_INCREF(result);
   48521           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   48522           0 :                 PyErr_SetWERROR(r->out.result);
   48523           0 :                 return NULL;
   48524             :         }
   48525             : 
   48526           0 :         return result;
   48527             : }
   48528             : 
   48529             : 
   48530           0 : static PyObject *py_srvsvc_NetTransportEnum_in_get_server_unc(PyObject *obj, void *closure)
   48531             : {
   48532           0 :         struct srvsvc_NetTransportEnum *object = (struct srvsvc_NetTransportEnum *)pytalloc_get_ptr(obj);
   48533             :         PyObject *py_server_unc;
   48534           0 :         if (object->in.server_unc == NULL) {
   48535           0 :                 Py_RETURN_NONE;
   48536             :         }
   48537           0 :         if (object->in.server_unc == NULL) {
   48538           0 :                 py_server_unc = Py_None;
   48539           0 :                 Py_INCREF(py_server_unc);
   48540             :         } else {
   48541           0 :                 if (object->in.server_unc == NULL) {
   48542           0 :                         py_server_unc = Py_None;
   48543           0 :                         Py_INCREF(py_server_unc);
   48544             :                 } else {
   48545           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   48546             :                 }
   48547             :         }
   48548           0 :         return py_server_unc;
   48549             : }
   48550             : 
   48551           0 : static int py_srvsvc_NetTransportEnum_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   48552             : {
   48553           0 :         struct srvsvc_NetTransportEnum *object = (struct srvsvc_NetTransportEnum *)pytalloc_get_ptr(py_obj);
   48554           0 :         if (value == NULL) {
   48555           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   48556           0 :                 return -1;
   48557             :         }
   48558           0 :         if (value == Py_None) {
   48559           0 :                 object->in.server_unc = NULL;
   48560             :         } else {
   48561           0 :                 object->in.server_unc = NULL;
   48562             :                 {
   48563             :                         const char *test_str;
   48564             :                         const char *talloc_str;
   48565           0 :                         PyObject *unicode = NULL;
   48566           0 :                         if (PyUnicode_Check(value)) {
   48567           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   48568           0 :                                 if (unicode == NULL) {
   48569           0 :                                         PyErr_NoMemory();
   48570           0 :                                         return -1;
   48571             :                                 }
   48572           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   48573           0 :                         } else if (PyBytes_Check(value)) {
   48574           0 :                                 test_str = PyBytes_AS_STRING(value);
   48575             :                         } else {
   48576           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   48577           0 :                                 return -1;
   48578             :                         }
   48579           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   48580           0 :                         if (unicode != NULL) {
   48581           0 :                                 Py_DECREF(unicode);
   48582             :                         }
   48583           0 :                         if (talloc_str == NULL) {
   48584           0 :                                 PyErr_NoMemory();
   48585           0 :                                 return -1;
   48586             :                         }
   48587           0 :                         object->in.server_unc = talloc_str;
   48588             :                 }
   48589             :         }
   48590           0 :         return 0;
   48591             : }
   48592             : 
   48593           0 : static PyObject *py_srvsvc_NetTransportEnum_in_get_transports(PyObject *obj, void *closure)
   48594             : {
   48595           0 :         struct srvsvc_NetTransportEnum *object = (struct srvsvc_NetTransportEnum *)pytalloc_get_ptr(obj);
   48596             :         PyObject *py_transports;
   48597           0 :         if (object->in.transports == NULL) {
   48598           0 :                 Py_RETURN_NONE;
   48599             :         }
   48600           0 :         py_transports = pytalloc_reference_ex(&srvsvc_NetTransportInfoCtr_Type, object->in.transports, object->in.transports);
   48601           0 :         return py_transports;
   48602             : }
   48603             : 
   48604           0 : static int py_srvsvc_NetTransportEnum_in_set_transports(PyObject *py_obj, PyObject *value, void *closure)
   48605             : {
   48606           0 :         struct srvsvc_NetTransportEnum *object = (struct srvsvc_NetTransportEnum *)pytalloc_get_ptr(py_obj);
   48607           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.transports));
   48608           0 :         if (value == NULL) {
   48609           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.transports");
   48610           0 :                 return -1;
   48611             :         }
   48612           0 :         object->in.transports = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.transports);
   48613           0 :         if (object->in.transports == NULL) {
   48614           0 :                 PyErr_NoMemory();
   48615           0 :                 return -1;
   48616             :         }
   48617           0 :         PY_CHECK_TYPE(&srvsvc_NetTransportInfoCtr_Type, value, return -1;);
   48618           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   48619           0 :                 PyErr_NoMemory();
   48620           0 :                 return -1;
   48621             :         }
   48622           0 :         object->in.transports = (struct srvsvc_NetTransportInfoCtr *)pytalloc_get_ptr(value);
   48623           0 :         return 0;
   48624             : }
   48625             : 
   48626           0 : static PyObject *py_srvsvc_NetTransportEnum_out_get_transports(PyObject *obj, void *closure)
   48627             : {
   48628           0 :         struct srvsvc_NetTransportEnum *object = (struct srvsvc_NetTransportEnum *)pytalloc_get_ptr(obj);
   48629             :         PyObject *py_transports;
   48630           0 :         if (object->out.transports == NULL) {
   48631           0 :                 Py_RETURN_NONE;
   48632             :         }
   48633           0 :         py_transports = pytalloc_reference_ex(&srvsvc_NetTransportInfoCtr_Type, object->out.transports, object->out.transports);
   48634           0 :         return py_transports;
   48635             : }
   48636             : 
   48637           0 : static int py_srvsvc_NetTransportEnum_out_set_transports(PyObject *py_obj, PyObject *value, void *closure)
   48638             : {
   48639           0 :         struct srvsvc_NetTransportEnum *object = (struct srvsvc_NetTransportEnum *)pytalloc_get_ptr(py_obj);
   48640           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.transports));
   48641           0 :         if (value == NULL) {
   48642           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.transports");
   48643           0 :                 return -1;
   48644             :         }
   48645           0 :         object->out.transports = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.transports);
   48646           0 :         if (object->out.transports == NULL) {
   48647           0 :                 PyErr_NoMemory();
   48648           0 :                 return -1;
   48649             :         }
   48650           0 :         PY_CHECK_TYPE(&srvsvc_NetTransportInfoCtr_Type, value, return -1;);
   48651           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   48652           0 :                 PyErr_NoMemory();
   48653           0 :                 return -1;
   48654             :         }
   48655           0 :         object->out.transports = (struct srvsvc_NetTransportInfoCtr *)pytalloc_get_ptr(value);
   48656           0 :         return 0;
   48657             : }
   48658             : 
   48659           0 : static PyObject *py_srvsvc_NetTransportEnum_in_get_max_buffer(PyObject *obj, void *closure)
   48660             : {
   48661           0 :         struct srvsvc_NetTransportEnum *object = (struct srvsvc_NetTransportEnum *)pytalloc_get_ptr(obj);
   48662             :         PyObject *py_max_buffer;
   48663           0 :         py_max_buffer = PyLong_FromUnsignedLongLong((uint32_t)object->in.max_buffer);
   48664           0 :         return py_max_buffer;
   48665             : }
   48666             : 
   48667           0 : static int py_srvsvc_NetTransportEnum_in_set_max_buffer(PyObject *py_obj, PyObject *value, void *closure)
   48668             : {
   48669           0 :         struct srvsvc_NetTransportEnum *object = (struct srvsvc_NetTransportEnum *)pytalloc_get_ptr(py_obj);
   48670           0 :         if (value == NULL) {
   48671           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.max_buffer");
   48672           0 :                 return -1;
   48673             :         }
   48674             :         {
   48675           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.max_buffer));
   48676           0 :                 if (PyLong_Check(value)) {
   48677             :                         unsigned long long test_var;
   48678           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   48679           0 :                         if (PyErr_Occurred() != NULL) {
   48680           0 :                                 return -1;
   48681             :                         }
   48682           0 :                         if (test_var > uint_max) {
   48683           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   48684             :                                   PyLong_Type.tp_name, uint_max, test_var);
   48685           0 :                                 return -1;
   48686             :                         }
   48687           0 :                         object->in.max_buffer = test_var;
   48688             :                 } else {
   48689           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   48690             :                           PyLong_Type.tp_name);
   48691           0 :                         return -1;
   48692             :                 }
   48693             :         }
   48694           0 :         return 0;
   48695             : }
   48696             : 
   48697           0 : static PyObject *py_srvsvc_NetTransportEnum_out_get_totalentries(PyObject *obj, void *closure)
   48698             : {
   48699           0 :         struct srvsvc_NetTransportEnum *object = (struct srvsvc_NetTransportEnum *)pytalloc_get_ptr(obj);
   48700             :         PyObject *py_totalentries;
   48701           0 :         if (object->out.totalentries == NULL) {
   48702           0 :                 Py_RETURN_NONE;
   48703             :         }
   48704           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)*object->out.totalentries);
   48705           0 :         return py_totalentries;
   48706             : }
   48707             : 
   48708           0 : static int py_srvsvc_NetTransportEnum_out_set_totalentries(PyObject *py_obj, PyObject *value, void *closure)
   48709             : {
   48710           0 :         struct srvsvc_NetTransportEnum *object = (struct srvsvc_NetTransportEnum *)pytalloc_get_ptr(py_obj);
   48711           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.totalentries));
   48712           0 :         if (value == NULL) {
   48713           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.totalentries");
   48714           0 :                 return -1;
   48715             :         }
   48716           0 :         object->out.totalentries = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.totalentries);
   48717           0 :         if (object->out.totalentries == NULL) {
   48718           0 :                 PyErr_NoMemory();
   48719           0 :                 return -1;
   48720             :         }
   48721             :         {
   48722           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.totalentries));
   48723           0 :                 if (PyLong_Check(value)) {
   48724             :                         unsigned long long test_var;
   48725           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   48726           0 :                         if (PyErr_Occurred() != NULL) {
   48727           0 :                                 return -1;
   48728             :                         }
   48729           0 :                         if (test_var > uint_max) {
   48730           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   48731             :                                   PyLong_Type.tp_name, uint_max, test_var);
   48732           0 :                                 return -1;
   48733             :                         }
   48734           0 :                         *object->out.totalentries = test_var;
   48735             :                 } else {
   48736           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   48737             :                           PyLong_Type.tp_name);
   48738           0 :                         return -1;
   48739             :                 }
   48740             :         }
   48741           0 :         return 0;
   48742             : }
   48743             : 
   48744           0 : static PyObject *py_srvsvc_NetTransportEnum_in_get_resume_handle(PyObject *obj, void *closure)
   48745             : {
   48746           0 :         struct srvsvc_NetTransportEnum *object = (struct srvsvc_NetTransportEnum *)pytalloc_get_ptr(obj);
   48747             :         PyObject *py_resume_handle;
   48748           0 :         if (object->in.resume_handle == NULL) {
   48749           0 :                 Py_RETURN_NONE;
   48750             :         }
   48751           0 :         if (object->in.resume_handle == NULL) {
   48752           0 :                 py_resume_handle = Py_None;
   48753           0 :                 Py_INCREF(py_resume_handle);
   48754             :         } else {
   48755           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)*object->in.resume_handle);
   48756             :         }
   48757           0 :         return py_resume_handle;
   48758             : }
   48759             : 
   48760           0 : static int py_srvsvc_NetTransportEnum_in_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   48761             : {
   48762           0 :         struct srvsvc_NetTransportEnum *object = (struct srvsvc_NetTransportEnum *)pytalloc_get_ptr(py_obj);
   48763           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.resume_handle));
   48764           0 :         if (value == NULL) {
   48765           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.resume_handle");
   48766           0 :                 return -1;
   48767             :         }
   48768           0 :         if (value == Py_None) {
   48769           0 :                 object->in.resume_handle = NULL;
   48770             :         } else {
   48771           0 :                 object->in.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.resume_handle);
   48772           0 :                 if (object->in.resume_handle == NULL) {
   48773           0 :                         PyErr_NoMemory();
   48774           0 :                         return -1;
   48775             :                 }
   48776             :                 {
   48777           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.resume_handle));
   48778           0 :                         if (PyLong_Check(value)) {
   48779             :                                 unsigned long long test_var;
   48780           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   48781           0 :                                 if (PyErr_Occurred() != NULL) {
   48782           0 :                                         return -1;
   48783             :                                 }
   48784           0 :                                 if (test_var > uint_max) {
   48785           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   48786             :                                           PyLong_Type.tp_name, uint_max, test_var);
   48787           0 :                                         return -1;
   48788             :                                 }
   48789           0 :                                 *object->in.resume_handle = test_var;
   48790             :                         } else {
   48791           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   48792             :                                   PyLong_Type.tp_name);
   48793           0 :                                 return -1;
   48794             :                         }
   48795             :                 }
   48796             :         }
   48797           0 :         return 0;
   48798             : }
   48799             : 
   48800           0 : static PyObject *py_srvsvc_NetTransportEnum_out_get_resume_handle(PyObject *obj, void *closure)
   48801             : {
   48802           0 :         struct srvsvc_NetTransportEnum *object = (struct srvsvc_NetTransportEnum *)pytalloc_get_ptr(obj);
   48803             :         PyObject *py_resume_handle;
   48804           0 :         if (object->out.resume_handle == NULL) {
   48805           0 :                 Py_RETURN_NONE;
   48806             :         }
   48807           0 :         if (object->out.resume_handle == NULL) {
   48808           0 :                 py_resume_handle = Py_None;
   48809           0 :                 Py_INCREF(py_resume_handle);
   48810             :         } else {
   48811           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)*object->out.resume_handle);
   48812             :         }
   48813           0 :         return py_resume_handle;
   48814             : }
   48815             : 
   48816           0 : static int py_srvsvc_NetTransportEnum_out_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   48817             : {
   48818           0 :         struct srvsvc_NetTransportEnum *object = (struct srvsvc_NetTransportEnum *)pytalloc_get_ptr(py_obj);
   48819           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.resume_handle));
   48820           0 :         if (value == NULL) {
   48821           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.resume_handle");
   48822           0 :                 return -1;
   48823             :         }
   48824           0 :         if (value == Py_None) {
   48825           0 :                 object->out.resume_handle = NULL;
   48826             :         } else {
   48827           0 :                 object->out.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.resume_handle);
   48828           0 :                 if (object->out.resume_handle == NULL) {
   48829           0 :                         PyErr_NoMemory();
   48830           0 :                         return -1;
   48831             :                 }
   48832             :                 {
   48833           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.resume_handle));
   48834           0 :                         if (PyLong_Check(value)) {
   48835             :                                 unsigned long long test_var;
   48836           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   48837           0 :                                 if (PyErr_Occurred() != NULL) {
   48838           0 :                                         return -1;
   48839             :                                 }
   48840           0 :                                 if (test_var > uint_max) {
   48841           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   48842             :                                           PyLong_Type.tp_name, uint_max, test_var);
   48843           0 :                                         return -1;
   48844             :                                 }
   48845           0 :                                 *object->out.resume_handle = test_var;
   48846             :                         } else {
   48847           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   48848             :                                   PyLong_Type.tp_name);
   48849           0 :                                 return -1;
   48850             :                         }
   48851             :                 }
   48852             :         }
   48853           0 :         return 0;
   48854             : }
   48855             : 
   48856           0 : static PyObject *py_srvsvc_NetTransportEnum_get_result(PyObject *obj, void *closure)
   48857             : {
   48858           0 :         struct srvsvc_NetTransportEnum *object = (struct srvsvc_NetTransportEnum *)pytalloc_get_ptr(obj);
   48859             :         PyObject *py_result;
   48860           0 :         py_result = PyErr_FromWERROR(object->out.result);
   48861           0 :         return py_result;
   48862             : }
   48863             : 
   48864           0 : static int py_srvsvc_NetTransportEnum_set_result(PyObject *py_obj, PyObject *value, void *closure)
   48865             : {
   48866           0 :         struct srvsvc_NetTransportEnum *object = (struct srvsvc_NetTransportEnum *)pytalloc_get_ptr(py_obj);
   48867           0 :         if (value == NULL) {
   48868           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   48869           0 :                 return -1;
   48870             :         }
   48871           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   48872           0 :         return 0;
   48873             : }
   48874             : 
   48875             : static PyGetSetDef py_srvsvc_NetTransportEnum_getsetters[] = {
   48876             :         {
   48877             :                 .name = discard_const_p(char, "in_server_unc"),
   48878             :                 .get = py_srvsvc_NetTransportEnum_in_get_server_unc,
   48879             :                 .set = py_srvsvc_NetTransportEnum_in_set_server_unc,
   48880             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   48881             :         },
   48882             :         {
   48883             :                 .name = discard_const_p(char, "in_transports"),
   48884             :                 .get = py_srvsvc_NetTransportEnum_in_get_transports,
   48885             :                 .set = py_srvsvc_NetTransportEnum_in_set_transports,
   48886             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetTransportInfoCtr")
   48887             :         },
   48888             :         {
   48889             :                 .name = discard_const_p(char, "out_transports"),
   48890             :                 .get = py_srvsvc_NetTransportEnum_out_get_transports,
   48891             :                 .set = py_srvsvc_NetTransportEnum_out_set_transports,
   48892             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetTransportInfoCtr")
   48893             :         },
   48894             :         {
   48895             :                 .name = discard_const_p(char, "in_max_buffer"),
   48896             :                 .get = py_srvsvc_NetTransportEnum_in_get_max_buffer,
   48897             :                 .set = py_srvsvc_NetTransportEnum_in_set_max_buffer,
   48898             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   48899             :         },
   48900             :         {
   48901             :                 .name = discard_const_p(char, "out_totalentries"),
   48902             :                 .get = py_srvsvc_NetTransportEnum_out_get_totalentries,
   48903             :                 .set = py_srvsvc_NetTransportEnum_out_set_totalentries,
   48904             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   48905             :         },
   48906             :         {
   48907             :                 .name = discard_const_p(char, "in_resume_handle"),
   48908             :                 .get = py_srvsvc_NetTransportEnum_in_get_resume_handle,
   48909             :                 .set = py_srvsvc_NetTransportEnum_in_set_resume_handle,
   48910             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   48911             :         },
   48912             :         {
   48913             :                 .name = discard_const_p(char, "out_resume_handle"),
   48914             :                 .get = py_srvsvc_NetTransportEnum_out_get_resume_handle,
   48915             :                 .set = py_srvsvc_NetTransportEnum_out_set_resume_handle,
   48916             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   48917             :         },
   48918             :         {
   48919             :                 .name = discard_const_p(char, "result"),
   48920             :                 .get = py_srvsvc_NetTransportEnum_get_result,
   48921             :                 .set = py_srvsvc_NetTransportEnum_set_result,
   48922             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   48923             :         },
   48924             :         { .name = NULL }
   48925             : };
   48926             : 
   48927           0 : static PyObject *py_srvsvc_NetTransportEnum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   48928             : {
   48929           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetTransportEnum, type);
   48930           0 :         struct srvsvc_NetTransportEnum *_self = (struct srvsvc_NetTransportEnum *)pytalloc_get_ptr(self);
   48931           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   48932           0 :         _self->in.transports = talloc_zero(mem_ctx, struct srvsvc_NetTransportInfoCtr);
   48933           0 :         _self->out.transports = talloc_zero(mem_ctx, struct srvsvc_NetTransportInfoCtr);
   48934           0 :         _self->out.totalentries = talloc_zero(mem_ctx, uint32_t);
   48935           0 :         return self;
   48936             : }
   48937             : 
   48938           0 : static PyObject *py_srvsvc_NetTransportEnum_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   48939             : {
   48940             : 
   48941             : 
   48942           0 :         return PyLong_FromLong(26);
   48943             : }
   48944             : 
   48945           0 : static PyObject *py_srvsvc_NetTransportEnum_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   48946             : {
   48947           0 :         const struct ndr_interface_call *call = NULL;
   48948           0 :         struct srvsvc_NetTransportEnum *object = (struct srvsvc_NetTransportEnum *)pytalloc_get_ptr(py_obj);
   48949           0 :         PyObject *ret = NULL;
   48950           0 :         struct ndr_push *push = NULL;
   48951             :         DATA_BLOB blob;
   48952             :         enum ndr_err_code err;
   48953             : 
   48954           0 :         if (ndr_table_srvsvc.num_calls < 27) {
   48955           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetTransportEnum_ndr_pack");
   48956           0 :                 return NULL;
   48957             :         }
   48958           0 :         call = &ndr_table_srvsvc.calls[26];
   48959             : 
   48960           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   48961           0 :         if (push == NULL) {
   48962           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   48963           0 :                 return NULL;
   48964             :         }
   48965             : 
   48966           0 :         push->flags |= ndr_push_flags;
   48967             : 
   48968           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   48969           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   48970           0 :                 TALLOC_FREE(push);
   48971           0 :                 PyErr_SetNdrError(err);
   48972           0 :                 return NULL;
   48973             :         }
   48974           0 :         blob = ndr_push_blob(push);
   48975           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   48976           0 :         TALLOC_FREE(push);
   48977           0 :         return ret;
   48978             : }
   48979             : 
   48980           0 : static PyObject *py_srvsvc_NetTransportEnum_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   48981             : {
   48982           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   48983           0 :         PyObject *bigendian_obj = NULL;
   48984           0 :         PyObject *ndr64_obj = NULL;
   48985           0 :         uint32_t ndr_push_flags = 0;
   48986             : 
   48987           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   48988             :                 discard_const_p(char *, kwnames),
   48989             :                 &bigendian_obj,
   48990             :                 &ndr64_obj)) {
   48991           0 :                 return NULL;
   48992             :         }
   48993             : 
   48994           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   48995           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   48996             :         }
   48997           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   48998           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   48999             :         }
   49000             : 
   49001           0 :         return py_srvsvc_NetTransportEnum_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   49002             : }
   49003             : 
   49004           0 : static PyObject *py_srvsvc_NetTransportEnum_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   49005             : {
   49006           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   49007           0 :         PyObject *bigendian_obj = NULL;
   49008           0 :         PyObject *ndr64_obj = NULL;
   49009           0 :         uint32_t ndr_push_flags = 0;
   49010             : 
   49011           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   49012             :                 discard_const_p(char *, kwnames),
   49013             :                 &bigendian_obj,
   49014             :                 &ndr64_obj)) {
   49015           0 :                 return NULL;
   49016             :         }
   49017             : 
   49018           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   49019           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   49020             :         }
   49021           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   49022           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   49023             :         }
   49024             : 
   49025           0 :         return py_srvsvc_NetTransportEnum_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   49026             : }
   49027             : 
   49028           0 : static PyObject *py_srvsvc_NetTransportEnum_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   49029             : {
   49030           0 :         const struct ndr_interface_call *call = NULL;
   49031           0 :         struct srvsvc_NetTransportEnum *object = (struct srvsvc_NetTransportEnum *)pytalloc_get_ptr(py_obj);
   49032           0 :         struct ndr_pull *pull = NULL;
   49033             :         enum ndr_err_code err;
   49034             : 
   49035           0 :         if (ndr_table_srvsvc.num_calls < 27) {
   49036           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetTransportEnum_ndr_unpack");
   49037           0 :                 return NULL;
   49038             :         }
   49039           0 :         call = &ndr_table_srvsvc.calls[26];
   49040             : 
   49041           0 :         pull = ndr_pull_init_blob(blob, object);
   49042           0 :         if (pull == NULL) {
   49043           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   49044           0 :                 return NULL;
   49045             :         }
   49046             : 
   49047           0 :         pull->flags |= ndr_pull_flags;
   49048             : 
   49049           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   49050           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   49051           0 :                 TALLOC_FREE(pull);
   49052           0 :                 PyErr_SetNdrError(err);
   49053           0 :                 return NULL;
   49054             :         }
   49055           0 :         if (!allow_remaining) {
   49056             :                 uint32_t highest_ofs;
   49057             : 
   49058           0 :                 if (pull->offset > pull->relative_highest_offset) {
   49059           0 :                         highest_ofs = pull->offset;
   49060             :                 } else {
   49061           0 :                         highest_ofs = pull->relative_highest_offset;
   49062             :                 }
   49063           0 :                 if (highest_ofs < pull->data_size) {
   49064           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   49065             :                                 "not all bytes consumed ofs[%u] size[%u]",
   49066             :                                 highest_ofs, pull->data_size);
   49067           0 :                         TALLOC_FREE(pull);
   49068           0 :                         PyErr_SetNdrError(err);
   49069           0 :                         return NULL;
   49070             :                 }
   49071             :         }
   49072             : 
   49073           0 :         TALLOC_FREE(pull);
   49074           0 :         Py_RETURN_NONE;
   49075             : }
   49076             : 
   49077           0 : static PyObject *py_srvsvc_NetTransportEnum_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   49078             : {
   49079             :         DATA_BLOB blob;
   49080           0 :         Py_ssize_t blob_length = 0;
   49081           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   49082           0 :         PyObject *bigendian_obj = NULL;
   49083           0 :         PyObject *ndr64_obj = NULL;
   49084           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   49085           0 :         PyObject *allow_remaining_obj = NULL;
   49086           0 :         bool allow_remaining = false;
   49087             : 
   49088           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   49089             :                 discard_const_p(char *, kwnames),
   49090             :                 &blob.data, &blob_length,
   49091             :                 &bigendian_obj,
   49092             :                 &ndr64_obj,
   49093             :                 &allow_remaining_obj)) {
   49094           0 :                 return NULL;
   49095             :         }
   49096           0 :         blob.length = blob_length;
   49097             : 
   49098           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   49099           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   49100             :         }
   49101           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   49102           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   49103             :         }
   49104             : 
   49105           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   49106           0 :                 allow_remaining = true;
   49107             :         }
   49108             : 
   49109           0 :         return py_srvsvc_NetTransportEnum_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   49110             : }
   49111             : 
   49112           0 : static PyObject *py_srvsvc_NetTransportEnum_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   49113             : {
   49114             :         DATA_BLOB blob;
   49115           0 :         Py_ssize_t blob_length = 0;
   49116           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   49117           0 :         PyObject *bigendian_obj = NULL;
   49118           0 :         PyObject *ndr64_obj = NULL;
   49119           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   49120           0 :         PyObject *allow_remaining_obj = NULL;
   49121           0 :         bool allow_remaining = false;
   49122             : 
   49123           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   49124             :                 discard_const_p(char *, kwnames),
   49125             :                 &blob.data, &blob_length,
   49126             :                 &bigendian_obj,
   49127             :                 &ndr64_obj,
   49128             :                 &allow_remaining_obj)) {
   49129           0 :                 return NULL;
   49130             :         }
   49131           0 :         blob.length = blob_length;
   49132             : 
   49133           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   49134           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   49135             :         }
   49136           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   49137           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   49138             :         }
   49139             : 
   49140           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   49141           0 :                 allow_remaining = true;
   49142             :         }
   49143             : 
   49144           0 :         return py_srvsvc_NetTransportEnum_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   49145             : }
   49146             : 
   49147           0 : static PyObject *py_srvsvc_NetTransportEnum_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   49148             : {
   49149           0 :         const struct ndr_interface_call *call = NULL;
   49150           0 :         struct srvsvc_NetTransportEnum *object = (struct srvsvc_NetTransportEnum *)pytalloc_get_ptr(py_obj);
   49151             :         PyObject *ret;
   49152             :         char *retstr;
   49153             : 
   49154           0 :         if (ndr_table_srvsvc.num_calls < 27) {
   49155           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetTransportEnum_ndr_print");
   49156           0 :                 return NULL;
   49157             :         }
   49158           0 :         call = &ndr_table_srvsvc.calls[26];
   49159             : 
   49160           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   49161           0 :         ret = PyUnicode_FromString(retstr);
   49162           0 :         TALLOC_FREE(retstr);
   49163             : 
   49164           0 :         return ret;
   49165             : }
   49166             : 
   49167           0 : static PyObject *py_srvsvc_NetTransportEnum_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   49168             : {
   49169           0 :         return py_srvsvc_NetTransportEnum_ndr_print(py_obj, "srvsvc_NetTransportEnum_in", NDR_IN);
   49170             : }
   49171             : 
   49172           0 : static PyObject *py_srvsvc_NetTransportEnum_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   49173             : {
   49174           0 :         return py_srvsvc_NetTransportEnum_ndr_print(py_obj, "srvsvc_NetTransportEnum_out", NDR_OUT);
   49175             : }
   49176             : 
   49177             : static PyMethodDef py_srvsvc_NetTransportEnum_methods[] = {
   49178             :         { "opnum", (PyCFunction)py_srvsvc_NetTransportEnum_ndr_opnum, METH_NOARGS|METH_CLASS,
   49179             :                 "srvsvc.NetTransportEnum.opnum() -> 26 (0x1a) " },
   49180             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportEnum_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   49181             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   49182             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportEnum_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   49183             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   49184             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportEnum_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   49185             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   49186             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportEnum_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   49187             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   49188             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetTransportEnum_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   49189             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetTransportEnum_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   49190             :         { NULL, NULL, 0, NULL }
   49191             : };
   49192             : 
   49193             : 
   49194             : static PyTypeObject srvsvc_NetTransportEnum_Type = {
   49195             :         PyVarObject_HEAD_INIT(NULL, 0)
   49196             :         .tp_name = "srvsvc.NetTransportEnum",
   49197             :         .tp_getset = py_srvsvc_NetTransportEnum_getsetters,
   49198             :         .tp_methods = py_srvsvc_NetTransportEnum_methods,
   49199             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   49200             :         .tp_new = py_srvsvc_NetTransportEnum_new,
   49201             : };
   49202             : 
   49203           0 : static bool pack_py_srvsvc_NetTransportEnum_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetTransportEnum *r)
   49204             : {
   49205             :         PyObject *py_server_unc;
   49206             :         PyObject *py_transports;
   49207             :         PyObject *py_max_buffer;
   49208             :         PyObject *py_resume_handle;
   49209           0 :         const char *kwnames[] = {
   49210             :                 "server_unc", "transports", "max_buffer", "resume_handle", NULL
   49211             :         };
   49212             : 
   49213           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetTransportEnum", discard_const_p(char *, kwnames), &py_server_unc, &py_transports, &py_max_buffer, &py_resume_handle)) {
   49214           0 :                 return false;
   49215             :         }
   49216             : 
   49217           0 :         if (py_server_unc == NULL) {
   49218           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   49219           0 :                 return false;
   49220             :         }
   49221           0 :         if (py_server_unc == Py_None) {
   49222           0 :                 r->in.server_unc = NULL;
   49223             :         } else {
   49224           0 :                 r->in.server_unc = NULL;
   49225             :                 {
   49226             :                         const char *test_str;
   49227             :                         const char *talloc_str;
   49228           0 :                         PyObject *unicode = NULL;
   49229           0 :                         if (PyUnicode_Check(py_server_unc)) {
   49230           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   49231           0 :                                 if (unicode == NULL) {
   49232           0 :                                         PyErr_NoMemory();
   49233           0 :                                         return false;
   49234             :                                 }
   49235           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   49236           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   49237           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   49238             :                         } else {
   49239           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   49240           0 :                                 return false;
   49241             :                         }
   49242           0 :                         talloc_str = talloc_strdup(r, test_str);
   49243           0 :                         if (unicode != NULL) {
   49244           0 :                                 Py_DECREF(unicode);
   49245             :                         }
   49246           0 :                         if (talloc_str == NULL) {
   49247           0 :                                 PyErr_NoMemory();
   49248           0 :                                 return false;
   49249             :                         }
   49250           0 :                         r->in.server_unc = talloc_str;
   49251             :                 }
   49252             :         }
   49253           0 :         if (py_transports == NULL) {
   49254           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.transports");
   49255           0 :                 return false;
   49256             :         }
   49257           0 :         r->in.transports = talloc_ptrtype(r, r->in.transports);
   49258           0 :         if (r->in.transports == NULL) {
   49259           0 :                 PyErr_NoMemory();
   49260           0 :                 return false;
   49261             :         }
   49262           0 :         PY_CHECK_TYPE(&srvsvc_NetTransportInfoCtr_Type, py_transports, return false;);
   49263           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_transports)) == NULL) {
   49264           0 :                 PyErr_NoMemory();
   49265           0 :                 return false;
   49266             :         }
   49267           0 :         r->in.transports = (struct srvsvc_NetTransportInfoCtr *)pytalloc_get_ptr(py_transports);
   49268           0 :         if (py_max_buffer == NULL) {
   49269           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.max_buffer");
   49270           0 :                 return false;
   49271             :         }
   49272             :         {
   49273           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
   49274           0 :                 if (PyLong_Check(py_max_buffer)) {
   49275             :                         unsigned long long test_var;
   49276           0 :                         test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
   49277           0 :                         if (PyErr_Occurred() != NULL) {
   49278           0 :                                 return false;
   49279             :                         }
   49280           0 :                         if (test_var > uint_max) {
   49281           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   49282             :                                   PyLong_Type.tp_name, uint_max, test_var);
   49283           0 :                                 return false;
   49284             :                         }
   49285           0 :                         r->in.max_buffer = test_var;
   49286             :                 } else {
   49287           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   49288             :                           PyLong_Type.tp_name);
   49289           0 :                         return false;
   49290             :                 }
   49291             :         }
   49292           0 :         if (py_resume_handle == NULL) {
   49293           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.resume_handle");
   49294           0 :                 return false;
   49295             :         }
   49296           0 :         if (py_resume_handle == Py_None) {
   49297           0 :                 r->in.resume_handle = NULL;
   49298             :         } else {
   49299           0 :                 r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
   49300           0 :                 if (r->in.resume_handle == NULL) {
   49301           0 :                         PyErr_NoMemory();
   49302           0 :                         return false;
   49303             :                 }
   49304             :                 {
   49305           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
   49306           0 :                         if (PyLong_Check(py_resume_handle)) {
   49307             :                                 unsigned long long test_var;
   49308           0 :                                 test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
   49309           0 :                                 if (PyErr_Occurred() != NULL) {
   49310           0 :                                         return false;
   49311             :                                 }
   49312           0 :                                 if (test_var > uint_max) {
   49313           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   49314             :                                           PyLong_Type.tp_name, uint_max, test_var);
   49315           0 :                                         return false;
   49316             :                                 }
   49317           0 :                                 *r->in.resume_handle = test_var;
   49318             :                         } else {
   49319           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   49320             :                                   PyLong_Type.tp_name);
   49321           0 :                                 return false;
   49322             :                         }
   49323             :                 }
   49324             :         }
   49325           0 :         return true;
   49326             : }
   49327             : 
   49328           0 : static PyObject *unpack_py_srvsvc_NetTransportEnum_args_out(struct srvsvc_NetTransportEnum *r)
   49329             : {
   49330             :         PyObject *result;
   49331             :         PyObject *py_transports;
   49332             :         PyObject *py_totalentries;
   49333             :         PyObject *py_resume_handle;
   49334           0 :         result = PyTuple_New(3);
   49335           0 :         py_transports = pytalloc_reference_ex(&srvsvc_NetTransportInfoCtr_Type, r->out.transports, r->out.transports);
   49336           0 :         PyTuple_SetItem(result, 0, py_transports);
   49337           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)*r->out.totalentries);
   49338           0 :         PyTuple_SetItem(result, 1, py_totalentries);
   49339           0 :         if (r->out.resume_handle == NULL) {
   49340           0 :                 py_resume_handle = Py_None;
   49341           0 :                 Py_INCREF(py_resume_handle);
   49342             :         } else {
   49343           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)*r->out.resume_handle);
   49344             :         }
   49345           0 :         PyTuple_SetItem(result, 2, py_resume_handle);
   49346           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   49347           0 :                 PyErr_SetWERROR(r->out.result);
   49348           0 :                 return NULL;
   49349             :         }
   49350             : 
   49351           0 :         return result;
   49352             : }
   49353             : 
   49354             : 
   49355           0 : static PyObject *py_srvsvc_NetTransportDel_in_get_server_unc(PyObject *obj, void *closure)
   49356             : {
   49357           0 :         struct srvsvc_NetTransportDel *object = (struct srvsvc_NetTransportDel *)pytalloc_get_ptr(obj);
   49358             :         PyObject *py_server_unc;
   49359           0 :         if (object->in.server_unc == NULL) {
   49360           0 :                 Py_RETURN_NONE;
   49361             :         }
   49362           0 :         if (object->in.server_unc == NULL) {
   49363           0 :                 py_server_unc = Py_None;
   49364           0 :                 Py_INCREF(py_server_unc);
   49365             :         } else {
   49366           0 :                 if (object->in.server_unc == NULL) {
   49367           0 :                         py_server_unc = Py_None;
   49368           0 :                         Py_INCREF(py_server_unc);
   49369             :                 } else {
   49370           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   49371             :                 }
   49372             :         }
   49373           0 :         return py_server_unc;
   49374             : }
   49375             : 
   49376           0 : static int py_srvsvc_NetTransportDel_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   49377             : {
   49378           0 :         struct srvsvc_NetTransportDel *object = (struct srvsvc_NetTransportDel *)pytalloc_get_ptr(py_obj);
   49379           0 :         if (value == NULL) {
   49380           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   49381           0 :                 return -1;
   49382             :         }
   49383           0 :         if (value == Py_None) {
   49384           0 :                 object->in.server_unc = NULL;
   49385             :         } else {
   49386           0 :                 object->in.server_unc = NULL;
   49387             :                 {
   49388             :                         const char *test_str;
   49389             :                         const char *talloc_str;
   49390           0 :                         PyObject *unicode = NULL;
   49391           0 :                         if (PyUnicode_Check(value)) {
   49392           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   49393           0 :                                 if (unicode == NULL) {
   49394           0 :                                         PyErr_NoMemory();
   49395           0 :                                         return -1;
   49396             :                                 }
   49397           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   49398           0 :                         } else if (PyBytes_Check(value)) {
   49399           0 :                                 test_str = PyBytes_AS_STRING(value);
   49400             :                         } else {
   49401           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   49402           0 :                                 return -1;
   49403             :                         }
   49404           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   49405           0 :                         if (unicode != NULL) {
   49406           0 :                                 Py_DECREF(unicode);
   49407             :                         }
   49408           0 :                         if (talloc_str == NULL) {
   49409           0 :                                 PyErr_NoMemory();
   49410           0 :                                 return -1;
   49411             :                         }
   49412           0 :                         object->in.server_unc = talloc_str;
   49413             :                 }
   49414             :         }
   49415           0 :         return 0;
   49416             : }
   49417             : 
   49418           0 : static PyObject *py_srvsvc_NetTransportDel_in_get_level(PyObject *obj, void *closure)
   49419             : {
   49420           0 :         struct srvsvc_NetTransportDel *object = (struct srvsvc_NetTransportDel *)pytalloc_get_ptr(obj);
   49421             :         PyObject *py_level;
   49422           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   49423           0 :         return py_level;
   49424             : }
   49425             : 
   49426           0 : static int py_srvsvc_NetTransportDel_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   49427             : {
   49428           0 :         struct srvsvc_NetTransportDel *object = (struct srvsvc_NetTransportDel *)pytalloc_get_ptr(py_obj);
   49429           0 :         if (value == NULL) {
   49430           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   49431           0 :                 return -1;
   49432             :         }
   49433             :         {
   49434           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   49435           0 :                 if (PyLong_Check(value)) {
   49436             :                         unsigned long long test_var;
   49437           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   49438           0 :                         if (PyErr_Occurred() != NULL) {
   49439           0 :                                 return -1;
   49440             :                         }
   49441           0 :                         if (test_var > uint_max) {
   49442           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   49443             :                                   PyLong_Type.tp_name, uint_max, test_var);
   49444           0 :                                 return -1;
   49445             :                         }
   49446           0 :                         object->in.level = test_var;
   49447             :                 } else {
   49448           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   49449             :                           PyLong_Type.tp_name);
   49450           0 :                         return -1;
   49451             :                 }
   49452             :         }
   49453           0 :         return 0;
   49454             : }
   49455             : 
   49456           0 : static PyObject *py_srvsvc_NetTransportDel_in_get_info0(PyObject *obj, void *closure)
   49457             : {
   49458           0 :         struct srvsvc_NetTransportDel *object = (struct srvsvc_NetTransportDel *)pytalloc_get_ptr(obj);
   49459             :         PyObject *py_info0;
   49460           0 :         if (object->in.info0 == NULL) {
   49461           0 :                 Py_RETURN_NONE;
   49462             :         }
   49463           0 :         py_info0 = pytalloc_reference_ex(&srvsvc_NetTransportInfo0_Type, object->in.info0, object->in.info0);
   49464           0 :         return py_info0;
   49465             : }
   49466             : 
   49467           0 : static int py_srvsvc_NetTransportDel_in_set_info0(PyObject *py_obj, PyObject *value, void *closure)
   49468             : {
   49469           0 :         struct srvsvc_NetTransportDel *object = (struct srvsvc_NetTransportDel *)pytalloc_get_ptr(py_obj);
   49470           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info0));
   49471           0 :         if (value == NULL) {
   49472           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.info0");
   49473           0 :                 return -1;
   49474             :         }
   49475           0 :         object->in.info0 = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info0);
   49476           0 :         if (object->in.info0 == NULL) {
   49477           0 :                 PyErr_NoMemory();
   49478           0 :                 return -1;
   49479             :         }
   49480           0 :         PY_CHECK_TYPE(&srvsvc_NetTransportInfo0_Type, value, return -1;);
   49481           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   49482           0 :                 PyErr_NoMemory();
   49483           0 :                 return -1;
   49484             :         }
   49485           0 :         object->in.info0 = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(value);
   49486           0 :         return 0;
   49487             : }
   49488             : 
   49489           0 : static PyObject *py_srvsvc_NetTransportDel_get_result(PyObject *obj, void *closure)
   49490             : {
   49491           0 :         struct srvsvc_NetTransportDel *object = (struct srvsvc_NetTransportDel *)pytalloc_get_ptr(obj);
   49492             :         PyObject *py_result;
   49493           0 :         py_result = PyErr_FromWERROR(object->out.result);
   49494           0 :         return py_result;
   49495             : }
   49496             : 
   49497           0 : static int py_srvsvc_NetTransportDel_set_result(PyObject *py_obj, PyObject *value, void *closure)
   49498             : {
   49499           0 :         struct srvsvc_NetTransportDel *object = (struct srvsvc_NetTransportDel *)pytalloc_get_ptr(py_obj);
   49500           0 :         if (value == NULL) {
   49501           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   49502           0 :                 return -1;
   49503             :         }
   49504           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   49505           0 :         return 0;
   49506             : }
   49507             : 
   49508             : static PyGetSetDef py_srvsvc_NetTransportDel_getsetters[] = {
   49509             :         {
   49510             :                 .name = discard_const_p(char, "in_server_unc"),
   49511             :                 .get = py_srvsvc_NetTransportDel_in_get_server_unc,
   49512             :                 .set = py_srvsvc_NetTransportDel_in_set_server_unc,
   49513             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   49514             :         },
   49515             :         {
   49516             :                 .name = discard_const_p(char, "in_level"),
   49517             :                 .get = py_srvsvc_NetTransportDel_in_get_level,
   49518             :                 .set = py_srvsvc_NetTransportDel_in_set_level,
   49519             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   49520             :         },
   49521             :         {
   49522             :                 .name = discard_const_p(char, "in_info0"),
   49523             :                 .get = py_srvsvc_NetTransportDel_in_get_info0,
   49524             :                 .set = py_srvsvc_NetTransportDel_in_set_info0,
   49525             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetTransportInfo0")
   49526             :         },
   49527             :         {
   49528             :                 .name = discard_const_p(char, "result"),
   49529             :                 .get = py_srvsvc_NetTransportDel_get_result,
   49530             :                 .set = py_srvsvc_NetTransportDel_set_result,
   49531             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   49532             :         },
   49533             :         { .name = NULL }
   49534             : };
   49535             : 
   49536           0 : static PyObject *py_srvsvc_NetTransportDel_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   49537             : {
   49538           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetTransportDel, type);
   49539           0 :         struct srvsvc_NetTransportDel *_self = (struct srvsvc_NetTransportDel *)pytalloc_get_ptr(self);
   49540           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   49541           0 :         _self->in.info0 = talloc_zero(mem_ctx, struct srvsvc_NetTransportInfo0);
   49542           0 :         return self;
   49543             : }
   49544             : 
   49545           0 : static PyObject *py_srvsvc_NetTransportDel_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   49546             : {
   49547             : 
   49548             : 
   49549           0 :         return PyLong_FromLong(27);
   49550             : }
   49551             : 
   49552           0 : static PyObject *py_srvsvc_NetTransportDel_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   49553             : {
   49554           0 :         const struct ndr_interface_call *call = NULL;
   49555           0 :         struct srvsvc_NetTransportDel *object = (struct srvsvc_NetTransportDel *)pytalloc_get_ptr(py_obj);
   49556           0 :         PyObject *ret = NULL;
   49557           0 :         struct ndr_push *push = NULL;
   49558             :         DATA_BLOB blob;
   49559             :         enum ndr_err_code err;
   49560             : 
   49561           0 :         if (ndr_table_srvsvc.num_calls < 28) {
   49562           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetTransportDel_ndr_pack");
   49563           0 :                 return NULL;
   49564             :         }
   49565           0 :         call = &ndr_table_srvsvc.calls[27];
   49566             : 
   49567           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   49568           0 :         if (push == NULL) {
   49569           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   49570           0 :                 return NULL;
   49571             :         }
   49572             : 
   49573           0 :         push->flags |= ndr_push_flags;
   49574             : 
   49575           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   49576           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   49577           0 :                 TALLOC_FREE(push);
   49578           0 :                 PyErr_SetNdrError(err);
   49579           0 :                 return NULL;
   49580             :         }
   49581           0 :         blob = ndr_push_blob(push);
   49582           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   49583           0 :         TALLOC_FREE(push);
   49584           0 :         return ret;
   49585             : }
   49586             : 
   49587           0 : static PyObject *py_srvsvc_NetTransportDel_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   49588             : {
   49589           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   49590           0 :         PyObject *bigendian_obj = NULL;
   49591           0 :         PyObject *ndr64_obj = NULL;
   49592           0 :         uint32_t ndr_push_flags = 0;
   49593             : 
   49594           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   49595             :                 discard_const_p(char *, kwnames),
   49596             :                 &bigendian_obj,
   49597             :                 &ndr64_obj)) {
   49598           0 :                 return NULL;
   49599             :         }
   49600             : 
   49601           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   49602           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   49603             :         }
   49604           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   49605           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   49606             :         }
   49607             : 
   49608           0 :         return py_srvsvc_NetTransportDel_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   49609             : }
   49610             : 
   49611           0 : static PyObject *py_srvsvc_NetTransportDel_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   49612             : {
   49613           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   49614           0 :         PyObject *bigendian_obj = NULL;
   49615           0 :         PyObject *ndr64_obj = NULL;
   49616           0 :         uint32_t ndr_push_flags = 0;
   49617             : 
   49618           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   49619             :                 discard_const_p(char *, kwnames),
   49620             :                 &bigendian_obj,
   49621             :                 &ndr64_obj)) {
   49622           0 :                 return NULL;
   49623             :         }
   49624             : 
   49625           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   49626           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   49627             :         }
   49628           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   49629           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   49630             :         }
   49631             : 
   49632           0 :         return py_srvsvc_NetTransportDel_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   49633             : }
   49634             : 
   49635           0 : static PyObject *py_srvsvc_NetTransportDel_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   49636             : {
   49637           0 :         const struct ndr_interface_call *call = NULL;
   49638           0 :         struct srvsvc_NetTransportDel *object = (struct srvsvc_NetTransportDel *)pytalloc_get_ptr(py_obj);
   49639           0 :         struct ndr_pull *pull = NULL;
   49640             :         enum ndr_err_code err;
   49641             : 
   49642           0 :         if (ndr_table_srvsvc.num_calls < 28) {
   49643           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetTransportDel_ndr_unpack");
   49644           0 :                 return NULL;
   49645             :         }
   49646           0 :         call = &ndr_table_srvsvc.calls[27];
   49647             : 
   49648           0 :         pull = ndr_pull_init_blob(blob, object);
   49649           0 :         if (pull == NULL) {
   49650           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   49651           0 :                 return NULL;
   49652             :         }
   49653             : 
   49654           0 :         pull->flags |= ndr_pull_flags;
   49655             : 
   49656           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   49657           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   49658           0 :                 TALLOC_FREE(pull);
   49659           0 :                 PyErr_SetNdrError(err);
   49660           0 :                 return NULL;
   49661             :         }
   49662           0 :         if (!allow_remaining) {
   49663             :                 uint32_t highest_ofs;
   49664             : 
   49665           0 :                 if (pull->offset > pull->relative_highest_offset) {
   49666           0 :                         highest_ofs = pull->offset;
   49667             :                 } else {
   49668           0 :                         highest_ofs = pull->relative_highest_offset;
   49669             :                 }
   49670           0 :                 if (highest_ofs < pull->data_size) {
   49671           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   49672             :                                 "not all bytes consumed ofs[%u] size[%u]",
   49673             :                                 highest_ofs, pull->data_size);
   49674           0 :                         TALLOC_FREE(pull);
   49675           0 :                         PyErr_SetNdrError(err);
   49676           0 :                         return NULL;
   49677             :                 }
   49678             :         }
   49679             : 
   49680           0 :         TALLOC_FREE(pull);
   49681           0 :         Py_RETURN_NONE;
   49682             : }
   49683             : 
   49684           0 : static PyObject *py_srvsvc_NetTransportDel_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   49685             : {
   49686             :         DATA_BLOB blob;
   49687           0 :         Py_ssize_t blob_length = 0;
   49688           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   49689           0 :         PyObject *bigendian_obj = NULL;
   49690           0 :         PyObject *ndr64_obj = NULL;
   49691           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   49692           0 :         PyObject *allow_remaining_obj = NULL;
   49693           0 :         bool allow_remaining = false;
   49694             : 
   49695           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   49696             :                 discard_const_p(char *, kwnames),
   49697             :                 &blob.data, &blob_length,
   49698             :                 &bigendian_obj,
   49699             :                 &ndr64_obj,
   49700             :                 &allow_remaining_obj)) {
   49701           0 :                 return NULL;
   49702             :         }
   49703           0 :         blob.length = blob_length;
   49704             : 
   49705           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   49706           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   49707             :         }
   49708           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   49709           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   49710             :         }
   49711             : 
   49712           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   49713           0 :                 allow_remaining = true;
   49714             :         }
   49715             : 
   49716           0 :         return py_srvsvc_NetTransportDel_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   49717             : }
   49718             : 
   49719           0 : static PyObject *py_srvsvc_NetTransportDel_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   49720             : {
   49721             :         DATA_BLOB blob;
   49722           0 :         Py_ssize_t blob_length = 0;
   49723           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   49724           0 :         PyObject *bigendian_obj = NULL;
   49725           0 :         PyObject *ndr64_obj = NULL;
   49726           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   49727           0 :         PyObject *allow_remaining_obj = NULL;
   49728           0 :         bool allow_remaining = false;
   49729             : 
   49730           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   49731             :                 discard_const_p(char *, kwnames),
   49732             :                 &blob.data, &blob_length,
   49733             :                 &bigendian_obj,
   49734             :                 &ndr64_obj,
   49735             :                 &allow_remaining_obj)) {
   49736           0 :                 return NULL;
   49737             :         }
   49738           0 :         blob.length = blob_length;
   49739             : 
   49740           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   49741           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   49742             :         }
   49743           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   49744           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   49745             :         }
   49746             : 
   49747           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   49748           0 :                 allow_remaining = true;
   49749             :         }
   49750             : 
   49751           0 :         return py_srvsvc_NetTransportDel_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   49752             : }
   49753             : 
   49754           0 : static PyObject *py_srvsvc_NetTransportDel_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   49755             : {
   49756           0 :         const struct ndr_interface_call *call = NULL;
   49757           0 :         struct srvsvc_NetTransportDel *object = (struct srvsvc_NetTransportDel *)pytalloc_get_ptr(py_obj);
   49758             :         PyObject *ret;
   49759             :         char *retstr;
   49760             : 
   49761           0 :         if (ndr_table_srvsvc.num_calls < 28) {
   49762           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetTransportDel_ndr_print");
   49763           0 :                 return NULL;
   49764             :         }
   49765           0 :         call = &ndr_table_srvsvc.calls[27];
   49766             : 
   49767           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   49768           0 :         ret = PyUnicode_FromString(retstr);
   49769           0 :         TALLOC_FREE(retstr);
   49770             : 
   49771           0 :         return ret;
   49772             : }
   49773             : 
   49774           0 : static PyObject *py_srvsvc_NetTransportDel_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   49775             : {
   49776           0 :         return py_srvsvc_NetTransportDel_ndr_print(py_obj, "srvsvc_NetTransportDel_in", NDR_IN);
   49777             : }
   49778             : 
   49779           0 : static PyObject *py_srvsvc_NetTransportDel_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   49780             : {
   49781           0 :         return py_srvsvc_NetTransportDel_ndr_print(py_obj, "srvsvc_NetTransportDel_out", NDR_OUT);
   49782             : }
   49783             : 
   49784             : static PyMethodDef py_srvsvc_NetTransportDel_methods[] = {
   49785             :         { "opnum", (PyCFunction)py_srvsvc_NetTransportDel_ndr_opnum, METH_NOARGS|METH_CLASS,
   49786             :                 "srvsvc.NetTransportDel.opnum() -> 27 (0x1b) " },
   49787             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportDel_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   49788             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   49789             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportDel_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   49790             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   49791             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportDel_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   49792             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   49793             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetTransportDel_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   49794             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   49795             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetTransportDel_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   49796             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetTransportDel_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   49797             :         { NULL, NULL, 0, NULL }
   49798             : };
   49799             : 
   49800             : 
   49801             : static PyTypeObject srvsvc_NetTransportDel_Type = {
   49802             :         PyVarObject_HEAD_INIT(NULL, 0)
   49803             :         .tp_name = "srvsvc.NetTransportDel",
   49804             :         .tp_getset = py_srvsvc_NetTransportDel_getsetters,
   49805             :         .tp_methods = py_srvsvc_NetTransportDel_methods,
   49806             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   49807             :         .tp_new = py_srvsvc_NetTransportDel_new,
   49808             : };
   49809             : 
   49810           0 : static bool pack_py_srvsvc_NetTransportDel_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetTransportDel *r)
   49811             : {
   49812             :         PyObject *py_server_unc;
   49813             :         PyObject *py_level;
   49814             :         PyObject *py_info0;
   49815           0 :         const char *kwnames[] = {
   49816             :                 "server_unc", "level", "info0", NULL
   49817             :         };
   49818             : 
   49819           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetTransportDel", discard_const_p(char *, kwnames), &py_server_unc, &py_level, &py_info0)) {
   49820           0 :                 return false;
   49821             :         }
   49822             : 
   49823           0 :         if (py_server_unc == NULL) {
   49824           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   49825           0 :                 return false;
   49826             :         }
   49827           0 :         if (py_server_unc == Py_None) {
   49828           0 :                 r->in.server_unc = NULL;
   49829             :         } else {
   49830           0 :                 r->in.server_unc = NULL;
   49831             :                 {
   49832             :                         const char *test_str;
   49833             :                         const char *talloc_str;
   49834           0 :                         PyObject *unicode = NULL;
   49835           0 :                         if (PyUnicode_Check(py_server_unc)) {
   49836           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   49837           0 :                                 if (unicode == NULL) {
   49838           0 :                                         PyErr_NoMemory();
   49839           0 :                                         return false;
   49840             :                                 }
   49841           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   49842           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   49843           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   49844             :                         } else {
   49845           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   49846           0 :                                 return false;
   49847             :                         }
   49848           0 :                         talloc_str = talloc_strdup(r, test_str);
   49849           0 :                         if (unicode != NULL) {
   49850           0 :                                 Py_DECREF(unicode);
   49851             :                         }
   49852           0 :                         if (talloc_str == NULL) {
   49853           0 :                                 PyErr_NoMemory();
   49854           0 :                                 return false;
   49855             :                         }
   49856           0 :                         r->in.server_unc = talloc_str;
   49857             :                 }
   49858             :         }
   49859           0 :         if (py_level == NULL) {
   49860           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   49861           0 :                 return false;
   49862             :         }
   49863             :         {
   49864           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   49865           0 :                 if (PyLong_Check(py_level)) {
   49866             :                         unsigned long long test_var;
   49867           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   49868           0 :                         if (PyErr_Occurred() != NULL) {
   49869           0 :                                 return false;
   49870             :                         }
   49871           0 :                         if (test_var > uint_max) {
   49872           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   49873             :                                   PyLong_Type.tp_name, uint_max, test_var);
   49874           0 :                                 return false;
   49875             :                         }
   49876           0 :                         r->in.level = test_var;
   49877             :                 } else {
   49878           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   49879             :                           PyLong_Type.tp_name);
   49880           0 :                         return false;
   49881             :                 }
   49882             :         }
   49883           0 :         if (py_info0 == NULL) {
   49884           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info0");
   49885           0 :                 return false;
   49886             :         }
   49887           0 :         r->in.info0 = talloc_ptrtype(r, r->in.info0);
   49888           0 :         if (r->in.info0 == NULL) {
   49889           0 :                 PyErr_NoMemory();
   49890           0 :                 return false;
   49891             :         }
   49892           0 :         PY_CHECK_TYPE(&srvsvc_NetTransportInfo0_Type, py_info0, return false;);
   49893           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_info0)) == NULL) {
   49894           0 :                 PyErr_NoMemory();
   49895           0 :                 return false;
   49896             :         }
   49897           0 :         r->in.info0 = (struct srvsvc_NetTransportInfo0 *)pytalloc_get_ptr(py_info0);
   49898           0 :         return true;
   49899             : }
   49900             : 
   49901           0 : static PyObject *unpack_py_srvsvc_NetTransportDel_args_out(struct srvsvc_NetTransportDel *r)
   49902             : {
   49903             :         PyObject *result;
   49904           0 :         result = Py_None;
   49905           0 :         Py_INCREF(result);
   49906           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   49907           0 :                 PyErr_SetWERROR(r->out.result);
   49908           0 :                 return NULL;
   49909             :         }
   49910             : 
   49911           0 :         return result;
   49912             : }
   49913             : 
   49914             : 
   49915           0 : static PyObject *py_srvsvc_NetRemoteTOD_in_get_server_unc(PyObject *obj, void *closure)
   49916             : {
   49917           0 :         struct srvsvc_NetRemoteTOD *object = (struct srvsvc_NetRemoteTOD *)pytalloc_get_ptr(obj);
   49918             :         PyObject *py_server_unc;
   49919           0 :         if (object->in.server_unc == NULL) {
   49920           0 :                 Py_RETURN_NONE;
   49921             :         }
   49922           0 :         if (object->in.server_unc == NULL) {
   49923           0 :                 py_server_unc = Py_None;
   49924           0 :                 Py_INCREF(py_server_unc);
   49925             :         } else {
   49926           0 :                 if (object->in.server_unc == NULL) {
   49927           0 :                         py_server_unc = Py_None;
   49928           0 :                         Py_INCREF(py_server_unc);
   49929             :                 } else {
   49930           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   49931             :                 }
   49932             :         }
   49933           0 :         return py_server_unc;
   49934             : }
   49935             : 
   49936           0 : static int py_srvsvc_NetRemoteTOD_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   49937             : {
   49938           0 :         struct srvsvc_NetRemoteTOD *object = (struct srvsvc_NetRemoteTOD *)pytalloc_get_ptr(py_obj);
   49939           0 :         if (value == NULL) {
   49940           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   49941           0 :                 return -1;
   49942             :         }
   49943           0 :         if (value == Py_None) {
   49944           0 :                 object->in.server_unc = NULL;
   49945             :         } else {
   49946           0 :                 object->in.server_unc = NULL;
   49947             :                 {
   49948             :                         const char *test_str;
   49949             :                         const char *talloc_str;
   49950           0 :                         PyObject *unicode = NULL;
   49951           0 :                         if (PyUnicode_Check(value)) {
   49952           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   49953           0 :                                 if (unicode == NULL) {
   49954           0 :                                         PyErr_NoMemory();
   49955           0 :                                         return -1;
   49956             :                                 }
   49957           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   49958           0 :                         } else if (PyBytes_Check(value)) {
   49959           0 :                                 test_str = PyBytes_AS_STRING(value);
   49960             :                         } else {
   49961           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   49962           0 :                                 return -1;
   49963             :                         }
   49964           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   49965           0 :                         if (unicode != NULL) {
   49966           0 :                                 Py_DECREF(unicode);
   49967             :                         }
   49968           0 :                         if (talloc_str == NULL) {
   49969           0 :                                 PyErr_NoMemory();
   49970           0 :                                 return -1;
   49971             :                         }
   49972           0 :                         object->in.server_unc = talloc_str;
   49973             :                 }
   49974             :         }
   49975           0 :         return 0;
   49976             : }
   49977             : 
   49978           0 : static PyObject *py_srvsvc_NetRemoteTOD_out_get_info(PyObject *obj, void *closure)
   49979             : {
   49980           0 :         struct srvsvc_NetRemoteTOD *object = (struct srvsvc_NetRemoteTOD *)pytalloc_get_ptr(obj);
   49981             :         PyObject *py_info;
   49982           0 :         if (object->out.info == NULL) {
   49983           0 :                 Py_RETURN_NONE;
   49984             :         }
   49985           0 :         if (*object->out.info == NULL) {
   49986           0 :                 py_info = Py_None;
   49987           0 :                 Py_INCREF(py_info);
   49988             :         } else {
   49989           0 :                 py_info = pytalloc_reference_ex(&srvsvc_NetRemoteTODInfo_Type, *object->out.info, *object->out.info);
   49990             :         }
   49991           0 :         return py_info;
   49992             : }
   49993             : 
   49994           0 : static int py_srvsvc_NetRemoteTOD_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   49995             : {
   49996           0 :         struct srvsvc_NetRemoteTOD *object = (struct srvsvc_NetRemoteTOD *)pytalloc_get_ptr(py_obj);
   49997           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   49998           0 :         if (value == NULL) {
   49999           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info");
   50000           0 :                 return -1;
   50001             :         }
   50002           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   50003           0 :         if (object->out.info == NULL) {
   50004           0 :                 PyErr_NoMemory();
   50005           0 :                 return -1;
   50006             :         }
   50007           0 :         if (value == Py_None) {
   50008           0 :                 *object->out.info = NULL;
   50009             :         } else {
   50010           0 :                 *object->out.info = NULL;
   50011           0 :                 PY_CHECK_TYPE(&srvsvc_NetRemoteTODInfo_Type, value, return -1;);
   50012           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   50013           0 :                         PyErr_NoMemory();
   50014           0 :                         return -1;
   50015             :                 }
   50016           0 :                 *object->out.info = (struct srvsvc_NetRemoteTODInfo *)pytalloc_get_ptr(value);
   50017             :         }
   50018           0 :         return 0;
   50019             : }
   50020             : 
   50021           0 : static PyObject *py_srvsvc_NetRemoteTOD_get_result(PyObject *obj, void *closure)
   50022             : {
   50023           0 :         struct srvsvc_NetRemoteTOD *object = (struct srvsvc_NetRemoteTOD *)pytalloc_get_ptr(obj);
   50024             :         PyObject *py_result;
   50025           0 :         py_result = PyErr_FromWERROR(object->out.result);
   50026           0 :         return py_result;
   50027             : }
   50028             : 
   50029           0 : static int py_srvsvc_NetRemoteTOD_set_result(PyObject *py_obj, PyObject *value, void *closure)
   50030             : {
   50031           0 :         struct srvsvc_NetRemoteTOD *object = (struct srvsvc_NetRemoteTOD *)pytalloc_get_ptr(py_obj);
   50032           0 :         if (value == NULL) {
   50033           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   50034           0 :                 return -1;
   50035             :         }
   50036           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   50037           0 :         return 0;
   50038             : }
   50039             : 
   50040             : static PyGetSetDef py_srvsvc_NetRemoteTOD_getsetters[] = {
   50041             :         {
   50042             :                 .name = discard_const_p(char, "in_server_unc"),
   50043             :                 .get = py_srvsvc_NetRemoteTOD_in_get_server_unc,
   50044             :                 .set = py_srvsvc_NetRemoteTOD_in_set_server_unc,
   50045             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   50046             :         },
   50047             :         {
   50048             :                 .name = discard_const_p(char, "out_info"),
   50049             :                 .get = py_srvsvc_NetRemoteTOD_out_get_info,
   50050             :                 .set = py_srvsvc_NetRemoteTOD_out_set_info,
   50051             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetRemoteTODInfo")
   50052             :         },
   50053             :         {
   50054             :                 .name = discard_const_p(char, "result"),
   50055             :                 .get = py_srvsvc_NetRemoteTOD_get_result,
   50056             :                 .set = py_srvsvc_NetRemoteTOD_set_result,
   50057             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   50058             :         },
   50059             :         { .name = NULL }
   50060             : };
   50061             : 
   50062           0 : static PyObject *py_srvsvc_NetRemoteTOD_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   50063             : {
   50064           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetRemoteTOD, type);
   50065           0 :         struct srvsvc_NetRemoteTOD *_self = (struct srvsvc_NetRemoteTOD *)pytalloc_get_ptr(self);
   50066           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   50067             :         /* a pointer to a NULL pointer */
   50068           0 :         _self->out.info = talloc_zero(mem_ctx, struct srvsvc_NetRemoteTODInfo *);
   50069           0 :         return self;
   50070             : }
   50071             : 
   50072           0 : static PyObject *py_srvsvc_NetRemoteTOD_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   50073             : {
   50074             : 
   50075             : 
   50076           0 :         return PyLong_FromLong(28);
   50077             : }
   50078             : 
   50079           0 : static PyObject *py_srvsvc_NetRemoteTOD_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   50080             : {
   50081           0 :         const struct ndr_interface_call *call = NULL;
   50082           0 :         struct srvsvc_NetRemoteTOD *object = (struct srvsvc_NetRemoteTOD *)pytalloc_get_ptr(py_obj);
   50083           0 :         PyObject *ret = NULL;
   50084           0 :         struct ndr_push *push = NULL;
   50085             :         DATA_BLOB blob;
   50086             :         enum ndr_err_code err;
   50087             : 
   50088           0 :         if (ndr_table_srvsvc.num_calls < 29) {
   50089           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetRemoteTOD_ndr_pack");
   50090           0 :                 return NULL;
   50091             :         }
   50092           0 :         call = &ndr_table_srvsvc.calls[28];
   50093             : 
   50094           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   50095           0 :         if (push == NULL) {
   50096           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   50097           0 :                 return NULL;
   50098             :         }
   50099             : 
   50100           0 :         push->flags |= ndr_push_flags;
   50101             : 
   50102           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   50103           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   50104           0 :                 TALLOC_FREE(push);
   50105           0 :                 PyErr_SetNdrError(err);
   50106           0 :                 return NULL;
   50107             :         }
   50108           0 :         blob = ndr_push_blob(push);
   50109           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   50110           0 :         TALLOC_FREE(push);
   50111           0 :         return ret;
   50112             : }
   50113             : 
   50114           0 : static PyObject *py_srvsvc_NetRemoteTOD_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50115             : {
   50116           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   50117           0 :         PyObject *bigendian_obj = NULL;
   50118           0 :         PyObject *ndr64_obj = NULL;
   50119           0 :         uint32_t ndr_push_flags = 0;
   50120             : 
   50121           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   50122             :                 discard_const_p(char *, kwnames),
   50123             :                 &bigendian_obj,
   50124             :                 &ndr64_obj)) {
   50125           0 :                 return NULL;
   50126             :         }
   50127             : 
   50128           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50129           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   50130             :         }
   50131           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50132           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   50133             :         }
   50134             : 
   50135           0 :         return py_srvsvc_NetRemoteTOD_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   50136             : }
   50137             : 
   50138           0 : static PyObject *py_srvsvc_NetRemoteTOD_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50139             : {
   50140           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   50141           0 :         PyObject *bigendian_obj = NULL;
   50142           0 :         PyObject *ndr64_obj = NULL;
   50143           0 :         uint32_t ndr_push_flags = 0;
   50144             : 
   50145           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   50146             :                 discard_const_p(char *, kwnames),
   50147             :                 &bigendian_obj,
   50148             :                 &ndr64_obj)) {
   50149           0 :                 return NULL;
   50150             :         }
   50151             : 
   50152           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50153           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   50154             :         }
   50155           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50156           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   50157             :         }
   50158             : 
   50159           0 :         return py_srvsvc_NetRemoteTOD_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   50160             : }
   50161             : 
   50162           0 : static PyObject *py_srvsvc_NetRemoteTOD_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   50163             : {
   50164           0 :         const struct ndr_interface_call *call = NULL;
   50165           0 :         struct srvsvc_NetRemoteTOD *object = (struct srvsvc_NetRemoteTOD *)pytalloc_get_ptr(py_obj);
   50166           0 :         struct ndr_pull *pull = NULL;
   50167             :         enum ndr_err_code err;
   50168             : 
   50169           0 :         if (ndr_table_srvsvc.num_calls < 29) {
   50170           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetRemoteTOD_ndr_unpack");
   50171           0 :                 return NULL;
   50172             :         }
   50173           0 :         call = &ndr_table_srvsvc.calls[28];
   50174             : 
   50175           0 :         pull = ndr_pull_init_blob(blob, object);
   50176           0 :         if (pull == NULL) {
   50177           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   50178           0 :                 return NULL;
   50179             :         }
   50180             : 
   50181           0 :         pull->flags |= ndr_pull_flags;
   50182             : 
   50183           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   50184           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   50185           0 :                 TALLOC_FREE(pull);
   50186           0 :                 PyErr_SetNdrError(err);
   50187           0 :                 return NULL;
   50188             :         }
   50189           0 :         if (!allow_remaining) {
   50190             :                 uint32_t highest_ofs;
   50191             : 
   50192           0 :                 if (pull->offset > pull->relative_highest_offset) {
   50193           0 :                         highest_ofs = pull->offset;
   50194             :                 } else {
   50195           0 :                         highest_ofs = pull->relative_highest_offset;
   50196             :                 }
   50197           0 :                 if (highest_ofs < pull->data_size) {
   50198           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   50199             :                                 "not all bytes consumed ofs[%u] size[%u]",
   50200             :                                 highest_ofs, pull->data_size);
   50201           0 :                         TALLOC_FREE(pull);
   50202           0 :                         PyErr_SetNdrError(err);
   50203           0 :                         return NULL;
   50204             :                 }
   50205             :         }
   50206             : 
   50207           0 :         TALLOC_FREE(pull);
   50208           0 :         Py_RETURN_NONE;
   50209             : }
   50210             : 
   50211           0 : static PyObject *py_srvsvc_NetRemoteTOD_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50212             : {
   50213             :         DATA_BLOB blob;
   50214           0 :         Py_ssize_t blob_length = 0;
   50215           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   50216           0 :         PyObject *bigendian_obj = NULL;
   50217           0 :         PyObject *ndr64_obj = NULL;
   50218           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   50219           0 :         PyObject *allow_remaining_obj = NULL;
   50220           0 :         bool allow_remaining = false;
   50221             : 
   50222           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   50223             :                 discard_const_p(char *, kwnames),
   50224             :                 &blob.data, &blob_length,
   50225             :                 &bigendian_obj,
   50226             :                 &ndr64_obj,
   50227             :                 &allow_remaining_obj)) {
   50228           0 :                 return NULL;
   50229             :         }
   50230           0 :         blob.length = blob_length;
   50231             : 
   50232           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50233           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   50234             :         }
   50235           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50236           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   50237             :         }
   50238             : 
   50239           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   50240           0 :                 allow_remaining = true;
   50241             :         }
   50242             : 
   50243           0 :         return py_srvsvc_NetRemoteTOD_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   50244             : }
   50245             : 
   50246           0 : static PyObject *py_srvsvc_NetRemoteTOD_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50247             : {
   50248             :         DATA_BLOB blob;
   50249           0 :         Py_ssize_t blob_length = 0;
   50250           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   50251           0 :         PyObject *bigendian_obj = NULL;
   50252           0 :         PyObject *ndr64_obj = NULL;
   50253           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   50254           0 :         PyObject *allow_remaining_obj = NULL;
   50255           0 :         bool allow_remaining = false;
   50256             : 
   50257           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   50258             :                 discard_const_p(char *, kwnames),
   50259             :                 &blob.data, &blob_length,
   50260             :                 &bigendian_obj,
   50261             :                 &ndr64_obj,
   50262             :                 &allow_remaining_obj)) {
   50263           0 :                 return NULL;
   50264             :         }
   50265           0 :         blob.length = blob_length;
   50266             : 
   50267           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50268           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   50269             :         }
   50270           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50271           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   50272             :         }
   50273             : 
   50274           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   50275           0 :                 allow_remaining = true;
   50276             :         }
   50277             : 
   50278           0 :         return py_srvsvc_NetRemoteTOD_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   50279             : }
   50280             : 
   50281           0 : static PyObject *py_srvsvc_NetRemoteTOD_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   50282             : {
   50283           0 :         const struct ndr_interface_call *call = NULL;
   50284           0 :         struct srvsvc_NetRemoteTOD *object = (struct srvsvc_NetRemoteTOD *)pytalloc_get_ptr(py_obj);
   50285             :         PyObject *ret;
   50286             :         char *retstr;
   50287             : 
   50288           0 :         if (ndr_table_srvsvc.num_calls < 29) {
   50289           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetRemoteTOD_ndr_print");
   50290           0 :                 return NULL;
   50291             :         }
   50292           0 :         call = &ndr_table_srvsvc.calls[28];
   50293             : 
   50294           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   50295           0 :         ret = PyUnicode_FromString(retstr);
   50296           0 :         TALLOC_FREE(retstr);
   50297             : 
   50298           0 :         return ret;
   50299             : }
   50300             : 
   50301           0 : static PyObject *py_srvsvc_NetRemoteTOD_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   50302             : {
   50303           0 :         return py_srvsvc_NetRemoteTOD_ndr_print(py_obj, "srvsvc_NetRemoteTOD_in", NDR_IN);
   50304             : }
   50305             : 
   50306           0 : static PyObject *py_srvsvc_NetRemoteTOD_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   50307             : {
   50308           0 :         return py_srvsvc_NetRemoteTOD_ndr_print(py_obj, "srvsvc_NetRemoteTOD_out", NDR_OUT);
   50309             : }
   50310             : 
   50311             : static PyMethodDef py_srvsvc_NetRemoteTOD_methods[] = {
   50312             :         { "opnum", (PyCFunction)py_srvsvc_NetRemoteTOD_ndr_opnum, METH_NOARGS|METH_CLASS,
   50313             :                 "srvsvc.NetRemoteTOD.opnum() -> 28 (0x1c) " },
   50314             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetRemoteTOD_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   50315             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   50316             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetRemoteTOD_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   50317             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   50318             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetRemoteTOD_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   50319             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   50320             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetRemoteTOD_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   50321             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   50322             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetRemoteTOD_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   50323             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetRemoteTOD_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   50324             :         { NULL, NULL, 0, NULL }
   50325             : };
   50326             : 
   50327             : 
   50328             : static PyTypeObject srvsvc_NetRemoteTOD_Type = {
   50329             :         PyVarObject_HEAD_INIT(NULL, 0)
   50330             :         .tp_name = "srvsvc.NetRemoteTOD",
   50331             :         .tp_getset = py_srvsvc_NetRemoteTOD_getsetters,
   50332             :         .tp_methods = py_srvsvc_NetRemoteTOD_methods,
   50333             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   50334             :         .tp_new = py_srvsvc_NetRemoteTOD_new,
   50335             : };
   50336             : 
   50337           0 : static bool pack_py_srvsvc_NetRemoteTOD_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetRemoteTOD *r)
   50338             : {
   50339             :         PyObject *py_server_unc;
   50340           0 :         const char *kwnames[] = {
   50341             :                 "server_unc", NULL
   50342             :         };
   50343             : 
   50344           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:srvsvc_NetRemoteTOD", discard_const_p(char *, kwnames), &py_server_unc)) {
   50345           0 :                 return false;
   50346             :         }
   50347             : 
   50348           0 :         if (py_server_unc == NULL) {
   50349           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   50350           0 :                 return false;
   50351             :         }
   50352           0 :         if (py_server_unc == Py_None) {
   50353           0 :                 r->in.server_unc = NULL;
   50354             :         } else {
   50355           0 :                 r->in.server_unc = NULL;
   50356             :                 {
   50357             :                         const char *test_str;
   50358             :                         const char *talloc_str;
   50359           0 :                         PyObject *unicode = NULL;
   50360           0 :                         if (PyUnicode_Check(py_server_unc)) {
   50361           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   50362           0 :                                 if (unicode == NULL) {
   50363           0 :                                         PyErr_NoMemory();
   50364           0 :                                         return false;
   50365             :                                 }
   50366           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   50367           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   50368           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   50369             :                         } else {
   50370           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   50371           0 :                                 return false;
   50372             :                         }
   50373           0 :                         talloc_str = talloc_strdup(r, test_str);
   50374           0 :                         if (unicode != NULL) {
   50375           0 :                                 Py_DECREF(unicode);
   50376             :                         }
   50377           0 :                         if (talloc_str == NULL) {
   50378           0 :                                 PyErr_NoMemory();
   50379           0 :                                 return false;
   50380             :                         }
   50381           0 :                         r->in.server_unc = talloc_str;
   50382             :                 }
   50383             :         }
   50384           0 :         return true;
   50385             : }
   50386             : 
   50387           0 : static PyObject *unpack_py_srvsvc_NetRemoteTOD_args_out(struct srvsvc_NetRemoteTOD *r)
   50388             : {
   50389             :         PyObject *result;
   50390             :         PyObject *py_info;
   50391           0 :         if (*r->out.info == NULL) {
   50392           0 :                 py_info = Py_None;
   50393           0 :                 Py_INCREF(py_info);
   50394             :         } else {
   50395           0 :                 py_info = pytalloc_reference_ex(&srvsvc_NetRemoteTODInfo_Type, *r->out.info, *r->out.info);
   50396             :         }
   50397           0 :         result = py_info;
   50398           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   50399           0 :                 PyErr_SetWERROR(r->out.result);
   50400           0 :                 return NULL;
   50401             :         }
   50402             : 
   50403           0 :         return result;
   50404             : }
   50405             : 
   50406             : 
   50407           0 : static PyObject *py_srvsvc_NetSetServiceBits_in_get_server_unc(PyObject *obj, void *closure)
   50408             : {
   50409           0 :         struct srvsvc_NetSetServiceBits *object = (struct srvsvc_NetSetServiceBits *)pytalloc_get_ptr(obj);
   50410             :         PyObject *py_server_unc;
   50411           0 :         if (object->in.server_unc == NULL) {
   50412           0 :                 Py_RETURN_NONE;
   50413             :         }
   50414           0 :         if (object->in.server_unc == NULL) {
   50415           0 :                 py_server_unc = Py_None;
   50416           0 :                 Py_INCREF(py_server_unc);
   50417             :         } else {
   50418           0 :                 if (object->in.server_unc == NULL) {
   50419           0 :                         py_server_unc = Py_None;
   50420           0 :                         Py_INCREF(py_server_unc);
   50421             :                 } else {
   50422           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   50423             :                 }
   50424             :         }
   50425           0 :         return py_server_unc;
   50426             : }
   50427             : 
   50428           0 : static int py_srvsvc_NetSetServiceBits_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   50429             : {
   50430           0 :         struct srvsvc_NetSetServiceBits *object = (struct srvsvc_NetSetServiceBits *)pytalloc_get_ptr(py_obj);
   50431           0 :         if (value == NULL) {
   50432           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   50433           0 :                 return -1;
   50434             :         }
   50435           0 :         if (value == Py_None) {
   50436           0 :                 object->in.server_unc = NULL;
   50437             :         } else {
   50438           0 :                 object->in.server_unc = NULL;
   50439             :                 {
   50440             :                         const char *test_str;
   50441             :                         const char *talloc_str;
   50442           0 :                         PyObject *unicode = NULL;
   50443           0 :                         if (PyUnicode_Check(value)) {
   50444           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   50445           0 :                                 if (unicode == NULL) {
   50446           0 :                                         PyErr_NoMemory();
   50447           0 :                                         return -1;
   50448             :                                 }
   50449           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   50450           0 :                         } else if (PyBytes_Check(value)) {
   50451           0 :                                 test_str = PyBytes_AS_STRING(value);
   50452             :                         } else {
   50453           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   50454           0 :                                 return -1;
   50455             :                         }
   50456           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   50457           0 :                         if (unicode != NULL) {
   50458           0 :                                 Py_DECREF(unicode);
   50459             :                         }
   50460           0 :                         if (talloc_str == NULL) {
   50461           0 :                                 PyErr_NoMemory();
   50462           0 :                                 return -1;
   50463             :                         }
   50464           0 :                         object->in.server_unc = talloc_str;
   50465             :                 }
   50466             :         }
   50467           0 :         return 0;
   50468             : }
   50469             : 
   50470           0 : static PyObject *py_srvsvc_NetSetServiceBits_in_get_transport(PyObject *obj, void *closure)
   50471             : {
   50472           0 :         struct srvsvc_NetSetServiceBits *object = (struct srvsvc_NetSetServiceBits *)pytalloc_get_ptr(obj);
   50473             :         PyObject *py_transport;
   50474           0 :         if (object->in.transport == NULL) {
   50475           0 :                 Py_RETURN_NONE;
   50476             :         }
   50477           0 :         if (object->in.transport == NULL) {
   50478           0 :                 py_transport = Py_None;
   50479           0 :                 Py_INCREF(py_transport);
   50480             :         } else {
   50481           0 :                 if (object->in.transport == NULL) {
   50482           0 :                         py_transport = Py_None;
   50483           0 :                         Py_INCREF(py_transport);
   50484             :                 } else {
   50485           0 :                         py_transport = PyUnicode_Decode(object->in.transport, strlen(object->in.transport), "utf-8", "ignore");
   50486             :                 }
   50487             :         }
   50488           0 :         return py_transport;
   50489             : }
   50490             : 
   50491           0 : static int py_srvsvc_NetSetServiceBits_in_set_transport(PyObject *py_obj, PyObject *value, void *closure)
   50492             : {
   50493           0 :         struct srvsvc_NetSetServiceBits *object = (struct srvsvc_NetSetServiceBits *)pytalloc_get_ptr(py_obj);
   50494           0 :         if (value == NULL) {
   50495           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.transport");
   50496           0 :                 return -1;
   50497             :         }
   50498           0 :         if (value == Py_None) {
   50499           0 :                 object->in.transport = NULL;
   50500             :         } else {
   50501           0 :                 object->in.transport = NULL;
   50502             :                 {
   50503             :                         const char *test_str;
   50504             :                         const char *talloc_str;
   50505           0 :                         PyObject *unicode = NULL;
   50506           0 :                         if (PyUnicode_Check(value)) {
   50507           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   50508           0 :                                 if (unicode == NULL) {
   50509           0 :                                         PyErr_NoMemory();
   50510           0 :                                         return -1;
   50511             :                                 }
   50512           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   50513           0 :                         } else if (PyBytes_Check(value)) {
   50514           0 :                                 test_str = PyBytes_AS_STRING(value);
   50515             :                         } else {
   50516           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   50517           0 :                                 return -1;
   50518             :                         }
   50519           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   50520           0 :                         if (unicode != NULL) {
   50521           0 :                                 Py_DECREF(unicode);
   50522             :                         }
   50523           0 :                         if (talloc_str == NULL) {
   50524           0 :                                 PyErr_NoMemory();
   50525           0 :                                 return -1;
   50526             :                         }
   50527           0 :                         object->in.transport = talloc_str;
   50528             :                 }
   50529             :         }
   50530           0 :         return 0;
   50531             : }
   50532             : 
   50533           0 : static PyObject *py_srvsvc_NetSetServiceBits_in_get_servicebits(PyObject *obj, void *closure)
   50534             : {
   50535           0 :         struct srvsvc_NetSetServiceBits *object = (struct srvsvc_NetSetServiceBits *)pytalloc_get_ptr(obj);
   50536             :         PyObject *py_servicebits;
   50537           0 :         py_servicebits = PyLong_FromUnsignedLongLong((uint32_t)object->in.servicebits);
   50538           0 :         return py_servicebits;
   50539             : }
   50540             : 
   50541           0 : static int py_srvsvc_NetSetServiceBits_in_set_servicebits(PyObject *py_obj, PyObject *value, void *closure)
   50542             : {
   50543           0 :         struct srvsvc_NetSetServiceBits *object = (struct srvsvc_NetSetServiceBits *)pytalloc_get_ptr(py_obj);
   50544           0 :         if (value == NULL) {
   50545           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.servicebits");
   50546           0 :                 return -1;
   50547             :         }
   50548             :         {
   50549           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.servicebits));
   50550           0 :                 if (PyLong_Check(value)) {
   50551             :                         unsigned long long test_var;
   50552           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   50553           0 :                         if (PyErr_Occurred() != NULL) {
   50554           0 :                                 return -1;
   50555             :                         }
   50556           0 :                         if (test_var > uint_max) {
   50557           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   50558             :                                   PyLong_Type.tp_name, uint_max, test_var);
   50559           0 :                                 return -1;
   50560             :                         }
   50561           0 :                         object->in.servicebits = test_var;
   50562             :                 } else {
   50563           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   50564             :                           PyLong_Type.tp_name);
   50565           0 :                         return -1;
   50566             :                 }
   50567             :         }
   50568           0 :         return 0;
   50569             : }
   50570             : 
   50571           0 : static PyObject *py_srvsvc_NetSetServiceBits_in_get_updateimmediately(PyObject *obj, void *closure)
   50572             : {
   50573           0 :         struct srvsvc_NetSetServiceBits *object = (struct srvsvc_NetSetServiceBits *)pytalloc_get_ptr(obj);
   50574             :         PyObject *py_updateimmediately;
   50575           0 :         py_updateimmediately = PyLong_FromUnsignedLongLong((uint32_t)object->in.updateimmediately);
   50576           0 :         return py_updateimmediately;
   50577             : }
   50578             : 
   50579           0 : static int py_srvsvc_NetSetServiceBits_in_set_updateimmediately(PyObject *py_obj, PyObject *value, void *closure)
   50580             : {
   50581           0 :         struct srvsvc_NetSetServiceBits *object = (struct srvsvc_NetSetServiceBits *)pytalloc_get_ptr(py_obj);
   50582           0 :         if (value == NULL) {
   50583           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.updateimmediately");
   50584           0 :                 return -1;
   50585             :         }
   50586             :         {
   50587           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.updateimmediately));
   50588           0 :                 if (PyLong_Check(value)) {
   50589             :                         unsigned long long test_var;
   50590           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   50591           0 :                         if (PyErr_Occurred() != NULL) {
   50592           0 :                                 return -1;
   50593             :                         }
   50594           0 :                         if (test_var > uint_max) {
   50595           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   50596             :                                   PyLong_Type.tp_name, uint_max, test_var);
   50597           0 :                                 return -1;
   50598             :                         }
   50599           0 :                         object->in.updateimmediately = test_var;
   50600             :                 } else {
   50601           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   50602             :                           PyLong_Type.tp_name);
   50603           0 :                         return -1;
   50604             :                 }
   50605             :         }
   50606           0 :         return 0;
   50607             : }
   50608             : 
   50609           0 : static PyObject *py_srvsvc_NetSetServiceBits_get_result(PyObject *obj, void *closure)
   50610             : {
   50611           0 :         struct srvsvc_NetSetServiceBits *object = (struct srvsvc_NetSetServiceBits *)pytalloc_get_ptr(obj);
   50612             :         PyObject *py_result;
   50613           0 :         py_result = PyErr_FromWERROR(object->out.result);
   50614           0 :         return py_result;
   50615             : }
   50616             : 
   50617           0 : static int py_srvsvc_NetSetServiceBits_set_result(PyObject *py_obj, PyObject *value, void *closure)
   50618             : {
   50619           0 :         struct srvsvc_NetSetServiceBits *object = (struct srvsvc_NetSetServiceBits *)pytalloc_get_ptr(py_obj);
   50620           0 :         if (value == NULL) {
   50621           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   50622           0 :                 return -1;
   50623             :         }
   50624           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   50625           0 :         return 0;
   50626             : }
   50627             : 
   50628             : static PyGetSetDef py_srvsvc_NetSetServiceBits_getsetters[] = {
   50629             :         {
   50630             :                 .name = discard_const_p(char, "in_server_unc"),
   50631             :                 .get = py_srvsvc_NetSetServiceBits_in_get_server_unc,
   50632             :                 .set = py_srvsvc_NetSetServiceBits_in_set_server_unc,
   50633             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   50634             :         },
   50635             :         {
   50636             :                 .name = discard_const_p(char, "in_transport"),
   50637             :                 .get = py_srvsvc_NetSetServiceBits_in_get_transport,
   50638             :                 .set = py_srvsvc_NetSetServiceBits_in_set_transport,
   50639             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   50640             :         },
   50641             :         {
   50642             :                 .name = discard_const_p(char, "in_servicebits"),
   50643             :                 .get = py_srvsvc_NetSetServiceBits_in_get_servicebits,
   50644             :                 .set = py_srvsvc_NetSetServiceBits_in_set_servicebits,
   50645             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   50646             :         },
   50647             :         {
   50648             :                 .name = discard_const_p(char, "in_updateimmediately"),
   50649             :                 .get = py_srvsvc_NetSetServiceBits_in_get_updateimmediately,
   50650             :                 .set = py_srvsvc_NetSetServiceBits_in_set_updateimmediately,
   50651             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   50652             :         },
   50653             :         {
   50654             :                 .name = discard_const_p(char, "result"),
   50655             :                 .get = py_srvsvc_NetSetServiceBits_get_result,
   50656             :                 .set = py_srvsvc_NetSetServiceBits_set_result,
   50657             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   50658             :         },
   50659             :         { .name = NULL }
   50660             : };
   50661             : 
   50662           0 : static PyObject *py_srvsvc_NetSetServiceBits_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   50663             : {
   50664           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetSetServiceBits, type);
   50665           0 :         return self;
   50666             : }
   50667             : 
   50668           0 : static PyObject *py_srvsvc_NetSetServiceBits_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   50669             : {
   50670             : 
   50671             : 
   50672           0 :         return PyLong_FromLong(29);
   50673             : }
   50674             : 
   50675           0 : static PyObject *py_srvsvc_NetSetServiceBits_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   50676             : {
   50677           0 :         const struct ndr_interface_call *call = NULL;
   50678           0 :         struct srvsvc_NetSetServiceBits *object = (struct srvsvc_NetSetServiceBits *)pytalloc_get_ptr(py_obj);
   50679           0 :         PyObject *ret = NULL;
   50680           0 :         struct ndr_push *push = NULL;
   50681             :         DATA_BLOB blob;
   50682             :         enum ndr_err_code err;
   50683             : 
   50684           0 :         if (ndr_table_srvsvc.num_calls < 30) {
   50685           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSetServiceBits_ndr_pack");
   50686           0 :                 return NULL;
   50687             :         }
   50688           0 :         call = &ndr_table_srvsvc.calls[29];
   50689             : 
   50690           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   50691           0 :         if (push == NULL) {
   50692           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   50693           0 :                 return NULL;
   50694             :         }
   50695             : 
   50696           0 :         push->flags |= ndr_push_flags;
   50697             : 
   50698           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   50699           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   50700           0 :                 TALLOC_FREE(push);
   50701           0 :                 PyErr_SetNdrError(err);
   50702           0 :                 return NULL;
   50703             :         }
   50704           0 :         blob = ndr_push_blob(push);
   50705           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   50706           0 :         TALLOC_FREE(push);
   50707           0 :         return ret;
   50708             : }
   50709             : 
   50710           0 : static PyObject *py_srvsvc_NetSetServiceBits_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50711             : {
   50712           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   50713           0 :         PyObject *bigendian_obj = NULL;
   50714           0 :         PyObject *ndr64_obj = NULL;
   50715           0 :         uint32_t ndr_push_flags = 0;
   50716             : 
   50717           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   50718             :                 discard_const_p(char *, kwnames),
   50719             :                 &bigendian_obj,
   50720             :                 &ndr64_obj)) {
   50721           0 :                 return NULL;
   50722             :         }
   50723             : 
   50724           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50725           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   50726             :         }
   50727           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50728           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   50729             :         }
   50730             : 
   50731           0 :         return py_srvsvc_NetSetServiceBits_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   50732             : }
   50733             : 
   50734           0 : static PyObject *py_srvsvc_NetSetServiceBits_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50735             : {
   50736           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   50737           0 :         PyObject *bigendian_obj = NULL;
   50738           0 :         PyObject *ndr64_obj = NULL;
   50739           0 :         uint32_t ndr_push_flags = 0;
   50740             : 
   50741           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   50742             :                 discard_const_p(char *, kwnames),
   50743             :                 &bigendian_obj,
   50744             :                 &ndr64_obj)) {
   50745           0 :                 return NULL;
   50746             :         }
   50747             : 
   50748           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50749           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   50750             :         }
   50751           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50752           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   50753             :         }
   50754             : 
   50755           0 :         return py_srvsvc_NetSetServiceBits_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   50756             : }
   50757             : 
   50758           0 : static PyObject *py_srvsvc_NetSetServiceBits_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   50759             : {
   50760           0 :         const struct ndr_interface_call *call = NULL;
   50761           0 :         struct srvsvc_NetSetServiceBits *object = (struct srvsvc_NetSetServiceBits *)pytalloc_get_ptr(py_obj);
   50762           0 :         struct ndr_pull *pull = NULL;
   50763             :         enum ndr_err_code err;
   50764             : 
   50765           0 :         if (ndr_table_srvsvc.num_calls < 30) {
   50766           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSetServiceBits_ndr_unpack");
   50767           0 :                 return NULL;
   50768             :         }
   50769           0 :         call = &ndr_table_srvsvc.calls[29];
   50770             : 
   50771           0 :         pull = ndr_pull_init_blob(blob, object);
   50772           0 :         if (pull == NULL) {
   50773           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   50774           0 :                 return NULL;
   50775             :         }
   50776             : 
   50777           0 :         pull->flags |= ndr_pull_flags;
   50778             : 
   50779           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   50780           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   50781           0 :                 TALLOC_FREE(pull);
   50782           0 :                 PyErr_SetNdrError(err);
   50783           0 :                 return NULL;
   50784             :         }
   50785           0 :         if (!allow_remaining) {
   50786             :                 uint32_t highest_ofs;
   50787             : 
   50788           0 :                 if (pull->offset > pull->relative_highest_offset) {
   50789           0 :                         highest_ofs = pull->offset;
   50790             :                 } else {
   50791           0 :                         highest_ofs = pull->relative_highest_offset;
   50792             :                 }
   50793           0 :                 if (highest_ofs < pull->data_size) {
   50794           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   50795             :                                 "not all bytes consumed ofs[%u] size[%u]",
   50796             :                                 highest_ofs, pull->data_size);
   50797           0 :                         TALLOC_FREE(pull);
   50798           0 :                         PyErr_SetNdrError(err);
   50799           0 :                         return NULL;
   50800             :                 }
   50801             :         }
   50802             : 
   50803           0 :         TALLOC_FREE(pull);
   50804           0 :         Py_RETURN_NONE;
   50805             : }
   50806             : 
   50807           0 : static PyObject *py_srvsvc_NetSetServiceBits_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50808             : {
   50809             :         DATA_BLOB blob;
   50810           0 :         Py_ssize_t blob_length = 0;
   50811           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   50812           0 :         PyObject *bigendian_obj = NULL;
   50813           0 :         PyObject *ndr64_obj = NULL;
   50814           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   50815           0 :         PyObject *allow_remaining_obj = NULL;
   50816           0 :         bool allow_remaining = false;
   50817             : 
   50818           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   50819             :                 discard_const_p(char *, kwnames),
   50820             :                 &blob.data, &blob_length,
   50821             :                 &bigendian_obj,
   50822             :                 &ndr64_obj,
   50823             :                 &allow_remaining_obj)) {
   50824           0 :                 return NULL;
   50825             :         }
   50826           0 :         blob.length = blob_length;
   50827             : 
   50828           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50829           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   50830             :         }
   50831           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50832           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   50833             :         }
   50834             : 
   50835           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   50836           0 :                 allow_remaining = true;
   50837             :         }
   50838             : 
   50839           0 :         return py_srvsvc_NetSetServiceBits_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   50840             : }
   50841             : 
   50842           0 : static PyObject *py_srvsvc_NetSetServiceBits_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50843             : {
   50844             :         DATA_BLOB blob;
   50845           0 :         Py_ssize_t blob_length = 0;
   50846           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   50847           0 :         PyObject *bigendian_obj = NULL;
   50848           0 :         PyObject *ndr64_obj = NULL;
   50849           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   50850           0 :         PyObject *allow_remaining_obj = NULL;
   50851           0 :         bool allow_remaining = false;
   50852             : 
   50853           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   50854             :                 discard_const_p(char *, kwnames),
   50855             :                 &blob.data, &blob_length,
   50856             :                 &bigendian_obj,
   50857             :                 &ndr64_obj,
   50858             :                 &allow_remaining_obj)) {
   50859           0 :                 return NULL;
   50860             :         }
   50861           0 :         blob.length = blob_length;
   50862             : 
   50863           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50864           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   50865             :         }
   50866           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50867           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   50868             :         }
   50869             : 
   50870           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   50871           0 :                 allow_remaining = true;
   50872             :         }
   50873             : 
   50874           0 :         return py_srvsvc_NetSetServiceBits_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   50875             : }
   50876             : 
   50877           0 : static PyObject *py_srvsvc_NetSetServiceBits_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   50878             : {
   50879           0 :         const struct ndr_interface_call *call = NULL;
   50880           0 :         struct srvsvc_NetSetServiceBits *object = (struct srvsvc_NetSetServiceBits *)pytalloc_get_ptr(py_obj);
   50881             :         PyObject *ret;
   50882             :         char *retstr;
   50883             : 
   50884           0 :         if (ndr_table_srvsvc.num_calls < 30) {
   50885           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSetServiceBits_ndr_print");
   50886           0 :                 return NULL;
   50887             :         }
   50888           0 :         call = &ndr_table_srvsvc.calls[29];
   50889             : 
   50890           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   50891           0 :         ret = PyUnicode_FromString(retstr);
   50892           0 :         TALLOC_FREE(retstr);
   50893             : 
   50894           0 :         return ret;
   50895             : }
   50896             : 
   50897           0 : static PyObject *py_srvsvc_NetSetServiceBits_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   50898             : {
   50899           0 :         return py_srvsvc_NetSetServiceBits_ndr_print(py_obj, "srvsvc_NetSetServiceBits_in", NDR_IN);
   50900             : }
   50901             : 
   50902           0 : static PyObject *py_srvsvc_NetSetServiceBits_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   50903             : {
   50904           0 :         return py_srvsvc_NetSetServiceBits_ndr_print(py_obj, "srvsvc_NetSetServiceBits_out", NDR_OUT);
   50905             : }
   50906             : 
   50907             : static PyMethodDef py_srvsvc_NetSetServiceBits_methods[] = {
   50908             :         { "opnum", (PyCFunction)py_srvsvc_NetSetServiceBits_ndr_opnum, METH_NOARGS|METH_CLASS,
   50909             :                 "srvsvc.NetSetServiceBits.opnum() -> 29 (0x1d) " },
   50910             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSetServiceBits_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   50911             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   50912             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSetServiceBits_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   50913             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   50914             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSetServiceBits_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   50915             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   50916             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSetServiceBits_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   50917             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   50918             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetSetServiceBits_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   50919             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetSetServiceBits_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   50920             :         { NULL, NULL, 0, NULL }
   50921             : };
   50922             : 
   50923             : 
   50924             : static PyTypeObject srvsvc_NetSetServiceBits_Type = {
   50925             :         PyVarObject_HEAD_INIT(NULL, 0)
   50926             :         .tp_name = "srvsvc.NetSetServiceBits",
   50927             :         .tp_getset = py_srvsvc_NetSetServiceBits_getsetters,
   50928             :         .tp_methods = py_srvsvc_NetSetServiceBits_methods,
   50929             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   50930             :         .tp_new = py_srvsvc_NetSetServiceBits_new,
   50931             : };
   50932             : 
   50933           0 : static bool pack_py_srvsvc_NetSetServiceBits_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetSetServiceBits *r)
   50934             : {
   50935             :         PyObject *py_server_unc;
   50936             :         PyObject *py_transport;
   50937             :         PyObject *py_servicebits;
   50938             :         PyObject *py_updateimmediately;
   50939           0 :         const char *kwnames[] = {
   50940             :                 "server_unc", "transport", "servicebits", "updateimmediately", NULL
   50941             :         };
   50942             : 
   50943           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetSetServiceBits", discard_const_p(char *, kwnames), &py_server_unc, &py_transport, &py_servicebits, &py_updateimmediately)) {
   50944           0 :                 return false;
   50945             :         }
   50946             : 
   50947           0 :         if (py_server_unc == NULL) {
   50948           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   50949           0 :                 return false;
   50950             :         }
   50951           0 :         if (py_server_unc == Py_None) {
   50952           0 :                 r->in.server_unc = NULL;
   50953             :         } else {
   50954           0 :                 r->in.server_unc = NULL;
   50955             :                 {
   50956             :                         const char *test_str;
   50957             :                         const char *talloc_str;
   50958           0 :                         PyObject *unicode = NULL;
   50959           0 :                         if (PyUnicode_Check(py_server_unc)) {
   50960           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   50961           0 :                                 if (unicode == NULL) {
   50962           0 :                                         PyErr_NoMemory();
   50963           0 :                                         return false;
   50964             :                                 }
   50965           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   50966           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   50967           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   50968             :                         } else {
   50969           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   50970           0 :                                 return false;
   50971             :                         }
   50972           0 :                         talloc_str = talloc_strdup(r, test_str);
   50973           0 :                         if (unicode != NULL) {
   50974           0 :                                 Py_DECREF(unicode);
   50975             :                         }
   50976           0 :                         if (talloc_str == NULL) {
   50977           0 :                                 PyErr_NoMemory();
   50978           0 :                                 return false;
   50979             :                         }
   50980           0 :                         r->in.server_unc = talloc_str;
   50981             :                 }
   50982             :         }
   50983           0 :         if (py_transport == NULL) {
   50984           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.transport");
   50985           0 :                 return false;
   50986             :         }
   50987           0 :         if (py_transport == Py_None) {
   50988           0 :                 r->in.transport = NULL;
   50989             :         } else {
   50990           0 :                 r->in.transport = NULL;
   50991             :                 {
   50992             :                         const char *test_str;
   50993             :                         const char *talloc_str;
   50994           0 :                         PyObject *unicode = NULL;
   50995           0 :                         if (PyUnicode_Check(py_transport)) {
   50996           0 :                                 unicode = PyUnicode_AsEncodedString(py_transport, "utf-8", "ignore");
   50997           0 :                                 if (unicode == NULL) {
   50998           0 :                                         PyErr_NoMemory();
   50999           0 :                                         return false;
   51000             :                                 }
   51001           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   51002           0 :                         } else if (PyBytes_Check(py_transport)) {
   51003           0 :                                 test_str = PyBytes_AS_STRING(py_transport);
   51004             :                         } else {
   51005           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_transport)->tp_name);
   51006           0 :                                 return false;
   51007             :                         }
   51008           0 :                         talloc_str = talloc_strdup(r, test_str);
   51009           0 :                         if (unicode != NULL) {
   51010           0 :                                 Py_DECREF(unicode);
   51011             :                         }
   51012           0 :                         if (talloc_str == NULL) {
   51013           0 :                                 PyErr_NoMemory();
   51014           0 :                                 return false;
   51015             :                         }
   51016           0 :                         r->in.transport = talloc_str;
   51017             :                 }
   51018             :         }
   51019           0 :         if (py_servicebits == NULL) {
   51020           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.servicebits");
   51021           0 :                 return false;
   51022             :         }
   51023             :         {
   51024           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.servicebits));
   51025           0 :                 if (PyLong_Check(py_servicebits)) {
   51026             :                         unsigned long long test_var;
   51027           0 :                         test_var = PyLong_AsUnsignedLongLong(py_servicebits);
   51028           0 :                         if (PyErr_Occurred() != NULL) {
   51029           0 :                                 return false;
   51030             :                         }
   51031           0 :                         if (test_var > uint_max) {
   51032           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   51033             :                                   PyLong_Type.tp_name, uint_max, test_var);
   51034           0 :                                 return false;
   51035             :                         }
   51036           0 :                         r->in.servicebits = test_var;
   51037             :                 } else {
   51038           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   51039             :                           PyLong_Type.tp_name);
   51040           0 :                         return false;
   51041             :                 }
   51042             :         }
   51043           0 :         if (py_updateimmediately == NULL) {
   51044           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.updateimmediately");
   51045           0 :                 return false;
   51046             :         }
   51047             :         {
   51048           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.updateimmediately));
   51049           0 :                 if (PyLong_Check(py_updateimmediately)) {
   51050             :                         unsigned long long test_var;
   51051           0 :                         test_var = PyLong_AsUnsignedLongLong(py_updateimmediately);
   51052           0 :                         if (PyErr_Occurred() != NULL) {
   51053           0 :                                 return false;
   51054             :                         }
   51055           0 :                         if (test_var > uint_max) {
   51056           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   51057             :                                   PyLong_Type.tp_name, uint_max, test_var);
   51058           0 :                                 return false;
   51059             :                         }
   51060           0 :                         r->in.updateimmediately = test_var;
   51061             :                 } else {
   51062           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   51063             :                           PyLong_Type.tp_name);
   51064           0 :                         return false;
   51065             :                 }
   51066             :         }
   51067           0 :         return true;
   51068             : }
   51069             : 
   51070           0 : static PyObject *unpack_py_srvsvc_NetSetServiceBits_args_out(struct srvsvc_NetSetServiceBits *r)
   51071             : {
   51072             :         PyObject *result;
   51073           0 :         result = Py_None;
   51074           0 :         Py_INCREF(result);
   51075           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   51076           0 :                 PyErr_SetWERROR(r->out.result);
   51077           0 :                 return NULL;
   51078             :         }
   51079             : 
   51080           0 :         return result;
   51081             : }
   51082             : 
   51083             : 
   51084           0 : static PyObject *py_srvsvc_NetPathType_in_get_server_unc(PyObject *obj, void *closure)
   51085             : {
   51086           0 :         struct srvsvc_NetPathType *object = (struct srvsvc_NetPathType *)pytalloc_get_ptr(obj);
   51087             :         PyObject *py_server_unc;
   51088           0 :         if (object->in.server_unc == NULL) {
   51089           0 :                 Py_RETURN_NONE;
   51090             :         }
   51091           0 :         if (object->in.server_unc == NULL) {
   51092           0 :                 py_server_unc = Py_None;
   51093           0 :                 Py_INCREF(py_server_unc);
   51094             :         } else {
   51095           0 :                 if (object->in.server_unc == NULL) {
   51096           0 :                         py_server_unc = Py_None;
   51097           0 :                         Py_INCREF(py_server_unc);
   51098             :                 } else {
   51099           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   51100             :                 }
   51101             :         }
   51102           0 :         return py_server_unc;
   51103             : }
   51104             : 
   51105           0 : static int py_srvsvc_NetPathType_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   51106             : {
   51107           0 :         struct srvsvc_NetPathType *object = (struct srvsvc_NetPathType *)pytalloc_get_ptr(py_obj);
   51108           0 :         if (value == NULL) {
   51109           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   51110           0 :                 return -1;
   51111             :         }
   51112           0 :         if (value == Py_None) {
   51113           0 :                 object->in.server_unc = NULL;
   51114             :         } else {
   51115           0 :                 object->in.server_unc = NULL;
   51116             :                 {
   51117             :                         const char *test_str;
   51118             :                         const char *talloc_str;
   51119           0 :                         PyObject *unicode = NULL;
   51120           0 :                         if (PyUnicode_Check(value)) {
   51121           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   51122           0 :                                 if (unicode == NULL) {
   51123           0 :                                         PyErr_NoMemory();
   51124           0 :                                         return -1;
   51125             :                                 }
   51126           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   51127           0 :                         } else if (PyBytes_Check(value)) {
   51128           0 :                                 test_str = PyBytes_AS_STRING(value);
   51129             :                         } else {
   51130           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   51131           0 :                                 return -1;
   51132             :                         }
   51133           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   51134           0 :                         if (unicode != NULL) {
   51135           0 :                                 Py_DECREF(unicode);
   51136             :                         }
   51137           0 :                         if (talloc_str == NULL) {
   51138           0 :                                 PyErr_NoMemory();
   51139           0 :                                 return -1;
   51140             :                         }
   51141           0 :                         object->in.server_unc = talloc_str;
   51142             :                 }
   51143             :         }
   51144           0 :         return 0;
   51145             : }
   51146             : 
   51147           0 : static PyObject *py_srvsvc_NetPathType_in_get_path(PyObject *obj, void *closure)
   51148             : {
   51149           0 :         struct srvsvc_NetPathType *object = (struct srvsvc_NetPathType *)pytalloc_get_ptr(obj);
   51150             :         PyObject *py_path;
   51151           0 :         if (object->in.path == NULL) {
   51152           0 :                 py_path = Py_None;
   51153           0 :                 Py_INCREF(py_path);
   51154             :         } else {
   51155           0 :                 py_path = PyUnicode_Decode(object->in.path, strlen(object->in.path), "utf-8", "ignore");
   51156             :         }
   51157           0 :         return py_path;
   51158             : }
   51159             : 
   51160           0 : static int py_srvsvc_NetPathType_in_set_path(PyObject *py_obj, PyObject *value, void *closure)
   51161             : {
   51162           0 :         struct srvsvc_NetPathType *object = (struct srvsvc_NetPathType *)pytalloc_get_ptr(py_obj);
   51163           0 :         if (value == NULL) {
   51164           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.path");
   51165           0 :                 return -1;
   51166             :         }
   51167             :         {
   51168             :                 const char *test_str;
   51169             :                 const char *talloc_str;
   51170           0 :                 PyObject *unicode = NULL;
   51171           0 :                 if (PyUnicode_Check(value)) {
   51172           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   51173           0 :                         if (unicode == NULL) {
   51174           0 :                                 PyErr_NoMemory();
   51175           0 :                                 return -1;
   51176             :                         }
   51177           0 :                         test_str = PyBytes_AS_STRING(unicode);
   51178           0 :                 } else if (PyBytes_Check(value)) {
   51179           0 :                         test_str = PyBytes_AS_STRING(value);
   51180             :                 } else {
   51181           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   51182           0 :                         return -1;
   51183             :                 }
   51184           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   51185           0 :                 if (unicode != NULL) {
   51186           0 :                         Py_DECREF(unicode);
   51187             :                 }
   51188           0 :                 if (talloc_str == NULL) {
   51189           0 :                         PyErr_NoMemory();
   51190           0 :                         return -1;
   51191             :                 }
   51192           0 :                 object->in.path = talloc_str;
   51193             :         }
   51194           0 :         return 0;
   51195             : }
   51196             : 
   51197           0 : static PyObject *py_srvsvc_NetPathType_in_get_pathflags(PyObject *obj, void *closure)
   51198             : {
   51199           0 :         struct srvsvc_NetPathType *object = (struct srvsvc_NetPathType *)pytalloc_get_ptr(obj);
   51200             :         PyObject *py_pathflags;
   51201           0 :         py_pathflags = PyLong_FromUnsignedLongLong((uint32_t)object->in.pathflags);
   51202           0 :         return py_pathflags;
   51203             : }
   51204             : 
   51205           0 : static int py_srvsvc_NetPathType_in_set_pathflags(PyObject *py_obj, PyObject *value, void *closure)
   51206             : {
   51207           0 :         struct srvsvc_NetPathType *object = (struct srvsvc_NetPathType *)pytalloc_get_ptr(py_obj);
   51208           0 :         if (value == NULL) {
   51209           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pathflags");
   51210           0 :                 return -1;
   51211             :         }
   51212             :         {
   51213           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.pathflags));
   51214           0 :                 if (PyLong_Check(value)) {
   51215             :                         unsigned long long test_var;
   51216           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   51217           0 :                         if (PyErr_Occurred() != NULL) {
   51218           0 :                                 return -1;
   51219             :                         }
   51220           0 :                         if (test_var > uint_max) {
   51221           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   51222             :                                   PyLong_Type.tp_name, uint_max, test_var);
   51223           0 :                                 return -1;
   51224             :                         }
   51225           0 :                         object->in.pathflags = test_var;
   51226             :                 } else {
   51227           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   51228             :                           PyLong_Type.tp_name);
   51229           0 :                         return -1;
   51230             :                 }
   51231             :         }
   51232           0 :         return 0;
   51233             : }
   51234             : 
   51235           0 : static PyObject *py_srvsvc_NetPathType_out_get_pathtype(PyObject *obj, void *closure)
   51236             : {
   51237           0 :         struct srvsvc_NetPathType *object = (struct srvsvc_NetPathType *)pytalloc_get_ptr(obj);
   51238             :         PyObject *py_pathtype;
   51239           0 :         if (object->out.pathtype == NULL) {
   51240           0 :                 Py_RETURN_NONE;
   51241             :         }
   51242           0 :         py_pathtype = PyLong_FromUnsignedLongLong((uint32_t)*object->out.pathtype);
   51243           0 :         return py_pathtype;
   51244             : }
   51245             : 
   51246           0 : static int py_srvsvc_NetPathType_out_set_pathtype(PyObject *py_obj, PyObject *value, void *closure)
   51247             : {
   51248           0 :         struct srvsvc_NetPathType *object = (struct srvsvc_NetPathType *)pytalloc_get_ptr(py_obj);
   51249           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.pathtype));
   51250           0 :         if (value == NULL) {
   51251           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.pathtype");
   51252           0 :                 return -1;
   51253             :         }
   51254           0 :         object->out.pathtype = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.pathtype);
   51255           0 :         if (object->out.pathtype == NULL) {
   51256           0 :                 PyErr_NoMemory();
   51257           0 :                 return -1;
   51258             :         }
   51259             :         {
   51260           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.pathtype));
   51261           0 :                 if (PyLong_Check(value)) {
   51262             :                         unsigned long long test_var;
   51263           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   51264           0 :                         if (PyErr_Occurred() != NULL) {
   51265           0 :                                 return -1;
   51266             :                         }
   51267           0 :                         if (test_var > uint_max) {
   51268           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   51269             :                                   PyLong_Type.tp_name, uint_max, test_var);
   51270           0 :                                 return -1;
   51271             :                         }
   51272           0 :                         *object->out.pathtype = test_var;
   51273             :                 } else {
   51274           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   51275             :                           PyLong_Type.tp_name);
   51276           0 :                         return -1;
   51277             :                 }
   51278             :         }
   51279           0 :         return 0;
   51280             : }
   51281             : 
   51282           0 : static PyObject *py_srvsvc_NetPathType_get_result(PyObject *obj, void *closure)
   51283             : {
   51284           0 :         struct srvsvc_NetPathType *object = (struct srvsvc_NetPathType *)pytalloc_get_ptr(obj);
   51285             :         PyObject *py_result;
   51286           0 :         py_result = PyErr_FromWERROR(object->out.result);
   51287           0 :         return py_result;
   51288             : }
   51289             : 
   51290           0 : static int py_srvsvc_NetPathType_set_result(PyObject *py_obj, PyObject *value, void *closure)
   51291             : {
   51292           0 :         struct srvsvc_NetPathType *object = (struct srvsvc_NetPathType *)pytalloc_get_ptr(py_obj);
   51293           0 :         if (value == NULL) {
   51294           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   51295           0 :                 return -1;
   51296             :         }
   51297           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   51298           0 :         return 0;
   51299             : }
   51300             : 
   51301             : static PyGetSetDef py_srvsvc_NetPathType_getsetters[] = {
   51302             :         {
   51303             :                 .name = discard_const_p(char, "in_server_unc"),
   51304             :                 .get = py_srvsvc_NetPathType_in_get_server_unc,
   51305             :                 .set = py_srvsvc_NetPathType_in_set_server_unc,
   51306             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   51307             :         },
   51308             :         {
   51309             :                 .name = discard_const_p(char, "in_path"),
   51310             :                 .get = py_srvsvc_NetPathType_in_get_path,
   51311             :                 .set = py_srvsvc_NetPathType_in_set_path,
   51312             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   51313             :         },
   51314             :         {
   51315             :                 .name = discard_const_p(char, "in_pathflags"),
   51316             :                 .get = py_srvsvc_NetPathType_in_get_pathflags,
   51317             :                 .set = py_srvsvc_NetPathType_in_set_pathflags,
   51318             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   51319             :         },
   51320             :         {
   51321             :                 .name = discard_const_p(char, "out_pathtype"),
   51322             :                 .get = py_srvsvc_NetPathType_out_get_pathtype,
   51323             :                 .set = py_srvsvc_NetPathType_out_set_pathtype,
   51324             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   51325             :         },
   51326             :         {
   51327             :                 .name = discard_const_p(char, "result"),
   51328             :                 .get = py_srvsvc_NetPathType_get_result,
   51329             :                 .set = py_srvsvc_NetPathType_set_result,
   51330             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   51331             :         },
   51332             :         { .name = NULL }
   51333             : };
   51334             : 
   51335           0 : static PyObject *py_srvsvc_NetPathType_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   51336             : {
   51337           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetPathType, type);
   51338           0 :         struct srvsvc_NetPathType *_self = (struct srvsvc_NetPathType *)pytalloc_get_ptr(self);
   51339           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   51340           0 :         _self->out.pathtype = talloc_zero(mem_ctx, uint32_t);
   51341           0 :         return self;
   51342             : }
   51343             : 
   51344           0 : static PyObject *py_srvsvc_NetPathType_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   51345             : {
   51346             : 
   51347             : 
   51348           0 :         return PyLong_FromLong(30);
   51349             : }
   51350             : 
   51351           0 : static PyObject *py_srvsvc_NetPathType_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   51352             : {
   51353           0 :         const struct ndr_interface_call *call = NULL;
   51354           0 :         struct srvsvc_NetPathType *object = (struct srvsvc_NetPathType *)pytalloc_get_ptr(py_obj);
   51355           0 :         PyObject *ret = NULL;
   51356           0 :         struct ndr_push *push = NULL;
   51357             :         DATA_BLOB blob;
   51358             :         enum ndr_err_code err;
   51359             : 
   51360           0 :         if (ndr_table_srvsvc.num_calls < 31) {
   51361           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetPathType_ndr_pack");
   51362           0 :                 return NULL;
   51363             :         }
   51364           0 :         call = &ndr_table_srvsvc.calls[30];
   51365             : 
   51366           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   51367           0 :         if (push == NULL) {
   51368           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   51369           0 :                 return NULL;
   51370             :         }
   51371             : 
   51372           0 :         push->flags |= ndr_push_flags;
   51373             : 
   51374           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   51375           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   51376           0 :                 TALLOC_FREE(push);
   51377           0 :                 PyErr_SetNdrError(err);
   51378           0 :                 return NULL;
   51379             :         }
   51380           0 :         blob = ndr_push_blob(push);
   51381           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   51382           0 :         TALLOC_FREE(push);
   51383           0 :         return ret;
   51384             : }
   51385             : 
   51386           0 : static PyObject *py_srvsvc_NetPathType_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   51387             : {
   51388           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   51389           0 :         PyObject *bigendian_obj = NULL;
   51390           0 :         PyObject *ndr64_obj = NULL;
   51391           0 :         uint32_t ndr_push_flags = 0;
   51392             : 
   51393           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   51394             :                 discard_const_p(char *, kwnames),
   51395             :                 &bigendian_obj,
   51396             :                 &ndr64_obj)) {
   51397           0 :                 return NULL;
   51398             :         }
   51399             : 
   51400           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   51401           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   51402             :         }
   51403           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   51404           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   51405             :         }
   51406             : 
   51407           0 :         return py_srvsvc_NetPathType_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   51408             : }
   51409             : 
   51410           0 : static PyObject *py_srvsvc_NetPathType_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   51411             : {
   51412           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   51413           0 :         PyObject *bigendian_obj = NULL;
   51414           0 :         PyObject *ndr64_obj = NULL;
   51415           0 :         uint32_t ndr_push_flags = 0;
   51416             : 
   51417           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   51418             :                 discard_const_p(char *, kwnames),
   51419             :                 &bigendian_obj,
   51420             :                 &ndr64_obj)) {
   51421           0 :                 return NULL;
   51422             :         }
   51423             : 
   51424           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   51425           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   51426             :         }
   51427           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   51428           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   51429             :         }
   51430             : 
   51431           0 :         return py_srvsvc_NetPathType_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   51432             : }
   51433             : 
   51434           0 : static PyObject *py_srvsvc_NetPathType_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   51435             : {
   51436           0 :         const struct ndr_interface_call *call = NULL;
   51437           0 :         struct srvsvc_NetPathType *object = (struct srvsvc_NetPathType *)pytalloc_get_ptr(py_obj);
   51438           0 :         struct ndr_pull *pull = NULL;
   51439             :         enum ndr_err_code err;
   51440             : 
   51441           0 :         if (ndr_table_srvsvc.num_calls < 31) {
   51442           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetPathType_ndr_unpack");
   51443           0 :                 return NULL;
   51444             :         }
   51445           0 :         call = &ndr_table_srvsvc.calls[30];
   51446             : 
   51447           0 :         pull = ndr_pull_init_blob(blob, object);
   51448           0 :         if (pull == NULL) {
   51449           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   51450           0 :                 return NULL;
   51451             :         }
   51452             : 
   51453           0 :         pull->flags |= ndr_pull_flags;
   51454             : 
   51455           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   51456           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   51457           0 :                 TALLOC_FREE(pull);
   51458           0 :                 PyErr_SetNdrError(err);
   51459           0 :                 return NULL;
   51460             :         }
   51461           0 :         if (!allow_remaining) {
   51462             :                 uint32_t highest_ofs;
   51463             : 
   51464           0 :                 if (pull->offset > pull->relative_highest_offset) {
   51465           0 :                         highest_ofs = pull->offset;
   51466             :                 } else {
   51467           0 :                         highest_ofs = pull->relative_highest_offset;
   51468             :                 }
   51469           0 :                 if (highest_ofs < pull->data_size) {
   51470           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   51471             :                                 "not all bytes consumed ofs[%u] size[%u]",
   51472             :                                 highest_ofs, pull->data_size);
   51473           0 :                         TALLOC_FREE(pull);
   51474           0 :                         PyErr_SetNdrError(err);
   51475           0 :                         return NULL;
   51476             :                 }
   51477             :         }
   51478             : 
   51479           0 :         TALLOC_FREE(pull);
   51480           0 :         Py_RETURN_NONE;
   51481             : }
   51482             : 
   51483           0 : static PyObject *py_srvsvc_NetPathType_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   51484             : {
   51485             :         DATA_BLOB blob;
   51486           0 :         Py_ssize_t blob_length = 0;
   51487           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   51488           0 :         PyObject *bigendian_obj = NULL;
   51489           0 :         PyObject *ndr64_obj = NULL;
   51490           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   51491           0 :         PyObject *allow_remaining_obj = NULL;
   51492           0 :         bool allow_remaining = false;
   51493             : 
   51494           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   51495             :                 discard_const_p(char *, kwnames),
   51496             :                 &blob.data, &blob_length,
   51497             :                 &bigendian_obj,
   51498             :                 &ndr64_obj,
   51499             :                 &allow_remaining_obj)) {
   51500           0 :                 return NULL;
   51501             :         }
   51502           0 :         blob.length = blob_length;
   51503             : 
   51504           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   51505           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   51506             :         }
   51507           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   51508           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   51509             :         }
   51510             : 
   51511           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   51512           0 :                 allow_remaining = true;
   51513             :         }
   51514             : 
   51515           0 :         return py_srvsvc_NetPathType_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   51516             : }
   51517             : 
   51518           0 : static PyObject *py_srvsvc_NetPathType_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   51519             : {
   51520             :         DATA_BLOB blob;
   51521           0 :         Py_ssize_t blob_length = 0;
   51522           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   51523           0 :         PyObject *bigendian_obj = NULL;
   51524           0 :         PyObject *ndr64_obj = NULL;
   51525           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   51526           0 :         PyObject *allow_remaining_obj = NULL;
   51527           0 :         bool allow_remaining = false;
   51528             : 
   51529           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   51530             :                 discard_const_p(char *, kwnames),
   51531             :                 &blob.data, &blob_length,
   51532             :                 &bigendian_obj,
   51533             :                 &ndr64_obj,
   51534             :                 &allow_remaining_obj)) {
   51535           0 :                 return NULL;
   51536             :         }
   51537           0 :         blob.length = blob_length;
   51538             : 
   51539           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   51540           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   51541             :         }
   51542           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   51543           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   51544             :         }
   51545             : 
   51546           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   51547           0 :                 allow_remaining = true;
   51548             :         }
   51549             : 
   51550           0 :         return py_srvsvc_NetPathType_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   51551             : }
   51552             : 
   51553           0 : static PyObject *py_srvsvc_NetPathType_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   51554             : {
   51555           0 :         const struct ndr_interface_call *call = NULL;
   51556           0 :         struct srvsvc_NetPathType *object = (struct srvsvc_NetPathType *)pytalloc_get_ptr(py_obj);
   51557             :         PyObject *ret;
   51558             :         char *retstr;
   51559             : 
   51560           0 :         if (ndr_table_srvsvc.num_calls < 31) {
   51561           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetPathType_ndr_print");
   51562           0 :                 return NULL;
   51563             :         }
   51564           0 :         call = &ndr_table_srvsvc.calls[30];
   51565             : 
   51566           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   51567           0 :         ret = PyUnicode_FromString(retstr);
   51568           0 :         TALLOC_FREE(retstr);
   51569             : 
   51570           0 :         return ret;
   51571             : }
   51572             : 
   51573           0 : static PyObject *py_srvsvc_NetPathType_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   51574             : {
   51575           0 :         return py_srvsvc_NetPathType_ndr_print(py_obj, "srvsvc_NetPathType_in", NDR_IN);
   51576             : }
   51577             : 
   51578           0 : static PyObject *py_srvsvc_NetPathType_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   51579             : {
   51580           0 :         return py_srvsvc_NetPathType_ndr_print(py_obj, "srvsvc_NetPathType_out", NDR_OUT);
   51581             : }
   51582             : 
   51583             : static PyMethodDef py_srvsvc_NetPathType_methods[] = {
   51584             :         { "opnum", (PyCFunction)py_srvsvc_NetPathType_ndr_opnum, METH_NOARGS|METH_CLASS,
   51585             :                 "srvsvc.NetPathType.opnum() -> 30 (0x1e) " },
   51586             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPathType_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   51587             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   51588             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPathType_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   51589             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   51590             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPathType_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   51591             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   51592             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPathType_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   51593             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   51594             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetPathType_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   51595             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetPathType_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   51596             :         { NULL, NULL, 0, NULL }
   51597             : };
   51598             : 
   51599             : 
   51600             : static PyTypeObject srvsvc_NetPathType_Type = {
   51601             :         PyVarObject_HEAD_INIT(NULL, 0)
   51602             :         .tp_name = "srvsvc.NetPathType",
   51603             :         .tp_getset = py_srvsvc_NetPathType_getsetters,
   51604             :         .tp_methods = py_srvsvc_NetPathType_methods,
   51605             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   51606             :         .tp_new = py_srvsvc_NetPathType_new,
   51607             : };
   51608             : 
   51609           0 : static bool pack_py_srvsvc_NetPathType_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetPathType *r)
   51610             : {
   51611             :         PyObject *py_server_unc;
   51612             :         PyObject *py_path;
   51613             :         PyObject *py_pathflags;
   51614           0 :         const char *kwnames[] = {
   51615             :                 "server_unc", "path", "pathflags", NULL
   51616             :         };
   51617             : 
   51618           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetPathType", discard_const_p(char *, kwnames), &py_server_unc, &py_path, &py_pathflags)) {
   51619           0 :                 return false;
   51620             :         }
   51621             : 
   51622           0 :         if (py_server_unc == NULL) {
   51623           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   51624           0 :                 return false;
   51625             :         }
   51626           0 :         if (py_server_unc == Py_None) {
   51627           0 :                 r->in.server_unc = NULL;
   51628             :         } else {
   51629           0 :                 r->in.server_unc = NULL;
   51630             :                 {
   51631             :                         const char *test_str;
   51632             :                         const char *talloc_str;
   51633           0 :                         PyObject *unicode = NULL;
   51634           0 :                         if (PyUnicode_Check(py_server_unc)) {
   51635           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   51636           0 :                                 if (unicode == NULL) {
   51637           0 :                                         PyErr_NoMemory();
   51638           0 :                                         return false;
   51639             :                                 }
   51640           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   51641           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   51642           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   51643             :                         } else {
   51644           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   51645           0 :                                 return false;
   51646             :                         }
   51647           0 :                         talloc_str = talloc_strdup(r, test_str);
   51648           0 :                         if (unicode != NULL) {
   51649           0 :                                 Py_DECREF(unicode);
   51650             :                         }
   51651           0 :                         if (talloc_str == NULL) {
   51652           0 :                                 PyErr_NoMemory();
   51653           0 :                                 return false;
   51654             :                         }
   51655           0 :                         r->in.server_unc = talloc_str;
   51656             :                 }
   51657             :         }
   51658           0 :         if (py_path == NULL) {
   51659           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.path");
   51660           0 :                 return false;
   51661             :         }
   51662             :         {
   51663             :                 const char *test_str;
   51664             :                 const char *talloc_str;
   51665           0 :                 PyObject *unicode = NULL;
   51666           0 :                 if (PyUnicode_Check(py_path)) {
   51667           0 :                         unicode = PyUnicode_AsEncodedString(py_path, "utf-8", "ignore");
   51668           0 :                         if (unicode == NULL) {
   51669           0 :                                 PyErr_NoMemory();
   51670           0 :                                 return false;
   51671             :                         }
   51672           0 :                         test_str = PyBytes_AS_STRING(unicode);
   51673           0 :                 } else if (PyBytes_Check(py_path)) {
   51674           0 :                         test_str = PyBytes_AS_STRING(py_path);
   51675             :                 } else {
   51676           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_path)->tp_name);
   51677           0 :                         return false;
   51678             :                 }
   51679           0 :                 talloc_str = talloc_strdup(r, test_str);
   51680           0 :                 if (unicode != NULL) {
   51681           0 :                         Py_DECREF(unicode);
   51682             :                 }
   51683           0 :                 if (talloc_str == NULL) {
   51684           0 :                         PyErr_NoMemory();
   51685           0 :                         return false;
   51686             :                 }
   51687           0 :                 r->in.path = talloc_str;
   51688             :         }
   51689           0 :         if (py_pathflags == NULL) {
   51690           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pathflags");
   51691           0 :                 return false;
   51692             :         }
   51693             :         {
   51694           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.pathflags));
   51695           0 :                 if (PyLong_Check(py_pathflags)) {
   51696             :                         unsigned long long test_var;
   51697           0 :                         test_var = PyLong_AsUnsignedLongLong(py_pathflags);
   51698           0 :                         if (PyErr_Occurred() != NULL) {
   51699           0 :                                 return false;
   51700             :                         }
   51701           0 :                         if (test_var > uint_max) {
   51702           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   51703             :                                   PyLong_Type.tp_name, uint_max, test_var);
   51704           0 :                                 return false;
   51705             :                         }
   51706           0 :                         r->in.pathflags = test_var;
   51707             :                 } else {
   51708           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   51709             :                           PyLong_Type.tp_name);
   51710           0 :                         return false;
   51711             :                 }
   51712             :         }
   51713           0 :         return true;
   51714             : }
   51715             : 
   51716           0 : static PyObject *unpack_py_srvsvc_NetPathType_args_out(struct srvsvc_NetPathType *r)
   51717             : {
   51718             :         PyObject *result;
   51719             :         PyObject *py_pathtype;
   51720           0 :         py_pathtype = PyLong_FromUnsignedLongLong((uint32_t)*r->out.pathtype);
   51721           0 :         result = py_pathtype;
   51722           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   51723           0 :                 PyErr_SetWERROR(r->out.result);
   51724           0 :                 return NULL;
   51725             :         }
   51726             : 
   51727           0 :         return result;
   51728             : }
   51729             : 
   51730             : 
   51731           0 : static PyObject *py_srvsvc_NetPathCanonicalize_in_get_server_unc(PyObject *obj, void *closure)
   51732             : {
   51733           0 :         struct srvsvc_NetPathCanonicalize *object = (struct srvsvc_NetPathCanonicalize *)pytalloc_get_ptr(obj);
   51734             :         PyObject *py_server_unc;
   51735           0 :         if (object->in.server_unc == NULL) {
   51736           0 :                 Py_RETURN_NONE;
   51737             :         }
   51738           0 :         if (object->in.server_unc == NULL) {
   51739           0 :                 py_server_unc = Py_None;
   51740           0 :                 Py_INCREF(py_server_unc);
   51741             :         } else {
   51742           0 :                 if (object->in.server_unc == NULL) {
   51743           0 :                         py_server_unc = Py_None;
   51744           0 :                         Py_INCREF(py_server_unc);
   51745             :                 } else {
   51746           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   51747             :                 }
   51748             :         }
   51749           0 :         return py_server_unc;
   51750             : }
   51751             : 
   51752           0 : static int py_srvsvc_NetPathCanonicalize_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   51753             : {
   51754           0 :         struct srvsvc_NetPathCanonicalize *object = (struct srvsvc_NetPathCanonicalize *)pytalloc_get_ptr(py_obj);
   51755           0 :         if (value == NULL) {
   51756           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   51757           0 :                 return -1;
   51758             :         }
   51759           0 :         if (value == Py_None) {
   51760           0 :                 object->in.server_unc = NULL;
   51761             :         } else {
   51762           0 :                 object->in.server_unc = NULL;
   51763             :                 {
   51764             :                         const char *test_str;
   51765             :                         const char *talloc_str;
   51766           0 :                         PyObject *unicode = NULL;
   51767           0 :                         if (PyUnicode_Check(value)) {
   51768           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   51769           0 :                                 if (unicode == NULL) {
   51770           0 :                                         PyErr_NoMemory();
   51771           0 :                                         return -1;
   51772             :                                 }
   51773           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   51774           0 :                         } else if (PyBytes_Check(value)) {
   51775           0 :                                 test_str = PyBytes_AS_STRING(value);
   51776             :                         } else {
   51777           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   51778           0 :                                 return -1;
   51779             :                         }
   51780           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   51781           0 :                         if (unicode != NULL) {
   51782           0 :                                 Py_DECREF(unicode);
   51783             :                         }
   51784           0 :                         if (talloc_str == NULL) {
   51785           0 :                                 PyErr_NoMemory();
   51786           0 :                                 return -1;
   51787             :                         }
   51788           0 :                         object->in.server_unc = talloc_str;
   51789             :                 }
   51790             :         }
   51791           0 :         return 0;
   51792             : }
   51793             : 
   51794           0 : static PyObject *py_srvsvc_NetPathCanonicalize_in_get_path(PyObject *obj, void *closure)
   51795             : {
   51796           0 :         struct srvsvc_NetPathCanonicalize *object = (struct srvsvc_NetPathCanonicalize *)pytalloc_get_ptr(obj);
   51797             :         PyObject *py_path;
   51798           0 :         if (object->in.path == NULL) {
   51799           0 :                 py_path = Py_None;
   51800           0 :                 Py_INCREF(py_path);
   51801             :         } else {
   51802           0 :                 py_path = PyUnicode_Decode(object->in.path, strlen(object->in.path), "utf-8", "ignore");
   51803             :         }
   51804           0 :         return py_path;
   51805             : }
   51806             : 
   51807           0 : static int py_srvsvc_NetPathCanonicalize_in_set_path(PyObject *py_obj, PyObject *value, void *closure)
   51808             : {
   51809           0 :         struct srvsvc_NetPathCanonicalize *object = (struct srvsvc_NetPathCanonicalize *)pytalloc_get_ptr(py_obj);
   51810           0 :         if (value == NULL) {
   51811           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.path");
   51812           0 :                 return -1;
   51813             :         }
   51814             :         {
   51815             :                 const char *test_str;
   51816             :                 const char *talloc_str;
   51817           0 :                 PyObject *unicode = NULL;
   51818           0 :                 if (PyUnicode_Check(value)) {
   51819           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   51820           0 :                         if (unicode == NULL) {
   51821           0 :                                 PyErr_NoMemory();
   51822           0 :                                 return -1;
   51823             :                         }
   51824           0 :                         test_str = PyBytes_AS_STRING(unicode);
   51825           0 :                 } else if (PyBytes_Check(value)) {
   51826           0 :                         test_str = PyBytes_AS_STRING(value);
   51827             :                 } else {
   51828           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   51829           0 :                         return -1;
   51830             :                 }
   51831           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   51832           0 :                 if (unicode != NULL) {
   51833           0 :                         Py_DECREF(unicode);
   51834             :                 }
   51835           0 :                 if (talloc_str == NULL) {
   51836           0 :                         PyErr_NoMemory();
   51837           0 :                         return -1;
   51838             :                 }
   51839           0 :                 object->in.path = talloc_str;
   51840             :         }
   51841           0 :         return 0;
   51842             : }
   51843             : 
   51844           0 : static PyObject *py_srvsvc_NetPathCanonicalize_out_get_can_path(PyObject *obj, void *closure)
   51845             : {
   51846           0 :         struct srvsvc_NetPathCanonicalize *object = (struct srvsvc_NetPathCanonicalize *)pytalloc_get_ptr(obj);
   51847             :         PyObject *py_can_path;
   51848           0 :         py_can_path = PyList_New(object->in.maxbuf);
   51849           0 :         if (py_can_path == NULL) {
   51850           0 :                 return NULL;
   51851             :         }
   51852             :         {
   51853             :                 int can_path_cntr_0;
   51854           0 :                 for (can_path_cntr_0 = 0; can_path_cntr_0 < (object->in.maxbuf); can_path_cntr_0++) {
   51855             :                         PyObject *py_can_path_0;
   51856           0 :                         py_can_path_0 = PyLong_FromLong((uint16_t)object->out.can_path[can_path_cntr_0]);
   51857           0 :                         PyList_SetItem(py_can_path, can_path_cntr_0, py_can_path_0);
   51858             :                 }
   51859             :         }
   51860           0 :         return py_can_path;
   51861             : }
   51862             : 
   51863           0 : static int py_srvsvc_NetPathCanonicalize_out_set_can_path(PyObject *py_obj, PyObject *value, void *closure)
   51864             : {
   51865           0 :         struct srvsvc_NetPathCanonicalize *object = (struct srvsvc_NetPathCanonicalize *)pytalloc_get_ptr(py_obj);
   51866           0 :         if (value == NULL) {
   51867           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.can_path");
   51868           0 :                 return -1;
   51869             :         }
   51870           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   51871             :         {
   51872             :                 int can_path_cntr_0;
   51873           0 :                 object->out.can_path = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.can_path, PyList_GET_SIZE(value));
   51874           0 :                 if (!object->out.can_path) { return -1;; }
   51875           0 :                 talloc_set_name_const(object->out.can_path, "ARRAY: object->out.can_path");
   51876           0 :                 for (can_path_cntr_0 = 0; can_path_cntr_0 < PyList_GET_SIZE(value); can_path_cntr_0++) {
   51877           0 :                         if (PyList_GET_ITEM(value, can_path_cntr_0) == NULL) {
   51878           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.can_path[can_path_cntr_0]");
   51879           0 :                                 return -1;
   51880             :                         }
   51881             :                         {
   51882           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->out.can_path[can_path_cntr_0]));
   51883           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, can_path_cntr_0))) {
   51884             :                                         unsigned long long test_var;
   51885           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, can_path_cntr_0));
   51886           0 :                                         if (PyErr_Occurred() != NULL) {
   51887           0 :                                                 return -1;
   51888             :                                         }
   51889           0 :                                         if (test_var > uint_max) {
   51890           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   51891             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   51892           0 :                                                 return -1;
   51893             :                                         }
   51894           0 :                                         object->out.can_path[can_path_cntr_0] = test_var;
   51895             :                                 } else {
   51896           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   51897             :                                           PyLong_Type.tp_name);
   51898           0 :                                         return -1;
   51899             :                                 }
   51900             :                         }
   51901             :                 }
   51902             :         }
   51903           0 :         return 0;
   51904             : }
   51905             : 
   51906           0 : static PyObject *py_srvsvc_NetPathCanonicalize_in_get_maxbuf(PyObject *obj, void *closure)
   51907             : {
   51908           0 :         struct srvsvc_NetPathCanonicalize *object = (struct srvsvc_NetPathCanonicalize *)pytalloc_get_ptr(obj);
   51909             :         PyObject *py_maxbuf;
   51910           0 :         py_maxbuf = PyLong_FromUnsignedLongLong((uint32_t)object->in.maxbuf);
   51911           0 :         return py_maxbuf;
   51912             : }
   51913             : 
   51914           0 : static int py_srvsvc_NetPathCanonicalize_in_set_maxbuf(PyObject *py_obj, PyObject *value, void *closure)
   51915             : {
   51916           0 :         struct srvsvc_NetPathCanonicalize *object = (struct srvsvc_NetPathCanonicalize *)pytalloc_get_ptr(py_obj);
   51917           0 :         if (value == NULL) {
   51918           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.maxbuf");
   51919           0 :                 return -1;
   51920             :         }
   51921             :         {
   51922           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.maxbuf));
   51923           0 :                 if (PyLong_Check(value)) {
   51924             :                         unsigned long long test_var;
   51925           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   51926           0 :                         if (PyErr_Occurred() != NULL) {
   51927           0 :                                 return -1;
   51928             :                         }
   51929           0 :                         if (test_var > uint_max) {
   51930           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   51931             :                                   PyLong_Type.tp_name, uint_max, test_var);
   51932           0 :                                 return -1;
   51933             :                         }
   51934           0 :                         object->in.maxbuf = test_var;
   51935             :                 } else {
   51936           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   51937             :                           PyLong_Type.tp_name);
   51938           0 :                         return -1;
   51939             :                 }
   51940             :         }
   51941           0 :         return 0;
   51942             : }
   51943             : 
   51944           0 : static PyObject *py_srvsvc_NetPathCanonicalize_in_get_prefix(PyObject *obj, void *closure)
   51945             : {
   51946           0 :         struct srvsvc_NetPathCanonicalize *object = (struct srvsvc_NetPathCanonicalize *)pytalloc_get_ptr(obj);
   51947             :         PyObject *py_prefix;
   51948           0 :         if (object->in.prefix == NULL) {
   51949           0 :                 py_prefix = Py_None;
   51950           0 :                 Py_INCREF(py_prefix);
   51951             :         } else {
   51952           0 :                 py_prefix = PyUnicode_Decode(object->in.prefix, strlen(object->in.prefix), "utf-8", "ignore");
   51953             :         }
   51954           0 :         return py_prefix;
   51955             : }
   51956             : 
   51957           0 : static int py_srvsvc_NetPathCanonicalize_in_set_prefix(PyObject *py_obj, PyObject *value, void *closure)
   51958             : {
   51959           0 :         struct srvsvc_NetPathCanonicalize *object = (struct srvsvc_NetPathCanonicalize *)pytalloc_get_ptr(py_obj);
   51960           0 :         if (value == NULL) {
   51961           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.prefix");
   51962           0 :                 return -1;
   51963             :         }
   51964             :         {
   51965             :                 const char *test_str;
   51966             :                 const char *talloc_str;
   51967           0 :                 PyObject *unicode = NULL;
   51968           0 :                 if (PyUnicode_Check(value)) {
   51969           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   51970           0 :                         if (unicode == NULL) {
   51971           0 :                                 PyErr_NoMemory();
   51972           0 :                                 return -1;
   51973             :                         }
   51974           0 :                         test_str = PyBytes_AS_STRING(unicode);
   51975           0 :                 } else if (PyBytes_Check(value)) {
   51976           0 :                         test_str = PyBytes_AS_STRING(value);
   51977             :                 } else {
   51978           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   51979           0 :                         return -1;
   51980             :                 }
   51981           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   51982           0 :                 if (unicode != NULL) {
   51983           0 :                         Py_DECREF(unicode);
   51984             :                 }
   51985           0 :                 if (talloc_str == NULL) {
   51986           0 :                         PyErr_NoMemory();
   51987           0 :                         return -1;
   51988             :                 }
   51989           0 :                 object->in.prefix = talloc_str;
   51990             :         }
   51991           0 :         return 0;
   51992             : }
   51993             : 
   51994           0 : static PyObject *py_srvsvc_NetPathCanonicalize_in_get_pathtype(PyObject *obj, void *closure)
   51995             : {
   51996           0 :         struct srvsvc_NetPathCanonicalize *object = (struct srvsvc_NetPathCanonicalize *)pytalloc_get_ptr(obj);
   51997             :         PyObject *py_pathtype;
   51998           0 :         if (object->in.pathtype == NULL) {
   51999           0 :                 Py_RETURN_NONE;
   52000             :         }
   52001           0 :         py_pathtype = PyLong_FromUnsignedLongLong((uint32_t)*object->in.pathtype);
   52002           0 :         return py_pathtype;
   52003             : }
   52004             : 
   52005           0 : static int py_srvsvc_NetPathCanonicalize_in_set_pathtype(PyObject *py_obj, PyObject *value, void *closure)
   52006             : {
   52007           0 :         struct srvsvc_NetPathCanonicalize *object = (struct srvsvc_NetPathCanonicalize *)pytalloc_get_ptr(py_obj);
   52008           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.pathtype));
   52009           0 :         if (value == NULL) {
   52010           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pathtype");
   52011           0 :                 return -1;
   52012             :         }
   52013           0 :         object->in.pathtype = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.pathtype);
   52014           0 :         if (object->in.pathtype == NULL) {
   52015           0 :                 PyErr_NoMemory();
   52016           0 :                 return -1;
   52017             :         }
   52018             :         {
   52019           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.pathtype));
   52020           0 :                 if (PyLong_Check(value)) {
   52021             :                         unsigned long long test_var;
   52022           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   52023           0 :                         if (PyErr_Occurred() != NULL) {
   52024           0 :                                 return -1;
   52025             :                         }
   52026           0 :                         if (test_var > uint_max) {
   52027           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   52028             :                                   PyLong_Type.tp_name, uint_max, test_var);
   52029           0 :                                 return -1;
   52030             :                         }
   52031           0 :                         *object->in.pathtype = test_var;
   52032             :                 } else {
   52033           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   52034             :                           PyLong_Type.tp_name);
   52035           0 :                         return -1;
   52036             :                 }
   52037             :         }
   52038           0 :         return 0;
   52039             : }
   52040             : 
   52041           0 : static PyObject *py_srvsvc_NetPathCanonicalize_out_get_pathtype(PyObject *obj, void *closure)
   52042             : {
   52043           0 :         struct srvsvc_NetPathCanonicalize *object = (struct srvsvc_NetPathCanonicalize *)pytalloc_get_ptr(obj);
   52044             :         PyObject *py_pathtype;
   52045           0 :         if (object->out.pathtype == NULL) {
   52046           0 :                 Py_RETURN_NONE;
   52047             :         }
   52048           0 :         py_pathtype = PyLong_FromUnsignedLongLong((uint32_t)*object->out.pathtype);
   52049           0 :         return py_pathtype;
   52050             : }
   52051             : 
   52052           0 : static int py_srvsvc_NetPathCanonicalize_out_set_pathtype(PyObject *py_obj, PyObject *value, void *closure)
   52053             : {
   52054           0 :         struct srvsvc_NetPathCanonicalize *object = (struct srvsvc_NetPathCanonicalize *)pytalloc_get_ptr(py_obj);
   52055           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.pathtype));
   52056           0 :         if (value == NULL) {
   52057           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.pathtype");
   52058           0 :                 return -1;
   52059             :         }
   52060           0 :         object->out.pathtype = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.pathtype);
   52061           0 :         if (object->out.pathtype == NULL) {
   52062           0 :                 PyErr_NoMemory();
   52063           0 :                 return -1;
   52064             :         }
   52065             :         {
   52066           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.pathtype));
   52067           0 :                 if (PyLong_Check(value)) {
   52068             :                         unsigned long long test_var;
   52069           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   52070           0 :                         if (PyErr_Occurred() != NULL) {
   52071           0 :                                 return -1;
   52072             :                         }
   52073           0 :                         if (test_var > uint_max) {
   52074           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   52075             :                                   PyLong_Type.tp_name, uint_max, test_var);
   52076           0 :                                 return -1;
   52077             :                         }
   52078           0 :                         *object->out.pathtype = test_var;
   52079             :                 } else {
   52080           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   52081             :                           PyLong_Type.tp_name);
   52082           0 :                         return -1;
   52083             :                 }
   52084             :         }
   52085           0 :         return 0;
   52086             : }
   52087             : 
   52088           0 : static PyObject *py_srvsvc_NetPathCanonicalize_in_get_pathflags(PyObject *obj, void *closure)
   52089             : {
   52090           0 :         struct srvsvc_NetPathCanonicalize *object = (struct srvsvc_NetPathCanonicalize *)pytalloc_get_ptr(obj);
   52091             :         PyObject *py_pathflags;
   52092           0 :         py_pathflags = PyLong_FromUnsignedLongLong((uint32_t)object->in.pathflags);
   52093           0 :         return py_pathflags;
   52094             : }
   52095             : 
   52096           0 : static int py_srvsvc_NetPathCanonicalize_in_set_pathflags(PyObject *py_obj, PyObject *value, void *closure)
   52097             : {
   52098           0 :         struct srvsvc_NetPathCanonicalize *object = (struct srvsvc_NetPathCanonicalize *)pytalloc_get_ptr(py_obj);
   52099           0 :         if (value == NULL) {
   52100           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pathflags");
   52101           0 :                 return -1;
   52102             :         }
   52103             :         {
   52104           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.pathflags));
   52105           0 :                 if (PyLong_Check(value)) {
   52106             :                         unsigned long long test_var;
   52107           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   52108           0 :                         if (PyErr_Occurred() != NULL) {
   52109           0 :                                 return -1;
   52110             :                         }
   52111           0 :                         if (test_var > uint_max) {
   52112           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   52113             :                                   PyLong_Type.tp_name, uint_max, test_var);
   52114           0 :                                 return -1;
   52115             :                         }
   52116           0 :                         object->in.pathflags = test_var;
   52117             :                 } else {
   52118           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   52119             :                           PyLong_Type.tp_name);
   52120           0 :                         return -1;
   52121             :                 }
   52122             :         }
   52123           0 :         return 0;
   52124             : }
   52125             : 
   52126           0 : static PyObject *py_srvsvc_NetPathCanonicalize_get_result(PyObject *obj, void *closure)
   52127             : {
   52128           0 :         struct srvsvc_NetPathCanonicalize *object = (struct srvsvc_NetPathCanonicalize *)pytalloc_get_ptr(obj);
   52129             :         PyObject *py_result;
   52130           0 :         py_result = PyErr_FromWERROR(object->out.result);
   52131           0 :         return py_result;
   52132             : }
   52133             : 
   52134           0 : static int py_srvsvc_NetPathCanonicalize_set_result(PyObject *py_obj, PyObject *value, void *closure)
   52135             : {
   52136           0 :         struct srvsvc_NetPathCanonicalize *object = (struct srvsvc_NetPathCanonicalize *)pytalloc_get_ptr(py_obj);
   52137           0 :         if (value == NULL) {
   52138           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   52139           0 :                 return -1;
   52140             :         }
   52141           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   52142           0 :         return 0;
   52143             : }
   52144             : 
   52145             : static PyGetSetDef py_srvsvc_NetPathCanonicalize_getsetters[] = {
   52146             :         {
   52147             :                 .name = discard_const_p(char, "in_server_unc"),
   52148             :                 .get = py_srvsvc_NetPathCanonicalize_in_get_server_unc,
   52149             :                 .set = py_srvsvc_NetPathCanonicalize_in_set_server_unc,
   52150             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   52151             :         },
   52152             :         {
   52153             :                 .name = discard_const_p(char, "in_path"),
   52154             :                 .get = py_srvsvc_NetPathCanonicalize_in_get_path,
   52155             :                 .set = py_srvsvc_NetPathCanonicalize_in_set_path,
   52156             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   52157             :         },
   52158             :         {
   52159             :                 .name = discard_const_p(char, "out_can_path"),
   52160             :                 .get = py_srvsvc_NetPathCanonicalize_out_get_can_path,
   52161             :                 .set = py_srvsvc_NetPathCanonicalize_out_set_can_path,
   52162             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   52163             :         },
   52164             :         {
   52165             :                 .name = discard_const_p(char, "in_maxbuf"),
   52166             :                 .get = py_srvsvc_NetPathCanonicalize_in_get_maxbuf,
   52167             :                 .set = py_srvsvc_NetPathCanonicalize_in_set_maxbuf,
   52168             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   52169             :         },
   52170             :         {
   52171             :                 .name = discard_const_p(char, "in_prefix"),
   52172             :                 .get = py_srvsvc_NetPathCanonicalize_in_get_prefix,
   52173             :                 .set = py_srvsvc_NetPathCanonicalize_in_set_prefix,
   52174             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   52175             :         },
   52176             :         {
   52177             :                 .name = discard_const_p(char, "in_pathtype"),
   52178             :                 .get = py_srvsvc_NetPathCanonicalize_in_get_pathtype,
   52179             :                 .set = py_srvsvc_NetPathCanonicalize_in_set_pathtype,
   52180             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   52181             :         },
   52182             :         {
   52183             :                 .name = discard_const_p(char, "out_pathtype"),
   52184             :                 .get = py_srvsvc_NetPathCanonicalize_out_get_pathtype,
   52185             :                 .set = py_srvsvc_NetPathCanonicalize_out_set_pathtype,
   52186             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   52187             :         },
   52188             :         {
   52189             :                 .name = discard_const_p(char, "in_pathflags"),
   52190             :                 .get = py_srvsvc_NetPathCanonicalize_in_get_pathflags,
   52191             :                 .set = py_srvsvc_NetPathCanonicalize_in_set_pathflags,
   52192             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   52193             :         },
   52194             :         {
   52195             :                 .name = discard_const_p(char, "result"),
   52196             :                 .get = py_srvsvc_NetPathCanonicalize_get_result,
   52197             :                 .set = py_srvsvc_NetPathCanonicalize_set_result,
   52198             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   52199             :         },
   52200             :         { .name = NULL }
   52201             : };
   52202             : 
   52203           0 : static PyObject *py_srvsvc_NetPathCanonicalize_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   52204             : {
   52205           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetPathCanonicalize, type);
   52206           0 :         struct srvsvc_NetPathCanonicalize *_self = (struct srvsvc_NetPathCanonicalize *)pytalloc_get_ptr(self);
   52207           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   52208           0 :         _self->in.pathtype = talloc_zero(mem_ctx, uint32_t);
   52209           0 :         _self->out.pathtype = talloc_zero(mem_ctx, uint32_t);
   52210           0 :         return self;
   52211             : }
   52212             : 
   52213           0 : static PyObject *py_srvsvc_NetPathCanonicalize_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   52214             : {
   52215             : 
   52216             : 
   52217           0 :         return PyLong_FromLong(31);
   52218             : }
   52219             : 
   52220           0 : static PyObject *py_srvsvc_NetPathCanonicalize_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   52221             : {
   52222           0 :         const struct ndr_interface_call *call = NULL;
   52223           0 :         struct srvsvc_NetPathCanonicalize *object = (struct srvsvc_NetPathCanonicalize *)pytalloc_get_ptr(py_obj);
   52224           0 :         PyObject *ret = NULL;
   52225           0 :         struct ndr_push *push = NULL;
   52226             :         DATA_BLOB blob;
   52227             :         enum ndr_err_code err;
   52228             : 
   52229           0 :         if (ndr_table_srvsvc.num_calls < 32) {
   52230           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetPathCanonicalize_ndr_pack");
   52231           0 :                 return NULL;
   52232             :         }
   52233           0 :         call = &ndr_table_srvsvc.calls[31];
   52234             : 
   52235           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   52236           0 :         if (push == NULL) {
   52237           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   52238           0 :                 return NULL;
   52239             :         }
   52240             : 
   52241           0 :         push->flags |= ndr_push_flags;
   52242             : 
   52243           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   52244           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   52245           0 :                 TALLOC_FREE(push);
   52246           0 :                 PyErr_SetNdrError(err);
   52247           0 :                 return NULL;
   52248             :         }
   52249           0 :         blob = ndr_push_blob(push);
   52250           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   52251           0 :         TALLOC_FREE(push);
   52252           0 :         return ret;
   52253             : }
   52254             : 
   52255           0 : static PyObject *py_srvsvc_NetPathCanonicalize_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52256             : {
   52257           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   52258           0 :         PyObject *bigendian_obj = NULL;
   52259           0 :         PyObject *ndr64_obj = NULL;
   52260           0 :         uint32_t ndr_push_flags = 0;
   52261             : 
   52262           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   52263             :                 discard_const_p(char *, kwnames),
   52264             :                 &bigendian_obj,
   52265             :                 &ndr64_obj)) {
   52266           0 :                 return NULL;
   52267             :         }
   52268             : 
   52269           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52270           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   52271             :         }
   52272           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52273           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   52274             :         }
   52275             : 
   52276           0 :         return py_srvsvc_NetPathCanonicalize_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   52277             : }
   52278             : 
   52279           0 : static PyObject *py_srvsvc_NetPathCanonicalize_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52280             : {
   52281           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   52282           0 :         PyObject *bigendian_obj = NULL;
   52283           0 :         PyObject *ndr64_obj = NULL;
   52284           0 :         uint32_t ndr_push_flags = 0;
   52285             : 
   52286           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   52287             :                 discard_const_p(char *, kwnames),
   52288             :                 &bigendian_obj,
   52289             :                 &ndr64_obj)) {
   52290           0 :                 return NULL;
   52291             :         }
   52292             : 
   52293           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52294           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   52295             :         }
   52296           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52297           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   52298             :         }
   52299             : 
   52300           0 :         return py_srvsvc_NetPathCanonicalize_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   52301             : }
   52302             : 
   52303           0 : static PyObject *py_srvsvc_NetPathCanonicalize_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   52304             : {
   52305           0 :         const struct ndr_interface_call *call = NULL;
   52306           0 :         struct srvsvc_NetPathCanonicalize *object = (struct srvsvc_NetPathCanonicalize *)pytalloc_get_ptr(py_obj);
   52307           0 :         struct ndr_pull *pull = NULL;
   52308             :         enum ndr_err_code err;
   52309             : 
   52310           0 :         if (ndr_table_srvsvc.num_calls < 32) {
   52311           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetPathCanonicalize_ndr_unpack");
   52312           0 :                 return NULL;
   52313             :         }
   52314           0 :         call = &ndr_table_srvsvc.calls[31];
   52315             : 
   52316           0 :         pull = ndr_pull_init_blob(blob, object);
   52317           0 :         if (pull == NULL) {
   52318           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   52319           0 :                 return NULL;
   52320             :         }
   52321             : 
   52322           0 :         pull->flags |= ndr_pull_flags;
   52323             : 
   52324           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   52325           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   52326           0 :                 TALLOC_FREE(pull);
   52327           0 :                 PyErr_SetNdrError(err);
   52328           0 :                 return NULL;
   52329             :         }
   52330           0 :         if (!allow_remaining) {
   52331             :                 uint32_t highest_ofs;
   52332             : 
   52333           0 :                 if (pull->offset > pull->relative_highest_offset) {
   52334           0 :                         highest_ofs = pull->offset;
   52335             :                 } else {
   52336           0 :                         highest_ofs = pull->relative_highest_offset;
   52337             :                 }
   52338           0 :                 if (highest_ofs < pull->data_size) {
   52339           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   52340             :                                 "not all bytes consumed ofs[%u] size[%u]",
   52341             :                                 highest_ofs, pull->data_size);
   52342           0 :                         TALLOC_FREE(pull);
   52343           0 :                         PyErr_SetNdrError(err);
   52344           0 :                         return NULL;
   52345             :                 }
   52346             :         }
   52347             : 
   52348           0 :         TALLOC_FREE(pull);
   52349           0 :         Py_RETURN_NONE;
   52350             : }
   52351             : 
   52352           0 : static PyObject *py_srvsvc_NetPathCanonicalize_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52353             : {
   52354             :         DATA_BLOB blob;
   52355           0 :         Py_ssize_t blob_length = 0;
   52356           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   52357           0 :         PyObject *bigendian_obj = NULL;
   52358           0 :         PyObject *ndr64_obj = NULL;
   52359           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   52360           0 :         PyObject *allow_remaining_obj = NULL;
   52361           0 :         bool allow_remaining = false;
   52362             : 
   52363           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   52364             :                 discard_const_p(char *, kwnames),
   52365             :                 &blob.data, &blob_length,
   52366             :                 &bigendian_obj,
   52367             :                 &ndr64_obj,
   52368             :                 &allow_remaining_obj)) {
   52369           0 :                 return NULL;
   52370             :         }
   52371           0 :         blob.length = blob_length;
   52372             : 
   52373           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52374           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   52375             :         }
   52376           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52377           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   52378             :         }
   52379             : 
   52380           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   52381           0 :                 allow_remaining = true;
   52382             :         }
   52383             : 
   52384           0 :         return py_srvsvc_NetPathCanonicalize_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   52385             : }
   52386             : 
   52387           0 : static PyObject *py_srvsvc_NetPathCanonicalize_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52388             : {
   52389             :         DATA_BLOB blob;
   52390           0 :         Py_ssize_t blob_length = 0;
   52391           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   52392           0 :         PyObject *bigendian_obj = NULL;
   52393           0 :         PyObject *ndr64_obj = NULL;
   52394           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   52395           0 :         PyObject *allow_remaining_obj = NULL;
   52396           0 :         bool allow_remaining = false;
   52397             : 
   52398           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   52399             :                 discard_const_p(char *, kwnames),
   52400             :                 &blob.data, &blob_length,
   52401             :                 &bigendian_obj,
   52402             :                 &ndr64_obj,
   52403             :                 &allow_remaining_obj)) {
   52404           0 :                 return NULL;
   52405             :         }
   52406           0 :         blob.length = blob_length;
   52407             : 
   52408           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52409           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   52410             :         }
   52411           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52412           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   52413             :         }
   52414             : 
   52415           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   52416           0 :                 allow_remaining = true;
   52417             :         }
   52418             : 
   52419           0 :         return py_srvsvc_NetPathCanonicalize_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   52420             : }
   52421             : 
   52422           0 : static PyObject *py_srvsvc_NetPathCanonicalize_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   52423             : {
   52424           0 :         const struct ndr_interface_call *call = NULL;
   52425           0 :         struct srvsvc_NetPathCanonicalize *object = (struct srvsvc_NetPathCanonicalize *)pytalloc_get_ptr(py_obj);
   52426             :         PyObject *ret;
   52427             :         char *retstr;
   52428             : 
   52429           0 :         if (ndr_table_srvsvc.num_calls < 32) {
   52430           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetPathCanonicalize_ndr_print");
   52431           0 :                 return NULL;
   52432             :         }
   52433           0 :         call = &ndr_table_srvsvc.calls[31];
   52434             : 
   52435           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   52436           0 :         ret = PyUnicode_FromString(retstr);
   52437           0 :         TALLOC_FREE(retstr);
   52438             : 
   52439           0 :         return ret;
   52440             : }
   52441             : 
   52442           0 : static PyObject *py_srvsvc_NetPathCanonicalize_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   52443             : {
   52444           0 :         return py_srvsvc_NetPathCanonicalize_ndr_print(py_obj, "srvsvc_NetPathCanonicalize_in", NDR_IN);
   52445             : }
   52446             : 
   52447           0 : static PyObject *py_srvsvc_NetPathCanonicalize_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   52448             : {
   52449           0 :         return py_srvsvc_NetPathCanonicalize_ndr_print(py_obj, "srvsvc_NetPathCanonicalize_out", NDR_OUT);
   52450             : }
   52451             : 
   52452             : static PyMethodDef py_srvsvc_NetPathCanonicalize_methods[] = {
   52453             :         { "opnum", (PyCFunction)py_srvsvc_NetPathCanonicalize_ndr_opnum, METH_NOARGS|METH_CLASS,
   52454             :                 "srvsvc.NetPathCanonicalize.opnum() -> 31 (0x1f) " },
   52455             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPathCanonicalize_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   52456             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   52457             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPathCanonicalize_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   52458             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   52459             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPathCanonicalize_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   52460             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   52461             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPathCanonicalize_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   52462             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   52463             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetPathCanonicalize_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   52464             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetPathCanonicalize_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   52465             :         { NULL, NULL, 0, NULL }
   52466             : };
   52467             : 
   52468             : 
   52469             : static PyTypeObject srvsvc_NetPathCanonicalize_Type = {
   52470             :         PyVarObject_HEAD_INIT(NULL, 0)
   52471             :         .tp_name = "srvsvc.NetPathCanonicalize",
   52472             :         .tp_getset = py_srvsvc_NetPathCanonicalize_getsetters,
   52473             :         .tp_methods = py_srvsvc_NetPathCanonicalize_methods,
   52474             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   52475             :         .tp_new = py_srvsvc_NetPathCanonicalize_new,
   52476             : };
   52477             : 
   52478           0 : static bool pack_py_srvsvc_NetPathCanonicalize_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetPathCanonicalize *r)
   52479             : {
   52480             :         PyObject *py_server_unc;
   52481             :         PyObject *py_path;
   52482             :         PyObject *py_maxbuf;
   52483             :         PyObject *py_prefix;
   52484             :         PyObject *py_pathtype;
   52485             :         PyObject *py_pathflags;
   52486           0 :         const char *kwnames[] = {
   52487             :                 "server_unc", "path", "maxbuf", "prefix", "pathtype", "pathflags", NULL
   52488             :         };
   52489             : 
   52490           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:srvsvc_NetPathCanonicalize", discard_const_p(char *, kwnames), &py_server_unc, &py_path, &py_maxbuf, &py_prefix, &py_pathtype, &py_pathflags)) {
   52491           0 :                 return false;
   52492             :         }
   52493             : 
   52494           0 :         if (py_server_unc == NULL) {
   52495           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   52496           0 :                 return false;
   52497             :         }
   52498           0 :         if (py_server_unc == Py_None) {
   52499           0 :                 r->in.server_unc = NULL;
   52500             :         } else {
   52501           0 :                 r->in.server_unc = NULL;
   52502             :                 {
   52503             :                         const char *test_str;
   52504             :                         const char *talloc_str;
   52505           0 :                         PyObject *unicode = NULL;
   52506           0 :                         if (PyUnicode_Check(py_server_unc)) {
   52507           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   52508           0 :                                 if (unicode == NULL) {
   52509           0 :                                         PyErr_NoMemory();
   52510           0 :                                         return false;
   52511             :                                 }
   52512           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   52513           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   52514           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   52515             :                         } else {
   52516           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   52517           0 :                                 return false;
   52518             :                         }
   52519           0 :                         talloc_str = talloc_strdup(r, test_str);
   52520           0 :                         if (unicode != NULL) {
   52521           0 :                                 Py_DECREF(unicode);
   52522             :                         }
   52523           0 :                         if (talloc_str == NULL) {
   52524           0 :                                 PyErr_NoMemory();
   52525           0 :                                 return false;
   52526             :                         }
   52527           0 :                         r->in.server_unc = talloc_str;
   52528             :                 }
   52529             :         }
   52530           0 :         if (py_path == NULL) {
   52531           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.path");
   52532           0 :                 return false;
   52533             :         }
   52534             :         {
   52535             :                 const char *test_str;
   52536             :                 const char *talloc_str;
   52537           0 :                 PyObject *unicode = NULL;
   52538           0 :                 if (PyUnicode_Check(py_path)) {
   52539           0 :                         unicode = PyUnicode_AsEncodedString(py_path, "utf-8", "ignore");
   52540           0 :                         if (unicode == NULL) {
   52541           0 :                                 PyErr_NoMemory();
   52542           0 :                                 return false;
   52543             :                         }
   52544           0 :                         test_str = PyBytes_AS_STRING(unicode);
   52545           0 :                 } else if (PyBytes_Check(py_path)) {
   52546           0 :                         test_str = PyBytes_AS_STRING(py_path);
   52547             :                 } else {
   52548           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_path)->tp_name);
   52549           0 :                         return false;
   52550             :                 }
   52551           0 :                 talloc_str = talloc_strdup(r, test_str);
   52552           0 :                 if (unicode != NULL) {
   52553           0 :                         Py_DECREF(unicode);
   52554             :                 }
   52555           0 :                 if (talloc_str == NULL) {
   52556           0 :                         PyErr_NoMemory();
   52557           0 :                         return false;
   52558             :                 }
   52559           0 :                 r->in.path = talloc_str;
   52560             :         }
   52561           0 :         if (py_maxbuf == NULL) {
   52562           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.maxbuf");
   52563           0 :                 return false;
   52564             :         }
   52565             :         {
   52566           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.maxbuf));
   52567           0 :                 if (PyLong_Check(py_maxbuf)) {
   52568             :                         unsigned long long test_var;
   52569           0 :                         test_var = PyLong_AsUnsignedLongLong(py_maxbuf);
   52570           0 :                         if (PyErr_Occurred() != NULL) {
   52571           0 :                                 return false;
   52572             :                         }
   52573           0 :                         if (test_var > uint_max) {
   52574           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   52575             :                                   PyLong_Type.tp_name, uint_max, test_var);
   52576           0 :                                 return false;
   52577             :                         }
   52578           0 :                         r->in.maxbuf = test_var;
   52579             :                 } else {
   52580           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   52581             :                           PyLong_Type.tp_name);
   52582           0 :                         return false;
   52583             :                 }
   52584             :         }
   52585           0 :         if (py_prefix == NULL) {
   52586           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.prefix");
   52587           0 :                 return false;
   52588             :         }
   52589             :         {
   52590             :                 const char *test_str;
   52591             :                 const char *talloc_str;
   52592           0 :                 PyObject *unicode = NULL;
   52593           0 :                 if (PyUnicode_Check(py_prefix)) {
   52594           0 :                         unicode = PyUnicode_AsEncodedString(py_prefix, "utf-8", "ignore");
   52595           0 :                         if (unicode == NULL) {
   52596           0 :                                 PyErr_NoMemory();
   52597           0 :                                 return false;
   52598             :                         }
   52599           0 :                         test_str = PyBytes_AS_STRING(unicode);
   52600           0 :                 } else if (PyBytes_Check(py_prefix)) {
   52601           0 :                         test_str = PyBytes_AS_STRING(py_prefix);
   52602             :                 } else {
   52603           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_prefix)->tp_name);
   52604           0 :                         return false;
   52605             :                 }
   52606           0 :                 talloc_str = talloc_strdup(r, test_str);
   52607           0 :                 if (unicode != NULL) {
   52608           0 :                         Py_DECREF(unicode);
   52609             :                 }
   52610           0 :                 if (talloc_str == NULL) {
   52611           0 :                         PyErr_NoMemory();
   52612           0 :                         return false;
   52613             :                 }
   52614           0 :                 r->in.prefix = talloc_str;
   52615             :         }
   52616           0 :         if (py_pathtype == NULL) {
   52617           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pathtype");
   52618           0 :                 return false;
   52619             :         }
   52620           0 :         r->in.pathtype = talloc_ptrtype(r, r->in.pathtype);
   52621           0 :         if (r->in.pathtype == NULL) {
   52622           0 :                 PyErr_NoMemory();
   52623           0 :                 return false;
   52624             :         }
   52625             :         {
   52626           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.pathtype));
   52627           0 :                 if (PyLong_Check(py_pathtype)) {
   52628             :                         unsigned long long test_var;
   52629           0 :                         test_var = PyLong_AsUnsignedLongLong(py_pathtype);
   52630           0 :                         if (PyErr_Occurred() != NULL) {
   52631           0 :                                 return false;
   52632             :                         }
   52633           0 :                         if (test_var > uint_max) {
   52634           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   52635             :                                   PyLong_Type.tp_name, uint_max, test_var);
   52636           0 :                                 return false;
   52637             :                         }
   52638           0 :                         *r->in.pathtype = test_var;
   52639             :                 } else {
   52640           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   52641             :                           PyLong_Type.tp_name);
   52642           0 :                         return false;
   52643             :                 }
   52644             :         }
   52645           0 :         if (py_pathflags == NULL) {
   52646           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pathflags");
   52647           0 :                 return false;
   52648             :         }
   52649             :         {
   52650           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.pathflags));
   52651           0 :                 if (PyLong_Check(py_pathflags)) {
   52652             :                         unsigned long long test_var;
   52653           0 :                         test_var = PyLong_AsUnsignedLongLong(py_pathflags);
   52654           0 :                         if (PyErr_Occurred() != NULL) {
   52655           0 :                                 return false;
   52656             :                         }
   52657           0 :                         if (test_var > uint_max) {
   52658           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   52659             :                                   PyLong_Type.tp_name, uint_max, test_var);
   52660           0 :                                 return false;
   52661             :                         }
   52662           0 :                         r->in.pathflags = test_var;
   52663             :                 } else {
   52664           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   52665             :                           PyLong_Type.tp_name);
   52666           0 :                         return false;
   52667             :                 }
   52668             :         }
   52669           0 :         return true;
   52670             : }
   52671             : 
   52672           0 : static PyObject *unpack_py_srvsvc_NetPathCanonicalize_args_out(struct srvsvc_NetPathCanonicalize *r)
   52673             : {
   52674             :         PyObject *result;
   52675             :         PyObject *py_can_path;
   52676             :         PyObject *py_pathtype;
   52677           0 :         result = PyTuple_New(2);
   52678           0 :         py_can_path = PyList_New(r->in.maxbuf);
   52679           0 :         if (py_can_path == NULL) {
   52680           0 :                 return NULL;
   52681             :         }
   52682             :         {
   52683             :                 int can_path_cntr_0;
   52684           0 :                 for (can_path_cntr_0 = 0; can_path_cntr_0 < (r->in.maxbuf); can_path_cntr_0++) {
   52685             :                         PyObject *py_can_path_0;
   52686           0 :                         py_can_path_0 = PyLong_FromLong((uint16_t)r->out.can_path[can_path_cntr_0]);
   52687           0 :                         PyList_SetItem(py_can_path, can_path_cntr_0, py_can_path_0);
   52688             :                 }
   52689             :         }
   52690           0 :         PyTuple_SetItem(result, 0, py_can_path);
   52691           0 :         py_pathtype = PyLong_FromUnsignedLongLong((uint32_t)*r->out.pathtype);
   52692           0 :         PyTuple_SetItem(result, 1, py_pathtype);
   52693           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   52694           0 :                 PyErr_SetWERROR(r->out.result);
   52695           0 :                 return NULL;
   52696             :         }
   52697             : 
   52698           0 :         return result;
   52699             : }
   52700             : 
   52701             : 
   52702           0 : static PyObject *py_srvsvc_NetPathCompare_in_get_server_unc(PyObject *obj, void *closure)
   52703             : {
   52704           0 :         struct srvsvc_NetPathCompare *object = (struct srvsvc_NetPathCompare *)pytalloc_get_ptr(obj);
   52705             :         PyObject *py_server_unc;
   52706           0 :         if (object->in.server_unc == NULL) {
   52707           0 :                 Py_RETURN_NONE;
   52708             :         }
   52709           0 :         if (object->in.server_unc == NULL) {
   52710           0 :                 py_server_unc = Py_None;
   52711           0 :                 Py_INCREF(py_server_unc);
   52712             :         } else {
   52713           0 :                 if (object->in.server_unc == NULL) {
   52714           0 :                         py_server_unc = Py_None;
   52715           0 :                         Py_INCREF(py_server_unc);
   52716             :                 } else {
   52717           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   52718             :                 }
   52719             :         }
   52720           0 :         return py_server_unc;
   52721             : }
   52722             : 
   52723           0 : static int py_srvsvc_NetPathCompare_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   52724             : {
   52725           0 :         struct srvsvc_NetPathCompare *object = (struct srvsvc_NetPathCompare *)pytalloc_get_ptr(py_obj);
   52726           0 :         if (value == NULL) {
   52727           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   52728           0 :                 return -1;
   52729             :         }
   52730           0 :         if (value == Py_None) {
   52731           0 :                 object->in.server_unc = NULL;
   52732             :         } else {
   52733           0 :                 object->in.server_unc = NULL;
   52734             :                 {
   52735             :                         const char *test_str;
   52736             :                         const char *talloc_str;
   52737           0 :                         PyObject *unicode = NULL;
   52738           0 :                         if (PyUnicode_Check(value)) {
   52739           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   52740           0 :                                 if (unicode == NULL) {
   52741           0 :                                         PyErr_NoMemory();
   52742           0 :                                         return -1;
   52743             :                                 }
   52744           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   52745           0 :                         } else if (PyBytes_Check(value)) {
   52746           0 :                                 test_str = PyBytes_AS_STRING(value);
   52747             :                         } else {
   52748           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   52749           0 :                                 return -1;
   52750             :                         }
   52751           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   52752           0 :                         if (unicode != NULL) {
   52753           0 :                                 Py_DECREF(unicode);
   52754             :                         }
   52755           0 :                         if (talloc_str == NULL) {
   52756           0 :                                 PyErr_NoMemory();
   52757           0 :                                 return -1;
   52758             :                         }
   52759           0 :                         object->in.server_unc = talloc_str;
   52760             :                 }
   52761             :         }
   52762           0 :         return 0;
   52763             : }
   52764             : 
   52765           0 : static PyObject *py_srvsvc_NetPathCompare_in_get_path1(PyObject *obj, void *closure)
   52766             : {
   52767           0 :         struct srvsvc_NetPathCompare *object = (struct srvsvc_NetPathCompare *)pytalloc_get_ptr(obj);
   52768             :         PyObject *py_path1;
   52769           0 :         if (object->in.path1 == NULL) {
   52770           0 :                 py_path1 = Py_None;
   52771           0 :                 Py_INCREF(py_path1);
   52772             :         } else {
   52773           0 :                 py_path1 = PyUnicode_Decode(object->in.path1, strlen(object->in.path1), "utf-8", "ignore");
   52774             :         }
   52775           0 :         return py_path1;
   52776             : }
   52777             : 
   52778           0 : static int py_srvsvc_NetPathCompare_in_set_path1(PyObject *py_obj, PyObject *value, void *closure)
   52779             : {
   52780           0 :         struct srvsvc_NetPathCompare *object = (struct srvsvc_NetPathCompare *)pytalloc_get_ptr(py_obj);
   52781           0 :         if (value == NULL) {
   52782           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.path1");
   52783           0 :                 return -1;
   52784             :         }
   52785             :         {
   52786             :                 const char *test_str;
   52787             :                 const char *talloc_str;
   52788           0 :                 PyObject *unicode = NULL;
   52789           0 :                 if (PyUnicode_Check(value)) {
   52790           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   52791           0 :                         if (unicode == NULL) {
   52792           0 :                                 PyErr_NoMemory();
   52793           0 :                                 return -1;
   52794             :                         }
   52795           0 :                         test_str = PyBytes_AS_STRING(unicode);
   52796           0 :                 } else if (PyBytes_Check(value)) {
   52797           0 :                         test_str = PyBytes_AS_STRING(value);
   52798             :                 } else {
   52799           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   52800           0 :                         return -1;
   52801             :                 }
   52802           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   52803           0 :                 if (unicode != NULL) {
   52804           0 :                         Py_DECREF(unicode);
   52805             :                 }
   52806           0 :                 if (talloc_str == NULL) {
   52807           0 :                         PyErr_NoMemory();
   52808           0 :                         return -1;
   52809             :                 }
   52810           0 :                 object->in.path1 = talloc_str;
   52811             :         }
   52812           0 :         return 0;
   52813             : }
   52814             : 
   52815           0 : static PyObject *py_srvsvc_NetPathCompare_in_get_path2(PyObject *obj, void *closure)
   52816             : {
   52817           0 :         struct srvsvc_NetPathCompare *object = (struct srvsvc_NetPathCompare *)pytalloc_get_ptr(obj);
   52818             :         PyObject *py_path2;
   52819           0 :         if (object->in.path2 == NULL) {
   52820           0 :                 py_path2 = Py_None;
   52821           0 :                 Py_INCREF(py_path2);
   52822             :         } else {
   52823           0 :                 py_path2 = PyUnicode_Decode(object->in.path2, strlen(object->in.path2), "utf-8", "ignore");
   52824             :         }
   52825           0 :         return py_path2;
   52826             : }
   52827             : 
   52828           0 : static int py_srvsvc_NetPathCompare_in_set_path2(PyObject *py_obj, PyObject *value, void *closure)
   52829             : {
   52830           0 :         struct srvsvc_NetPathCompare *object = (struct srvsvc_NetPathCompare *)pytalloc_get_ptr(py_obj);
   52831           0 :         if (value == NULL) {
   52832           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.path2");
   52833           0 :                 return -1;
   52834             :         }
   52835             :         {
   52836             :                 const char *test_str;
   52837             :                 const char *talloc_str;
   52838           0 :                 PyObject *unicode = NULL;
   52839           0 :                 if (PyUnicode_Check(value)) {
   52840           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   52841           0 :                         if (unicode == NULL) {
   52842           0 :                                 PyErr_NoMemory();
   52843           0 :                                 return -1;
   52844             :                         }
   52845           0 :                         test_str = PyBytes_AS_STRING(unicode);
   52846           0 :                 } else if (PyBytes_Check(value)) {
   52847           0 :                         test_str = PyBytes_AS_STRING(value);
   52848             :                 } else {
   52849           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   52850           0 :                         return -1;
   52851             :                 }
   52852           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   52853           0 :                 if (unicode != NULL) {
   52854           0 :                         Py_DECREF(unicode);
   52855             :                 }
   52856           0 :                 if (talloc_str == NULL) {
   52857           0 :                         PyErr_NoMemory();
   52858           0 :                         return -1;
   52859             :                 }
   52860           0 :                 object->in.path2 = talloc_str;
   52861             :         }
   52862           0 :         return 0;
   52863             : }
   52864             : 
   52865           0 : static PyObject *py_srvsvc_NetPathCompare_in_get_pathtype(PyObject *obj, void *closure)
   52866             : {
   52867           0 :         struct srvsvc_NetPathCompare *object = (struct srvsvc_NetPathCompare *)pytalloc_get_ptr(obj);
   52868             :         PyObject *py_pathtype;
   52869           0 :         py_pathtype = PyLong_FromUnsignedLongLong((uint32_t)object->in.pathtype);
   52870           0 :         return py_pathtype;
   52871             : }
   52872             : 
   52873           0 : static int py_srvsvc_NetPathCompare_in_set_pathtype(PyObject *py_obj, PyObject *value, void *closure)
   52874             : {
   52875           0 :         struct srvsvc_NetPathCompare *object = (struct srvsvc_NetPathCompare *)pytalloc_get_ptr(py_obj);
   52876           0 :         if (value == NULL) {
   52877           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pathtype");
   52878           0 :                 return -1;
   52879             :         }
   52880             :         {
   52881           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.pathtype));
   52882           0 :                 if (PyLong_Check(value)) {
   52883             :                         unsigned long long test_var;
   52884           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   52885           0 :                         if (PyErr_Occurred() != NULL) {
   52886           0 :                                 return -1;
   52887             :                         }
   52888           0 :                         if (test_var > uint_max) {
   52889           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   52890             :                                   PyLong_Type.tp_name, uint_max, test_var);
   52891           0 :                                 return -1;
   52892             :                         }
   52893           0 :                         object->in.pathtype = test_var;
   52894             :                 } else {
   52895           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   52896             :                           PyLong_Type.tp_name);
   52897           0 :                         return -1;
   52898             :                 }
   52899             :         }
   52900           0 :         return 0;
   52901             : }
   52902             : 
   52903           0 : static PyObject *py_srvsvc_NetPathCompare_in_get_pathflags(PyObject *obj, void *closure)
   52904             : {
   52905           0 :         struct srvsvc_NetPathCompare *object = (struct srvsvc_NetPathCompare *)pytalloc_get_ptr(obj);
   52906             :         PyObject *py_pathflags;
   52907           0 :         py_pathflags = PyLong_FromUnsignedLongLong((uint32_t)object->in.pathflags);
   52908           0 :         return py_pathflags;
   52909             : }
   52910             : 
   52911           0 : static int py_srvsvc_NetPathCompare_in_set_pathflags(PyObject *py_obj, PyObject *value, void *closure)
   52912             : {
   52913           0 :         struct srvsvc_NetPathCompare *object = (struct srvsvc_NetPathCompare *)pytalloc_get_ptr(py_obj);
   52914           0 :         if (value == NULL) {
   52915           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pathflags");
   52916           0 :                 return -1;
   52917             :         }
   52918             :         {
   52919           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.pathflags));
   52920           0 :                 if (PyLong_Check(value)) {
   52921             :                         unsigned long long test_var;
   52922           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   52923           0 :                         if (PyErr_Occurred() != NULL) {
   52924           0 :                                 return -1;
   52925             :                         }
   52926           0 :                         if (test_var > uint_max) {
   52927           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   52928             :                                   PyLong_Type.tp_name, uint_max, test_var);
   52929           0 :                                 return -1;
   52930             :                         }
   52931           0 :                         object->in.pathflags = test_var;
   52932             :                 } else {
   52933           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   52934             :                           PyLong_Type.tp_name);
   52935           0 :                         return -1;
   52936             :                 }
   52937             :         }
   52938           0 :         return 0;
   52939             : }
   52940             : 
   52941           0 : static PyObject *py_srvsvc_NetPathCompare_get_result(PyObject *obj, void *closure)
   52942             : {
   52943           0 :         struct srvsvc_NetPathCompare *object = (struct srvsvc_NetPathCompare *)pytalloc_get_ptr(obj);
   52944             :         PyObject *py_result;
   52945           0 :         py_result = PyErr_FromWERROR(object->out.result);
   52946           0 :         return py_result;
   52947             : }
   52948             : 
   52949           0 : static int py_srvsvc_NetPathCompare_set_result(PyObject *py_obj, PyObject *value, void *closure)
   52950             : {
   52951           0 :         struct srvsvc_NetPathCompare *object = (struct srvsvc_NetPathCompare *)pytalloc_get_ptr(py_obj);
   52952           0 :         if (value == NULL) {
   52953           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   52954           0 :                 return -1;
   52955             :         }
   52956           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   52957           0 :         return 0;
   52958             : }
   52959             : 
   52960             : static PyGetSetDef py_srvsvc_NetPathCompare_getsetters[] = {
   52961             :         {
   52962             :                 .name = discard_const_p(char, "in_server_unc"),
   52963             :                 .get = py_srvsvc_NetPathCompare_in_get_server_unc,
   52964             :                 .set = py_srvsvc_NetPathCompare_in_set_server_unc,
   52965             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   52966             :         },
   52967             :         {
   52968             :                 .name = discard_const_p(char, "in_path1"),
   52969             :                 .get = py_srvsvc_NetPathCompare_in_get_path1,
   52970             :                 .set = py_srvsvc_NetPathCompare_in_set_path1,
   52971             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   52972             :         },
   52973             :         {
   52974             :                 .name = discard_const_p(char, "in_path2"),
   52975             :                 .get = py_srvsvc_NetPathCompare_in_get_path2,
   52976             :                 .set = py_srvsvc_NetPathCompare_in_set_path2,
   52977             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   52978             :         },
   52979             :         {
   52980             :                 .name = discard_const_p(char, "in_pathtype"),
   52981             :                 .get = py_srvsvc_NetPathCompare_in_get_pathtype,
   52982             :                 .set = py_srvsvc_NetPathCompare_in_set_pathtype,
   52983             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   52984             :         },
   52985             :         {
   52986             :                 .name = discard_const_p(char, "in_pathflags"),
   52987             :                 .get = py_srvsvc_NetPathCompare_in_get_pathflags,
   52988             :                 .set = py_srvsvc_NetPathCompare_in_set_pathflags,
   52989             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   52990             :         },
   52991             :         {
   52992             :                 .name = discard_const_p(char, "result"),
   52993             :                 .get = py_srvsvc_NetPathCompare_get_result,
   52994             :                 .set = py_srvsvc_NetPathCompare_set_result,
   52995             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   52996             :         },
   52997             :         { .name = NULL }
   52998             : };
   52999             : 
   53000           0 : static PyObject *py_srvsvc_NetPathCompare_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   53001             : {
   53002           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetPathCompare, type);
   53003           0 :         return self;
   53004             : }
   53005             : 
   53006           0 : static PyObject *py_srvsvc_NetPathCompare_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   53007             : {
   53008             : 
   53009             : 
   53010           0 :         return PyLong_FromLong(32);
   53011             : }
   53012             : 
   53013           0 : static PyObject *py_srvsvc_NetPathCompare_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   53014             : {
   53015           0 :         const struct ndr_interface_call *call = NULL;
   53016           0 :         struct srvsvc_NetPathCompare *object = (struct srvsvc_NetPathCompare *)pytalloc_get_ptr(py_obj);
   53017           0 :         PyObject *ret = NULL;
   53018           0 :         struct ndr_push *push = NULL;
   53019             :         DATA_BLOB blob;
   53020             :         enum ndr_err_code err;
   53021             : 
   53022           0 :         if (ndr_table_srvsvc.num_calls < 33) {
   53023           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetPathCompare_ndr_pack");
   53024           0 :                 return NULL;
   53025             :         }
   53026           0 :         call = &ndr_table_srvsvc.calls[32];
   53027             : 
   53028           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   53029           0 :         if (push == NULL) {
   53030           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   53031           0 :                 return NULL;
   53032             :         }
   53033             : 
   53034           0 :         push->flags |= ndr_push_flags;
   53035             : 
   53036           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   53037           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   53038           0 :                 TALLOC_FREE(push);
   53039           0 :                 PyErr_SetNdrError(err);
   53040           0 :                 return NULL;
   53041             :         }
   53042           0 :         blob = ndr_push_blob(push);
   53043           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   53044           0 :         TALLOC_FREE(push);
   53045           0 :         return ret;
   53046             : }
   53047             : 
   53048           0 : static PyObject *py_srvsvc_NetPathCompare_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53049             : {
   53050           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   53051           0 :         PyObject *bigendian_obj = NULL;
   53052           0 :         PyObject *ndr64_obj = NULL;
   53053           0 :         uint32_t ndr_push_flags = 0;
   53054             : 
   53055           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   53056             :                 discard_const_p(char *, kwnames),
   53057             :                 &bigendian_obj,
   53058             :                 &ndr64_obj)) {
   53059           0 :                 return NULL;
   53060             :         }
   53061             : 
   53062           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53063           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   53064             :         }
   53065           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53066           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   53067             :         }
   53068             : 
   53069           0 :         return py_srvsvc_NetPathCompare_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   53070             : }
   53071             : 
   53072           0 : static PyObject *py_srvsvc_NetPathCompare_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53073             : {
   53074           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   53075           0 :         PyObject *bigendian_obj = NULL;
   53076           0 :         PyObject *ndr64_obj = NULL;
   53077           0 :         uint32_t ndr_push_flags = 0;
   53078             : 
   53079           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   53080             :                 discard_const_p(char *, kwnames),
   53081             :                 &bigendian_obj,
   53082             :                 &ndr64_obj)) {
   53083           0 :                 return NULL;
   53084             :         }
   53085             : 
   53086           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53087           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   53088             :         }
   53089           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53090           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   53091             :         }
   53092             : 
   53093           0 :         return py_srvsvc_NetPathCompare_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   53094             : }
   53095             : 
   53096           0 : static PyObject *py_srvsvc_NetPathCompare_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   53097             : {
   53098           0 :         const struct ndr_interface_call *call = NULL;
   53099           0 :         struct srvsvc_NetPathCompare *object = (struct srvsvc_NetPathCompare *)pytalloc_get_ptr(py_obj);
   53100           0 :         struct ndr_pull *pull = NULL;
   53101             :         enum ndr_err_code err;
   53102             : 
   53103           0 :         if (ndr_table_srvsvc.num_calls < 33) {
   53104           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetPathCompare_ndr_unpack");
   53105           0 :                 return NULL;
   53106             :         }
   53107           0 :         call = &ndr_table_srvsvc.calls[32];
   53108             : 
   53109           0 :         pull = ndr_pull_init_blob(blob, object);
   53110           0 :         if (pull == NULL) {
   53111           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   53112           0 :                 return NULL;
   53113             :         }
   53114             : 
   53115           0 :         pull->flags |= ndr_pull_flags;
   53116             : 
   53117           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   53118           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   53119           0 :                 TALLOC_FREE(pull);
   53120           0 :                 PyErr_SetNdrError(err);
   53121           0 :                 return NULL;
   53122             :         }
   53123           0 :         if (!allow_remaining) {
   53124             :                 uint32_t highest_ofs;
   53125             : 
   53126           0 :                 if (pull->offset > pull->relative_highest_offset) {
   53127           0 :                         highest_ofs = pull->offset;
   53128             :                 } else {
   53129           0 :                         highest_ofs = pull->relative_highest_offset;
   53130             :                 }
   53131           0 :                 if (highest_ofs < pull->data_size) {
   53132           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   53133             :                                 "not all bytes consumed ofs[%u] size[%u]",
   53134             :                                 highest_ofs, pull->data_size);
   53135           0 :                         TALLOC_FREE(pull);
   53136           0 :                         PyErr_SetNdrError(err);
   53137           0 :                         return NULL;
   53138             :                 }
   53139             :         }
   53140             : 
   53141           0 :         TALLOC_FREE(pull);
   53142           0 :         Py_RETURN_NONE;
   53143             : }
   53144             : 
   53145           0 : static PyObject *py_srvsvc_NetPathCompare_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53146             : {
   53147             :         DATA_BLOB blob;
   53148           0 :         Py_ssize_t blob_length = 0;
   53149           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   53150           0 :         PyObject *bigendian_obj = NULL;
   53151           0 :         PyObject *ndr64_obj = NULL;
   53152           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   53153           0 :         PyObject *allow_remaining_obj = NULL;
   53154           0 :         bool allow_remaining = false;
   53155             : 
   53156           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   53157             :                 discard_const_p(char *, kwnames),
   53158             :                 &blob.data, &blob_length,
   53159             :                 &bigendian_obj,
   53160             :                 &ndr64_obj,
   53161             :                 &allow_remaining_obj)) {
   53162           0 :                 return NULL;
   53163             :         }
   53164           0 :         blob.length = blob_length;
   53165             : 
   53166           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53167           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   53168             :         }
   53169           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53170           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   53171             :         }
   53172             : 
   53173           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   53174           0 :                 allow_remaining = true;
   53175             :         }
   53176             : 
   53177           0 :         return py_srvsvc_NetPathCompare_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   53178             : }
   53179             : 
   53180           0 : static PyObject *py_srvsvc_NetPathCompare_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53181             : {
   53182             :         DATA_BLOB blob;
   53183           0 :         Py_ssize_t blob_length = 0;
   53184           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   53185           0 :         PyObject *bigendian_obj = NULL;
   53186           0 :         PyObject *ndr64_obj = NULL;
   53187           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   53188           0 :         PyObject *allow_remaining_obj = NULL;
   53189           0 :         bool allow_remaining = false;
   53190             : 
   53191           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   53192             :                 discard_const_p(char *, kwnames),
   53193             :                 &blob.data, &blob_length,
   53194             :                 &bigendian_obj,
   53195             :                 &ndr64_obj,
   53196             :                 &allow_remaining_obj)) {
   53197           0 :                 return NULL;
   53198             :         }
   53199           0 :         blob.length = blob_length;
   53200             : 
   53201           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53202           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   53203             :         }
   53204           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53205           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   53206             :         }
   53207             : 
   53208           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   53209           0 :                 allow_remaining = true;
   53210             :         }
   53211             : 
   53212           0 :         return py_srvsvc_NetPathCompare_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   53213             : }
   53214             : 
   53215           0 : static PyObject *py_srvsvc_NetPathCompare_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   53216             : {
   53217           0 :         const struct ndr_interface_call *call = NULL;
   53218           0 :         struct srvsvc_NetPathCompare *object = (struct srvsvc_NetPathCompare *)pytalloc_get_ptr(py_obj);
   53219             :         PyObject *ret;
   53220             :         char *retstr;
   53221             : 
   53222           0 :         if (ndr_table_srvsvc.num_calls < 33) {
   53223           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetPathCompare_ndr_print");
   53224           0 :                 return NULL;
   53225             :         }
   53226           0 :         call = &ndr_table_srvsvc.calls[32];
   53227             : 
   53228           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   53229           0 :         ret = PyUnicode_FromString(retstr);
   53230           0 :         TALLOC_FREE(retstr);
   53231             : 
   53232           0 :         return ret;
   53233             : }
   53234             : 
   53235           0 : static PyObject *py_srvsvc_NetPathCompare_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   53236             : {
   53237           0 :         return py_srvsvc_NetPathCompare_ndr_print(py_obj, "srvsvc_NetPathCompare_in", NDR_IN);
   53238             : }
   53239             : 
   53240           0 : static PyObject *py_srvsvc_NetPathCompare_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   53241             : {
   53242           0 :         return py_srvsvc_NetPathCompare_ndr_print(py_obj, "srvsvc_NetPathCompare_out", NDR_OUT);
   53243             : }
   53244             : 
   53245             : static PyMethodDef py_srvsvc_NetPathCompare_methods[] = {
   53246             :         { "opnum", (PyCFunction)py_srvsvc_NetPathCompare_ndr_opnum, METH_NOARGS|METH_CLASS,
   53247             :                 "srvsvc.NetPathCompare.opnum() -> 32 (0x20) " },
   53248             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPathCompare_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   53249             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   53250             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPathCompare_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   53251             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   53252             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPathCompare_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   53253             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   53254             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPathCompare_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   53255             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   53256             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetPathCompare_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   53257             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetPathCompare_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   53258             :         { NULL, NULL, 0, NULL }
   53259             : };
   53260             : 
   53261             : 
   53262             : static PyTypeObject srvsvc_NetPathCompare_Type = {
   53263             :         PyVarObject_HEAD_INIT(NULL, 0)
   53264             :         .tp_name = "srvsvc.NetPathCompare",
   53265             :         .tp_getset = py_srvsvc_NetPathCompare_getsetters,
   53266             :         .tp_methods = py_srvsvc_NetPathCompare_methods,
   53267             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   53268             :         .tp_new = py_srvsvc_NetPathCompare_new,
   53269             : };
   53270             : 
   53271           0 : static bool pack_py_srvsvc_NetPathCompare_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetPathCompare *r)
   53272             : {
   53273             :         PyObject *py_server_unc;
   53274             :         PyObject *py_path1;
   53275             :         PyObject *py_path2;
   53276             :         PyObject *py_pathtype;
   53277             :         PyObject *py_pathflags;
   53278           0 :         const char *kwnames[] = {
   53279             :                 "server_unc", "path1", "path2", "pathtype", "pathflags", NULL
   53280             :         };
   53281             : 
   53282           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:srvsvc_NetPathCompare", discard_const_p(char *, kwnames), &py_server_unc, &py_path1, &py_path2, &py_pathtype, &py_pathflags)) {
   53283           0 :                 return false;
   53284             :         }
   53285             : 
   53286           0 :         if (py_server_unc == NULL) {
   53287           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   53288           0 :                 return false;
   53289             :         }
   53290           0 :         if (py_server_unc == Py_None) {
   53291           0 :                 r->in.server_unc = NULL;
   53292             :         } else {
   53293           0 :                 r->in.server_unc = NULL;
   53294             :                 {
   53295             :                         const char *test_str;
   53296             :                         const char *talloc_str;
   53297           0 :                         PyObject *unicode = NULL;
   53298           0 :                         if (PyUnicode_Check(py_server_unc)) {
   53299           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   53300           0 :                                 if (unicode == NULL) {
   53301           0 :                                         PyErr_NoMemory();
   53302           0 :                                         return false;
   53303             :                                 }
   53304           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   53305           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   53306           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   53307             :                         } else {
   53308           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   53309           0 :                                 return false;
   53310             :                         }
   53311           0 :                         talloc_str = talloc_strdup(r, test_str);
   53312           0 :                         if (unicode != NULL) {
   53313           0 :                                 Py_DECREF(unicode);
   53314             :                         }
   53315           0 :                         if (talloc_str == NULL) {
   53316           0 :                                 PyErr_NoMemory();
   53317           0 :                                 return false;
   53318             :                         }
   53319           0 :                         r->in.server_unc = talloc_str;
   53320             :                 }
   53321             :         }
   53322           0 :         if (py_path1 == NULL) {
   53323           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.path1");
   53324           0 :                 return false;
   53325             :         }
   53326             :         {
   53327             :                 const char *test_str;
   53328             :                 const char *talloc_str;
   53329           0 :                 PyObject *unicode = NULL;
   53330           0 :                 if (PyUnicode_Check(py_path1)) {
   53331           0 :                         unicode = PyUnicode_AsEncodedString(py_path1, "utf-8", "ignore");
   53332           0 :                         if (unicode == NULL) {
   53333           0 :                                 PyErr_NoMemory();
   53334           0 :                                 return false;
   53335             :                         }
   53336           0 :                         test_str = PyBytes_AS_STRING(unicode);
   53337           0 :                 } else if (PyBytes_Check(py_path1)) {
   53338           0 :                         test_str = PyBytes_AS_STRING(py_path1);
   53339             :                 } else {
   53340           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_path1)->tp_name);
   53341           0 :                         return false;
   53342             :                 }
   53343           0 :                 talloc_str = talloc_strdup(r, test_str);
   53344           0 :                 if (unicode != NULL) {
   53345           0 :                         Py_DECREF(unicode);
   53346             :                 }
   53347           0 :                 if (talloc_str == NULL) {
   53348           0 :                         PyErr_NoMemory();
   53349           0 :                         return false;
   53350             :                 }
   53351           0 :                 r->in.path1 = talloc_str;
   53352             :         }
   53353           0 :         if (py_path2 == NULL) {
   53354           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.path2");
   53355           0 :                 return false;
   53356             :         }
   53357             :         {
   53358             :                 const char *test_str;
   53359             :                 const char *talloc_str;
   53360           0 :                 PyObject *unicode = NULL;
   53361           0 :                 if (PyUnicode_Check(py_path2)) {
   53362           0 :                         unicode = PyUnicode_AsEncodedString(py_path2, "utf-8", "ignore");
   53363           0 :                         if (unicode == NULL) {
   53364           0 :                                 PyErr_NoMemory();
   53365           0 :                                 return false;
   53366             :                         }
   53367           0 :                         test_str = PyBytes_AS_STRING(unicode);
   53368           0 :                 } else if (PyBytes_Check(py_path2)) {
   53369           0 :                         test_str = PyBytes_AS_STRING(py_path2);
   53370             :                 } else {
   53371           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_path2)->tp_name);
   53372           0 :                         return false;
   53373             :                 }
   53374           0 :                 talloc_str = talloc_strdup(r, test_str);
   53375           0 :                 if (unicode != NULL) {
   53376           0 :                         Py_DECREF(unicode);
   53377             :                 }
   53378           0 :                 if (talloc_str == NULL) {
   53379           0 :                         PyErr_NoMemory();
   53380           0 :                         return false;
   53381             :                 }
   53382           0 :                 r->in.path2 = talloc_str;
   53383             :         }
   53384           0 :         if (py_pathtype == NULL) {
   53385           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pathtype");
   53386           0 :                 return false;
   53387             :         }
   53388             :         {
   53389           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.pathtype));
   53390           0 :                 if (PyLong_Check(py_pathtype)) {
   53391             :                         unsigned long long test_var;
   53392           0 :                         test_var = PyLong_AsUnsignedLongLong(py_pathtype);
   53393           0 :                         if (PyErr_Occurred() != NULL) {
   53394           0 :                                 return false;
   53395             :                         }
   53396           0 :                         if (test_var > uint_max) {
   53397           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   53398             :                                   PyLong_Type.tp_name, uint_max, test_var);
   53399           0 :                                 return false;
   53400             :                         }
   53401           0 :                         r->in.pathtype = test_var;
   53402             :                 } else {
   53403           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   53404             :                           PyLong_Type.tp_name);
   53405           0 :                         return false;
   53406             :                 }
   53407             :         }
   53408           0 :         if (py_pathflags == NULL) {
   53409           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pathflags");
   53410           0 :                 return false;
   53411             :         }
   53412             :         {
   53413           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.pathflags));
   53414           0 :                 if (PyLong_Check(py_pathflags)) {
   53415             :                         unsigned long long test_var;
   53416           0 :                         test_var = PyLong_AsUnsignedLongLong(py_pathflags);
   53417           0 :                         if (PyErr_Occurred() != NULL) {
   53418           0 :                                 return false;
   53419             :                         }
   53420           0 :                         if (test_var > uint_max) {
   53421           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   53422             :                                   PyLong_Type.tp_name, uint_max, test_var);
   53423           0 :                                 return false;
   53424             :                         }
   53425           0 :                         r->in.pathflags = test_var;
   53426             :                 } else {
   53427           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   53428             :                           PyLong_Type.tp_name);
   53429           0 :                         return false;
   53430             :                 }
   53431             :         }
   53432           0 :         return true;
   53433             : }
   53434             : 
   53435           0 : static PyObject *unpack_py_srvsvc_NetPathCompare_args_out(struct srvsvc_NetPathCompare *r)
   53436             : {
   53437             :         PyObject *result;
   53438           0 :         result = Py_None;
   53439           0 :         Py_INCREF(result);
   53440           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   53441           0 :                 PyErr_SetWERROR(r->out.result);
   53442           0 :                 return NULL;
   53443             :         }
   53444             : 
   53445           0 :         return result;
   53446             : }
   53447             : 
   53448             : 
   53449           0 : static PyObject *py_srvsvc_NetNameValidate_in_get_server_unc(PyObject *obj, void *closure)
   53450             : {
   53451           0 :         struct srvsvc_NetNameValidate *object = (struct srvsvc_NetNameValidate *)pytalloc_get_ptr(obj);
   53452             :         PyObject *py_server_unc;
   53453           0 :         if (object->in.server_unc == NULL) {
   53454           0 :                 Py_RETURN_NONE;
   53455             :         }
   53456           0 :         if (object->in.server_unc == NULL) {
   53457           0 :                 py_server_unc = Py_None;
   53458           0 :                 Py_INCREF(py_server_unc);
   53459             :         } else {
   53460           0 :                 if (object->in.server_unc == NULL) {
   53461           0 :                         py_server_unc = Py_None;
   53462           0 :                         Py_INCREF(py_server_unc);
   53463             :                 } else {
   53464           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   53465             :                 }
   53466             :         }
   53467           0 :         return py_server_unc;
   53468             : }
   53469             : 
   53470           0 : static int py_srvsvc_NetNameValidate_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   53471             : {
   53472           0 :         struct srvsvc_NetNameValidate *object = (struct srvsvc_NetNameValidate *)pytalloc_get_ptr(py_obj);
   53473           0 :         if (value == NULL) {
   53474           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   53475           0 :                 return -1;
   53476             :         }
   53477           0 :         if (value == Py_None) {
   53478           0 :                 object->in.server_unc = NULL;
   53479             :         } else {
   53480           0 :                 object->in.server_unc = NULL;
   53481             :                 {
   53482             :                         const char *test_str;
   53483             :                         const char *talloc_str;
   53484           0 :                         PyObject *unicode = NULL;
   53485           0 :                         if (PyUnicode_Check(value)) {
   53486           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   53487           0 :                                 if (unicode == NULL) {
   53488           0 :                                         PyErr_NoMemory();
   53489           0 :                                         return -1;
   53490             :                                 }
   53491           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   53492           0 :                         } else if (PyBytes_Check(value)) {
   53493           0 :                                 test_str = PyBytes_AS_STRING(value);
   53494             :                         } else {
   53495           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   53496           0 :                                 return -1;
   53497             :                         }
   53498           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   53499           0 :                         if (unicode != NULL) {
   53500           0 :                                 Py_DECREF(unicode);
   53501             :                         }
   53502           0 :                         if (talloc_str == NULL) {
   53503           0 :                                 PyErr_NoMemory();
   53504           0 :                                 return -1;
   53505             :                         }
   53506           0 :                         object->in.server_unc = talloc_str;
   53507             :                 }
   53508             :         }
   53509           0 :         return 0;
   53510             : }
   53511             : 
   53512           0 : static PyObject *py_srvsvc_NetNameValidate_in_get_name(PyObject *obj, void *closure)
   53513             : {
   53514           0 :         struct srvsvc_NetNameValidate *object = (struct srvsvc_NetNameValidate *)pytalloc_get_ptr(obj);
   53515             :         PyObject *py_name;
   53516           0 :         if (object->in.name == NULL) {
   53517           0 :                 py_name = Py_None;
   53518           0 :                 Py_INCREF(py_name);
   53519             :         } else {
   53520           0 :                 py_name = PyUnicode_Decode(object->in.name, strlen(object->in.name), "utf-8", "ignore");
   53521             :         }
   53522           0 :         return py_name;
   53523             : }
   53524             : 
   53525           0 : static int py_srvsvc_NetNameValidate_in_set_name(PyObject *py_obj, PyObject *value, void *closure)
   53526             : {
   53527           0 :         struct srvsvc_NetNameValidate *object = (struct srvsvc_NetNameValidate *)pytalloc_get_ptr(py_obj);
   53528           0 :         if (value == NULL) {
   53529           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.name");
   53530           0 :                 return -1;
   53531             :         }
   53532             :         {
   53533             :                 const char *test_str;
   53534             :                 const char *talloc_str;
   53535           0 :                 PyObject *unicode = NULL;
   53536           0 :                 if (PyUnicode_Check(value)) {
   53537           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   53538           0 :                         if (unicode == NULL) {
   53539           0 :                                 PyErr_NoMemory();
   53540           0 :                                 return -1;
   53541             :                         }
   53542           0 :                         test_str = PyBytes_AS_STRING(unicode);
   53543           0 :                 } else if (PyBytes_Check(value)) {
   53544           0 :                         test_str = PyBytes_AS_STRING(value);
   53545             :                 } else {
   53546           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   53547           0 :                         return -1;
   53548             :                 }
   53549           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   53550           0 :                 if (unicode != NULL) {
   53551           0 :                         Py_DECREF(unicode);
   53552             :                 }
   53553           0 :                 if (talloc_str == NULL) {
   53554           0 :                         PyErr_NoMemory();
   53555           0 :                         return -1;
   53556             :                 }
   53557           0 :                 object->in.name = talloc_str;
   53558             :         }
   53559           0 :         return 0;
   53560             : }
   53561             : 
   53562           0 : static PyObject *py_srvsvc_NetNameValidate_in_get_name_type(PyObject *obj, void *closure)
   53563             : {
   53564           0 :         struct srvsvc_NetNameValidate *object = (struct srvsvc_NetNameValidate *)pytalloc_get_ptr(obj);
   53565             :         PyObject *py_name_type;
   53566           0 :         py_name_type = PyLong_FromUnsignedLongLong((uint32_t)object->in.name_type);
   53567           0 :         return py_name_type;
   53568             : }
   53569             : 
   53570           0 : static int py_srvsvc_NetNameValidate_in_set_name_type(PyObject *py_obj, PyObject *value, void *closure)
   53571             : {
   53572           0 :         struct srvsvc_NetNameValidate *object = (struct srvsvc_NetNameValidate *)pytalloc_get_ptr(py_obj);
   53573           0 :         if (value == NULL) {
   53574           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.name_type");
   53575           0 :                 return -1;
   53576             :         }
   53577             :         {
   53578           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.name_type));
   53579           0 :                 if (PyLong_Check(value)) {
   53580             :                         unsigned long long test_var;
   53581           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   53582           0 :                         if (PyErr_Occurred() != NULL) {
   53583           0 :                                 return -1;
   53584             :                         }
   53585           0 :                         if (test_var > uint_max) {
   53586           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   53587             :                                   PyLong_Type.tp_name, uint_max, test_var);
   53588           0 :                                 return -1;
   53589             :                         }
   53590           0 :                         object->in.name_type = test_var;
   53591             :                 } else {
   53592           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   53593             :                           PyLong_Type.tp_name);
   53594           0 :                         return -1;
   53595             :                 }
   53596             :         }
   53597           0 :         return 0;
   53598             : }
   53599             : 
   53600           0 : static PyObject *py_srvsvc_NetNameValidate_in_get_flags(PyObject *obj, void *closure)
   53601             : {
   53602           0 :         struct srvsvc_NetNameValidate *object = (struct srvsvc_NetNameValidate *)pytalloc_get_ptr(obj);
   53603             :         PyObject *py_flags;
   53604           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.flags);
   53605           0 :         return py_flags;
   53606             : }
   53607             : 
   53608           0 : static int py_srvsvc_NetNameValidate_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   53609             : {
   53610           0 :         struct srvsvc_NetNameValidate *object = (struct srvsvc_NetNameValidate *)pytalloc_get_ptr(py_obj);
   53611           0 :         if (value == NULL) {
   53612           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   53613           0 :                 return -1;
   53614             :         }
   53615             :         {
   53616           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   53617           0 :                 if (PyLong_Check(value)) {
   53618             :                         unsigned long long test_var;
   53619           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   53620           0 :                         if (PyErr_Occurred() != NULL) {
   53621           0 :                                 return -1;
   53622             :                         }
   53623           0 :                         if (test_var > uint_max) {
   53624           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   53625             :                                   PyLong_Type.tp_name, uint_max, test_var);
   53626           0 :                                 return -1;
   53627             :                         }
   53628           0 :                         object->in.flags = test_var;
   53629             :                 } else {
   53630           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   53631             :                           PyLong_Type.tp_name);
   53632           0 :                         return -1;
   53633             :                 }
   53634             :         }
   53635           0 :         return 0;
   53636             : }
   53637             : 
   53638           0 : static PyObject *py_srvsvc_NetNameValidate_get_result(PyObject *obj, void *closure)
   53639             : {
   53640           0 :         struct srvsvc_NetNameValidate *object = (struct srvsvc_NetNameValidate *)pytalloc_get_ptr(obj);
   53641             :         PyObject *py_result;
   53642           0 :         py_result = PyErr_FromWERROR(object->out.result);
   53643           0 :         return py_result;
   53644             : }
   53645             : 
   53646           0 : static int py_srvsvc_NetNameValidate_set_result(PyObject *py_obj, PyObject *value, void *closure)
   53647             : {
   53648           0 :         struct srvsvc_NetNameValidate *object = (struct srvsvc_NetNameValidate *)pytalloc_get_ptr(py_obj);
   53649           0 :         if (value == NULL) {
   53650           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   53651           0 :                 return -1;
   53652             :         }
   53653           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   53654           0 :         return 0;
   53655             : }
   53656             : 
   53657             : static PyGetSetDef py_srvsvc_NetNameValidate_getsetters[] = {
   53658             :         {
   53659             :                 .name = discard_const_p(char, "in_server_unc"),
   53660             :                 .get = py_srvsvc_NetNameValidate_in_get_server_unc,
   53661             :                 .set = py_srvsvc_NetNameValidate_in_set_server_unc,
   53662             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   53663             :         },
   53664             :         {
   53665             :                 .name = discard_const_p(char, "in_name"),
   53666             :                 .get = py_srvsvc_NetNameValidate_in_get_name,
   53667             :                 .set = py_srvsvc_NetNameValidate_in_set_name,
   53668             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   53669             :         },
   53670             :         {
   53671             :                 .name = discard_const_p(char, "in_name_type"),
   53672             :                 .get = py_srvsvc_NetNameValidate_in_get_name_type,
   53673             :                 .set = py_srvsvc_NetNameValidate_in_set_name_type,
   53674             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   53675             :         },
   53676             :         {
   53677             :                 .name = discard_const_p(char, "in_flags"),
   53678             :                 .get = py_srvsvc_NetNameValidate_in_get_flags,
   53679             :                 .set = py_srvsvc_NetNameValidate_in_set_flags,
   53680             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   53681             :         },
   53682             :         {
   53683             :                 .name = discard_const_p(char, "result"),
   53684             :                 .get = py_srvsvc_NetNameValidate_get_result,
   53685             :                 .set = py_srvsvc_NetNameValidate_set_result,
   53686             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   53687             :         },
   53688             :         { .name = NULL }
   53689             : };
   53690             : 
   53691           0 : static PyObject *py_srvsvc_NetNameValidate_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   53692             : {
   53693           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetNameValidate, type);
   53694           0 :         return self;
   53695             : }
   53696             : 
   53697           0 : static PyObject *py_srvsvc_NetNameValidate_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   53698             : {
   53699             : 
   53700             : 
   53701           0 :         return PyLong_FromLong(33);
   53702             : }
   53703             : 
   53704           0 : static PyObject *py_srvsvc_NetNameValidate_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   53705             : {
   53706           0 :         const struct ndr_interface_call *call = NULL;
   53707           0 :         struct srvsvc_NetNameValidate *object = (struct srvsvc_NetNameValidate *)pytalloc_get_ptr(py_obj);
   53708           0 :         PyObject *ret = NULL;
   53709           0 :         struct ndr_push *push = NULL;
   53710             :         DATA_BLOB blob;
   53711             :         enum ndr_err_code err;
   53712             : 
   53713           0 :         if (ndr_table_srvsvc.num_calls < 34) {
   53714           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetNameValidate_ndr_pack");
   53715           0 :                 return NULL;
   53716             :         }
   53717           0 :         call = &ndr_table_srvsvc.calls[33];
   53718             : 
   53719           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   53720           0 :         if (push == NULL) {
   53721           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   53722           0 :                 return NULL;
   53723             :         }
   53724             : 
   53725           0 :         push->flags |= ndr_push_flags;
   53726             : 
   53727           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   53728           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   53729           0 :                 TALLOC_FREE(push);
   53730           0 :                 PyErr_SetNdrError(err);
   53731           0 :                 return NULL;
   53732             :         }
   53733           0 :         blob = ndr_push_blob(push);
   53734           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   53735           0 :         TALLOC_FREE(push);
   53736           0 :         return ret;
   53737             : }
   53738             : 
   53739           0 : static PyObject *py_srvsvc_NetNameValidate_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53740             : {
   53741           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   53742           0 :         PyObject *bigendian_obj = NULL;
   53743           0 :         PyObject *ndr64_obj = NULL;
   53744           0 :         uint32_t ndr_push_flags = 0;
   53745             : 
   53746           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   53747             :                 discard_const_p(char *, kwnames),
   53748             :                 &bigendian_obj,
   53749             :                 &ndr64_obj)) {
   53750           0 :                 return NULL;
   53751             :         }
   53752             : 
   53753           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53754           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   53755             :         }
   53756           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53757           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   53758             :         }
   53759             : 
   53760           0 :         return py_srvsvc_NetNameValidate_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   53761             : }
   53762             : 
   53763           0 : static PyObject *py_srvsvc_NetNameValidate_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53764             : {
   53765           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   53766           0 :         PyObject *bigendian_obj = NULL;
   53767           0 :         PyObject *ndr64_obj = NULL;
   53768           0 :         uint32_t ndr_push_flags = 0;
   53769             : 
   53770           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   53771             :                 discard_const_p(char *, kwnames),
   53772             :                 &bigendian_obj,
   53773             :                 &ndr64_obj)) {
   53774           0 :                 return NULL;
   53775             :         }
   53776             : 
   53777           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53778           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   53779             :         }
   53780           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53781           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   53782             :         }
   53783             : 
   53784           0 :         return py_srvsvc_NetNameValidate_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   53785             : }
   53786             : 
   53787           0 : static PyObject *py_srvsvc_NetNameValidate_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   53788             : {
   53789           0 :         const struct ndr_interface_call *call = NULL;
   53790           0 :         struct srvsvc_NetNameValidate *object = (struct srvsvc_NetNameValidate *)pytalloc_get_ptr(py_obj);
   53791           0 :         struct ndr_pull *pull = NULL;
   53792             :         enum ndr_err_code err;
   53793             : 
   53794           0 :         if (ndr_table_srvsvc.num_calls < 34) {
   53795           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetNameValidate_ndr_unpack");
   53796           0 :                 return NULL;
   53797             :         }
   53798           0 :         call = &ndr_table_srvsvc.calls[33];
   53799             : 
   53800           0 :         pull = ndr_pull_init_blob(blob, object);
   53801           0 :         if (pull == NULL) {
   53802           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   53803           0 :                 return NULL;
   53804             :         }
   53805             : 
   53806           0 :         pull->flags |= ndr_pull_flags;
   53807             : 
   53808           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   53809           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   53810           0 :                 TALLOC_FREE(pull);
   53811           0 :                 PyErr_SetNdrError(err);
   53812           0 :                 return NULL;
   53813             :         }
   53814           0 :         if (!allow_remaining) {
   53815             :                 uint32_t highest_ofs;
   53816             : 
   53817           0 :                 if (pull->offset > pull->relative_highest_offset) {
   53818           0 :                         highest_ofs = pull->offset;
   53819             :                 } else {
   53820           0 :                         highest_ofs = pull->relative_highest_offset;
   53821             :                 }
   53822           0 :                 if (highest_ofs < pull->data_size) {
   53823           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   53824             :                                 "not all bytes consumed ofs[%u] size[%u]",
   53825             :                                 highest_ofs, pull->data_size);
   53826           0 :                         TALLOC_FREE(pull);
   53827           0 :                         PyErr_SetNdrError(err);
   53828           0 :                         return NULL;
   53829             :                 }
   53830             :         }
   53831             : 
   53832           0 :         TALLOC_FREE(pull);
   53833           0 :         Py_RETURN_NONE;
   53834             : }
   53835             : 
   53836           0 : static PyObject *py_srvsvc_NetNameValidate_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53837             : {
   53838             :         DATA_BLOB blob;
   53839           0 :         Py_ssize_t blob_length = 0;
   53840           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   53841           0 :         PyObject *bigendian_obj = NULL;
   53842           0 :         PyObject *ndr64_obj = NULL;
   53843           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   53844           0 :         PyObject *allow_remaining_obj = NULL;
   53845           0 :         bool allow_remaining = false;
   53846             : 
   53847           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   53848             :                 discard_const_p(char *, kwnames),
   53849             :                 &blob.data, &blob_length,
   53850             :                 &bigendian_obj,
   53851             :                 &ndr64_obj,
   53852             :                 &allow_remaining_obj)) {
   53853           0 :                 return NULL;
   53854             :         }
   53855           0 :         blob.length = blob_length;
   53856             : 
   53857           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53858           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   53859             :         }
   53860           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53861           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   53862             :         }
   53863             : 
   53864           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   53865           0 :                 allow_remaining = true;
   53866             :         }
   53867             : 
   53868           0 :         return py_srvsvc_NetNameValidate_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   53869             : }
   53870             : 
   53871           0 : static PyObject *py_srvsvc_NetNameValidate_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53872             : {
   53873             :         DATA_BLOB blob;
   53874           0 :         Py_ssize_t blob_length = 0;
   53875           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   53876           0 :         PyObject *bigendian_obj = NULL;
   53877           0 :         PyObject *ndr64_obj = NULL;
   53878           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   53879           0 :         PyObject *allow_remaining_obj = NULL;
   53880           0 :         bool allow_remaining = false;
   53881             : 
   53882           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   53883             :                 discard_const_p(char *, kwnames),
   53884             :                 &blob.data, &blob_length,
   53885             :                 &bigendian_obj,
   53886             :                 &ndr64_obj,
   53887             :                 &allow_remaining_obj)) {
   53888           0 :                 return NULL;
   53889             :         }
   53890           0 :         blob.length = blob_length;
   53891             : 
   53892           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53893           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   53894             :         }
   53895           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53896           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   53897             :         }
   53898             : 
   53899           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   53900           0 :                 allow_remaining = true;
   53901             :         }
   53902             : 
   53903           0 :         return py_srvsvc_NetNameValidate_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   53904             : }
   53905             : 
   53906           0 : static PyObject *py_srvsvc_NetNameValidate_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   53907             : {
   53908           0 :         const struct ndr_interface_call *call = NULL;
   53909           0 :         struct srvsvc_NetNameValidate *object = (struct srvsvc_NetNameValidate *)pytalloc_get_ptr(py_obj);
   53910             :         PyObject *ret;
   53911             :         char *retstr;
   53912             : 
   53913           0 :         if (ndr_table_srvsvc.num_calls < 34) {
   53914           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetNameValidate_ndr_print");
   53915           0 :                 return NULL;
   53916             :         }
   53917           0 :         call = &ndr_table_srvsvc.calls[33];
   53918             : 
   53919           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   53920           0 :         ret = PyUnicode_FromString(retstr);
   53921           0 :         TALLOC_FREE(retstr);
   53922             : 
   53923           0 :         return ret;
   53924             : }
   53925             : 
   53926           0 : static PyObject *py_srvsvc_NetNameValidate_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   53927             : {
   53928           0 :         return py_srvsvc_NetNameValidate_ndr_print(py_obj, "srvsvc_NetNameValidate_in", NDR_IN);
   53929             : }
   53930             : 
   53931           0 : static PyObject *py_srvsvc_NetNameValidate_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   53932             : {
   53933           0 :         return py_srvsvc_NetNameValidate_ndr_print(py_obj, "srvsvc_NetNameValidate_out", NDR_OUT);
   53934             : }
   53935             : 
   53936             : static PyMethodDef py_srvsvc_NetNameValidate_methods[] = {
   53937             :         { "opnum", (PyCFunction)py_srvsvc_NetNameValidate_ndr_opnum, METH_NOARGS|METH_CLASS,
   53938             :                 "srvsvc.NetNameValidate.opnum() -> 33 (0x21) " },
   53939             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetNameValidate_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   53940             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   53941             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetNameValidate_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   53942             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   53943             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetNameValidate_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   53944             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   53945             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetNameValidate_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   53946             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   53947             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetNameValidate_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   53948             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetNameValidate_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   53949             :         { NULL, NULL, 0, NULL }
   53950             : };
   53951             : 
   53952             : 
   53953             : static PyTypeObject srvsvc_NetNameValidate_Type = {
   53954             :         PyVarObject_HEAD_INIT(NULL, 0)
   53955             :         .tp_name = "srvsvc.NetNameValidate",
   53956             :         .tp_getset = py_srvsvc_NetNameValidate_getsetters,
   53957             :         .tp_methods = py_srvsvc_NetNameValidate_methods,
   53958             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   53959             :         .tp_new = py_srvsvc_NetNameValidate_new,
   53960             : };
   53961             : 
   53962           0 : static bool pack_py_srvsvc_NetNameValidate_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetNameValidate *r)
   53963             : {
   53964             :         PyObject *py_server_unc;
   53965             :         PyObject *py_name;
   53966             :         PyObject *py_name_type;
   53967             :         PyObject *py_flags;
   53968           0 :         const char *kwnames[] = {
   53969             :                 "server_unc", "name", "name_type", "flags", NULL
   53970             :         };
   53971             : 
   53972           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetNameValidate", discard_const_p(char *, kwnames), &py_server_unc, &py_name, &py_name_type, &py_flags)) {
   53973           0 :                 return false;
   53974             :         }
   53975             : 
   53976           0 :         if (py_server_unc == NULL) {
   53977           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   53978           0 :                 return false;
   53979             :         }
   53980           0 :         if (py_server_unc == Py_None) {
   53981           0 :                 r->in.server_unc = NULL;
   53982             :         } else {
   53983           0 :                 r->in.server_unc = NULL;
   53984             :                 {
   53985             :                         const char *test_str;
   53986             :                         const char *talloc_str;
   53987           0 :                         PyObject *unicode = NULL;
   53988           0 :                         if (PyUnicode_Check(py_server_unc)) {
   53989           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   53990           0 :                                 if (unicode == NULL) {
   53991           0 :                                         PyErr_NoMemory();
   53992           0 :                                         return false;
   53993             :                                 }
   53994           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   53995           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   53996           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   53997             :                         } else {
   53998           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   53999           0 :                                 return false;
   54000             :                         }
   54001           0 :                         talloc_str = talloc_strdup(r, test_str);
   54002           0 :                         if (unicode != NULL) {
   54003           0 :                                 Py_DECREF(unicode);
   54004             :                         }
   54005           0 :                         if (talloc_str == NULL) {
   54006           0 :                                 PyErr_NoMemory();
   54007           0 :                                 return false;
   54008             :                         }
   54009           0 :                         r->in.server_unc = talloc_str;
   54010             :                 }
   54011             :         }
   54012           0 :         if (py_name == NULL) {
   54013           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.name");
   54014           0 :                 return false;
   54015             :         }
   54016             :         {
   54017             :                 const char *test_str;
   54018             :                 const char *talloc_str;
   54019           0 :                 PyObject *unicode = NULL;
   54020           0 :                 if (PyUnicode_Check(py_name)) {
   54021           0 :                         unicode = PyUnicode_AsEncodedString(py_name, "utf-8", "ignore");
   54022           0 :                         if (unicode == NULL) {
   54023           0 :                                 PyErr_NoMemory();
   54024           0 :                                 return false;
   54025             :                         }
   54026           0 :                         test_str = PyBytes_AS_STRING(unicode);
   54027           0 :                 } else if (PyBytes_Check(py_name)) {
   54028           0 :                         test_str = PyBytes_AS_STRING(py_name);
   54029             :                 } else {
   54030           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_name)->tp_name);
   54031           0 :                         return false;
   54032             :                 }
   54033           0 :                 talloc_str = talloc_strdup(r, test_str);
   54034           0 :                 if (unicode != NULL) {
   54035           0 :                         Py_DECREF(unicode);
   54036             :                 }
   54037           0 :                 if (talloc_str == NULL) {
   54038           0 :                         PyErr_NoMemory();
   54039           0 :                         return false;
   54040             :                 }
   54041           0 :                 r->in.name = talloc_str;
   54042             :         }
   54043           0 :         if (py_name_type == NULL) {
   54044           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.name_type");
   54045           0 :                 return false;
   54046             :         }
   54047             :         {
   54048           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.name_type));
   54049           0 :                 if (PyLong_Check(py_name_type)) {
   54050             :                         unsigned long long test_var;
   54051           0 :                         test_var = PyLong_AsUnsignedLongLong(py_name_type);
   54052           0 :                         if (PyErr_Occurred() != NULL) {
   54053           0 :                                 return false;
   54054             :                         }
   54055           0 :                         if (test_var > uint_max) {
   54056           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54057             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54058           0 :                                 return false;
   54059             :                         }
   54060           0 :                         r->in.name_type = test_var;
   54061             :                 } else {
   54062           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54063             :                           PyLong_Type.tp_name);
   54064           0 :                         return false;
   54065             :                 }
   54066             :         }
   54067           0 :         if (py_flags == NULL) {
   54068           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   54069           0 :                 return false;
   54070             :         }
   54071             :         {
   54072           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   54073           0 :                 if (PyLong_Check(py_flags)) {
   54074             :                         unsigned long long test_var;
   54075           0 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   54076           0 :                         if (PyErr_Occurred() != NULL) {
   54077           0 :                                 return false;
   54078             :                         }
   54079           0 :                         if (test_var > uint_max) {
   54080           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54081             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54082           0 :                                 return false;
   54083             :                         }
   54084           0 :                         r->in.flags = test_var;
   54085             :                 } else {
   54086           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54087             :                           PyLong_Type.tp_name);
   54088           0 :                         return false;
   54089             :                 }
   54090             :         }
   54091           0 :         return true;
   54092             : }
   54093             : 
   54094           0 : static PyObject *unpack_py_srvsvc_NetNameValidate_args_out(struct srvsvc_NetNameValidate *r)
   54095             : {
   54096             :         PyObject *result;
   54097           0 :         result = Py_None;
   54098           0 :         Py_INCREF(result);
   54099           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   54100           0 :                 PyErr_SetWERROR(r->out.result);
   54101           0 :                 return NULL;
   54102             :         }
   54103             : 
   54104           0 :         return result;
   54105             : }
   54106             : 
   54107             : 
   54108           0 : static PyObject *py_srvsvc_NetPRNameCompare_in_get_server_unc(PyObject *obj, void *closure)
   54109             : {
   54110           0 :         struct srvsvc_NetPRNameCompare *object = (struct srvsvc_NetPRNameCompare *)pytalloc_get_ptr(obj);
   54111             :         PyObject *py_server_unc;
   54112           0 :         if (object->in.server_unc == NULL) {
   54113           0 :                 Py_RETURN_NONE;
   54114             :         }
   54115           0 :         if (object->in.server_unc == NULL) {
   54116           0 :                 py_server_unc = Py_None;
   54117           0 :                 Py_INCREF(py_server_unc);
   54118             :         } else {
   54119           0 :                 if (object->in.server_unc == NULL) {
   54120           0 :                         py_server_unc = Py_None;
   54121           0 :                         Py_INCREF(py_server_unc);
   54122             :                 } else {
   54123           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   54124             :                 }
   54125             :         }
   54126           0 :         return py_server_unc;
   54127             : }
   54128             : 
   54129           0 : static int py_srvsvc_NetPRNameCompare_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   54130             : {
   54131           0 :         struct srvsvc_NetPRNameCompare *object = (struct srvsvc_NetPRNameCompare *)pytalloc_get_ptr(py_obj);
   54132           0 :         if (value == NULL) {
   54133           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   54134           0 :                 return -1;
   54135             :         }
   54136           0 :         if (value == Py_None) {
   54137           0 :                 object->in.server_unc = NULL;
   54138             :         } else {
   54139           0 :                 object->in.server_unc = NULL;
   54140             :                 {
   54141             :                         const char *test_str;
   54142             :                         const char *talloc_str;
   54143           0 :                         PyObject *unicode = NULL;
   54144           0 :                         if (PyUnicode_Check(value)) {
   54145           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   54146           0 :                                 if (unicode == NULL) {
   54147           0 :                                         PyErr_NoMemory();
   54148           0 :                                         return -1;
   54149             :                                 }
   54150           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   54151           0 :                         } else if (PyBytes_Check(value)) {
   54152           0 :                                 test_str = PyBytes_AS_STRING(value);
   54153             :                         } else {
   54154           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   54155           0 :                                 return -1;
   54156             :                         }
   54157           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   54158           0 :                         if (unicode != NULL) {
   54159           0 :                                 Py_DECREF(unicode);
   54160             :                         }
   54161           0 :                         if (talloc_str == NULL) {
   54162           0 :                                 PyErr_NoMemory();
   54163           0 :                                 return -1;
   54164             :                         }
   54165           0 :                         object->in.server_unc = talloc_str;
   54166             :                 }
   54167             :         }
   54168           0 :         return 0;
   54169             : }
   54170             : 
   54171           0 : static PyObject *py_srvsvc_NetPRNameCompare_in_get_name1(PyObject *obj, void *closure)
   54172             : {
   54173           0 :         struct srvsvc_NetPRNameCompare *object = (struct srvsvc_NetPRNameCompare *)pytalloc_get_ptr(obj);
   54174             :         PyObject *py_name1;
   54175           0 :         if (object->in.name1 == NULL) {
   54176           0 :                 py_name1 = Py_None;
   54177           0 :                 Py_INCREF(py_name1);
   54178             :         } else {
   54179           0 :                 py_name1 = PyUnicode_Decode(object->in.name1, strlen(object->in.name1), "utf-8", "ignore");
   54180             :         }
   54181           0 :         return py_name1;
   54182             : }
   54183             : 
   54184           0 : static int py_srvsvc_NetPRNameCompare_in_set_name1(PyObject *py_obj, PyObject *value, void *closure)
   54185             : {
   54186           0 :         struct srvsvc_NetPRNameCompare *object = (struct srvsvc_NetPRNameCompare *)pytalloc_get_ptr(py_obj);
   54187           0 :         if (value == NULL) {
   54188           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.name1");
   54189           0 :                 return -1;
   54190             :         }
   54191             :         {
   54192             :                 const char *test_str;
   54193             :                 const char *talloc_str;
   54194           0 :                 PyObject *unicode = NULL;
   54195           0 :                 if (PyUnicode_Check(value)) {
   54196           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   54197           0 :                         if (unicode == NULL) {
   54198           0 :                                 PyErr_NoMemory();
   54199           0 :                                 return -1;
   54200             :                         }
   54201           0 :                         test_str = PyBytes_AS_STRING(unicode);
   54202           0 :                 } else if (PyBytes_Check(value)) {
   54203           0 :                         test_str = PyBytes_AS_STRING(value);
   54204             :                 } else {
   54205           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   54206           0 :                         return -1;
   54207             :                 }
   54208           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   54209           0 :                 if (unicode != NULL) {
   54210           0 :                         Py_DECREF(unicode);
   54211             :                 }
   54212           0 :                 if (talloc_str == NULL) {
   54213           0 :                         PyErr_NoMemory();
   54214           0 :                         return -1;
   54215             :                 }
   54216           0 :                 object->in.name1 = talloc_str;
   54217             :         }
   54218           0 :         return 0;
   54219             : }
   54220             : 
   54221           0 : static PyObject *py_srvsvc_NetPRNameCompare_in_get_name2(PyObject *obj, void *closure)
   54222             : {
   54223           0 :         struct srvsvc_NetPRNameCompare *object = (struct srvsvc_NetPRNameCompare *)pytalloc_get_ptr(obj);
   54224             :         PyObject *py_name2;
   54225           0 :         if (object->in.name2 == NULL) {
   54226           0 :                 py_name2 = Py_None;
   54227           0 :                 Py_INCREF(py_name2);
   54228             :         } else {
   54229           0 :                 py_name2 = PyUnicode_Decode(object->in.name2, strlen(object->in.name2), "utf-8", "ignore");
   54230             :         }
   54231           0 :         return py_name2;
   54232             : }
   54233             : 
   54234           0 : static int py_srvsvc_NetPRNameCompare_in_set_name2(PyObject *py_obj, PyObject *value, void *closure)
   54235             : {
   54236           0 :         struct srvsvc_NetPRNameCompare *object = (struct srvsvc_NetPRNameCompare *)pytalloc_get_ptr(py_obj);
   54237           0 :         if (value == NULL) {
   54238           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.name2");
   54239           0 :                 return -1;
   54240             :         }
   54241             :         {
   54242             :                 const char *test_str;
   54243             :                 const char *talloc_str;
   54244           0 :                 PyObject *unicode = NULL;
   54245           0 :                 if (PyUnicode_Check(value)) {
   54246           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   54247           0 :                         if (unicode == NULL) {
   54248           0 :                                 PyErr_NoMemory();
   54249           0 :                                 return -1;
   54250             :                         }
   54251           0 :                         test_str = PyBytes_AS_STRING(unicode);
   54252           0 :                 } else if (PyBytes_Check(value)) {
   54253           0 :                         test_str = PyBytes_AS_STRING(value);
   54254             :                 } else {
   54255           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   54256           0 :                         return -1;
   54257             :                 }
   54258           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   54259           0 :                 if (unicode != NULL) {
   54260           0 :                         Py_DECREF(unicode);
   54261             :                 }
   54262           0 :                 if (talloc_str == NULL) {
   54263           0 :                         PyErr_NoMemory();
   54264           0 :                         return -1;
   54265             :                 }
   54266           0 :                 object->in.name2 = talloc_str;
   54267             :         }
   54268           0 :         return 0;
   54269             : }
   54270             : 
   54271           0 : static PyObject *py_srvsvc_NetPRNameCompare_in_get_name_type(PyObject *obj, void *closure)
   54272             : {
   54273           0 :         struct srvsvc_NetPRNameCompare *object = (struct srvsvc_NetPRNameCompare *)pytalloc_get_ptr(obj);
   54274             :         PyObject *py_name_type;
   54275           0 :         py_name_type = PyLong_FromUnsignedLongLong((uint32_t)object->in.name_type);
   54276           0 :         return py_name_type;
   54277             : }
   54278             : 
   54279           0 : static int py_srvsvc_NetPRNameCompare_in_set_name_type(PyObject *py_obj, PyObject *value, void *closure)
   54280             : {
   54281           0 :         struct srvsvc_NetPRNameCompare *object = (struct srvsvc_NetPRNameCompare *)pytalloc_get_ptr(py_obj);
   54282           0 :         if (value == NULL) {
   54283           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.name_type");
   54284           0 :                 return -1;
   54285             :         }
   54286             :         {
   54287           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.name_type));
   54288           0 :                 if (PyLong_Check(value)) {
   54289             :                         unsigned long long test_var;
   54290           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   54291           0 :                         if (PyErr_Occurred() != NULL) {
   54292           0 :                                 return -1;
   54293             :                         }
   54294           0 :                         if (test_var > uint_max) {
   54295           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54296             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54297           0 :                                 return -1;
   54298             :                         }
   54299           0 :                         object->in.name_type = test_var;
   54300             :                 } else {
   54301           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54302             :                           PyLong_Type.tp_name);
   54303           0 :                         return -1;
   54304             :                 }
   54305             :         }
   54306           0 :         return 0;
   54307             : }
   54308             : 
   54309           0 : static PyObject *py_srvsvc_NetPRNameCompare_in_get_flags(PyObject *obj, void *closure)
   54310             : {
   54311           0 :         struct srvsvc_NetPRNameCompare *object = (struct srvsvc_NetPRNameCompare *)pytalloc_get_ptr(obj);
   54312             :         PyObject *py_flags;
   54313           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.flags);
   54314           0 :         return py_flags;
   54315             : }
   54316             : 
   54317           0 : static int py_srvsvc_NetPRNameCompare_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   54318             : {
   54319           0 :         struct srvsvc_NetPRNameCompare *object = (struct srvsvc_NetPRNameCompare *)pytalloc_get_ptr(py_obj);
   54320           0 :         if (value == NULL) {
   54321           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   54322           0 :                 return -1;
   54323             :         }
   54324             :         {
   54325           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   54326           0 :                 if (PyLong_Check(value)) {
   54327             :                         unsigned long long test_var;
   54328           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   54329           0 :                         if (PyErr_Occurred() != NULL) {
   54330           0 :                                 return -1;
   54331             :                         }
   54332           0 :                         if (test_var > uint_max) {
   54333           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54334             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54335           0 :                                 return -1;
   54336             :                         }
   54337           0 :                         object->in.flags = test_var;
   54338             :                 } else {
   54339           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54340             :                           PyLong_Type.tp_name);
   54341           0 :                         return -1;
   54342             :                 }
   54343             :         }
   54344           0 :         return 0;
   54345             : }
   54346             : 
   54347           0 : static PyObject *py_srvsvc_NetPRNameCompare_get_result(PyObject *obj, void *closure)
   54348             : {
   54349           0 :         struct srvsvc_NetPRNameCompare *object = (struct srvsvc_NetPRNameCompare *)pytalloc_get_ptr(obj);
   54350             :         PyObject *py_result;
   54351           0 :         py_result = PyErr_FromWERROR(object->out.result);
   54352           0 :         return py_result;
   54353             : }
   54354             : 
   54355           0 : static int py_srvsvc_NetPRNameCompare_set_result(PyObject *py_obj, PyObject *value, void *closure)
   54356             : {
   54357           0 :         struct srvsvc_NetPRNameCompare *object = (struct srvsvc_NetPRNameCompare *)pytalloc_get_ptr(py_obj);
   54358           0 :         if (value == NULL) {
   54359           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   54360           0 :                 return -1;
   54361             :         }
   54362           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   54363           0 :         return 0;
   54364             : }
   54365             : 
   54366             : static PyGetSetDef py_srvsvc_NetPRNameCompare_getsetters[] = {
   54367             :         {
   54368             :                 .name = discard_const_p(char, "in_server_unc"),
   54369             :                 .get = py_srvsvc_NetPRNameCompare_in_get_server_unc,
   54370             :                 .set = py_srvsvc_NetPRNameCompare_in_set_server_unc,
   54371             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   54372             :         },
   54373             :         {
   54374             :                 .name = discard_const_p(char, "in_name1"),
   54375             :                 .get = py_srvsvc_NetPRNameCompare_in_get_name1,
   54376             :                 .set = py_srvsvc_NetPRNameCompare_in_set_name1,
   54377             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   54378             :         },
   54379             :         {
   54380             :                 .name = discard_const_p(char, "in_name2"),
   54381             :                 .get = py_srvsvc_NetPRNameCompare_in_get_name2,
   54382             :                 .set = py_srvsvc_NetPRNameCompare_in_set_name2,
   54383             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   54384             :         },
   54385             :         {
   54386             :                 .name = discard_const_p(char, "in_name_type"),
   54387             :                 .get = py_srvsvc_NetPRNameCompare_in_get_name_type,
   54388             :                 .set = py_srvsvc_NetPRNameCompare_in_set_name_type,
   54389             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   54390             :         },
   54391             :         {
   54392             :                 .name = discard_const_p(char, "in_flags"),
   54393             :                 .get = py_srvsvc_NetPRNameCompare_in_get_flags,
   54394             :                 .set = py_srvsvc_NetPRNameCompare_in_set_flags,
   54395             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   54396             :         },
   54397             :         {
   54398             :                 .name = discard_const_p(char, "result"),
   54399             :                 .get = py_srvsvc_NetPRNameCompare_get_result,
   54400             :                 .set = py_srvsvc_NetPRNameCompare_set_result,
   54401             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   54402             :         },
   54403             :         { .name = NULL }
   54404             : };
   54405             : 
   54406           0 : static PyObject *py_srvsvc_NetPRNameCompare_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   54407             : {
   54408           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetPRNameCompare, type);
   54409           0 :         return self;
   54410             : }
   54411             : 
   54412           0 : static PyObject *py_srvsvc_NetPRNameCompare_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   54413             : {
   54414             : 
   54415             : 
   54416           0 :         return PyLong_FromLong(35);
   54417             : }
   54418             : 
   54419           0 : static PyObject *py_srvsvc_NetPRNameCompare_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   54420             : {
   54421           0 :         const struct ndr_interface_call *call = NULL;
   54422           0 :         struct srvsvc_NetPRNameCompare *object = (struct srvsvc_NetPRNameCompare *)pytalloc_get_ptr(py_obj);
   54423           0 :         PyObject *ret = NULL;
   54424           0 :         struct ndr_push *push = NULL;
   54425             :         DATA_BLOB blob;
   54426             :         enum ndr_err_code err;
   54427             : 
   54428           0 :         if (ndr_table_srvsvc.num_calls < 36) {
   54429           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetPRNameCompare_ndr_pack");
   54430           0 :                 return NULL;
   54431             :         }
   54432           0 :         call = &ndr_table_srvsvc.calls[35];
   54433             : 
   54434           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   54435           0 :         if (push == NULL) {
   54436           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   54437           0 :                 return NULL;
   54438             :         }
   54439             : 
   54440           0 :         push->flags |= ndr_push_flags;
   54441             : 
   54442           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   54443           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   54444           0 :                 TALLOC_FREE(push);
   54445           0 :                 PyErr_SetNdrError(err);
   54446           0 :                 return NULL;
   54447             :         }
   54448           0 :         blob = ndr_push_blob(push);
   54449           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   54450           0 :         TALLOC_FREE(push);
   54451           0 :         return ret;
   54452             : }
   54453             : 
   54454           0 : static PyObject *py_srvsvc_NetPRNameCompare_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   54455             : {
   54456           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   54457           0 :         PyObject *bigendian_obj = NULL;
   54458           0 :         PyObject *ndr64_obj = NULL;
   54459           0 :         uint32_t ndr_push_flags = 0;
   54460             : 
   54461           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   54462             :                 discard_const_p(char *, kwnames),
   54463             :                 &bigendian_obj,
   54464             :                 &ndr64_obj)) {
   54465           0 :                 return NULL;
   54466             :         }
   54467             : 
   54468           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   54469           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   54470             :         }
   54471           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   54472           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   54473             :         }
   54474             : 
   54475           0 :         return py_srvsvc_NetPRNameCompare_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   54476             : }
   54477             : 
   54478           0 : static PyObject *py_srvsvc_NetPRNameCompare_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   54479             : {
   54480           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   54481           0 :         PyObject *bigendian_obj = NULL;
   54482           0 :         PyObject *ndr64_obj = NULL;
   54483           0 :         uint32_t ndr_push_flags = 0;
   54484             : 
   54485           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   54486             :                 discard_const_p(char *, kwnames),
   54487             :                 &bigendian_obj,
   54488             :                 &ndr64_obj)) {
   54489           0 :                 return NULL;
   54490             :         }
   54491             : 
   54492           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   54493           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   54494             :         }
   54495           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   54496           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   54497             :         }
   54498             : 
   54499           0 :         return py_srvsvc_NetPRNameCompare_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   54500             : }
   54501             : 
   54502           0 : static PyObject *py_srvsvc_NetPRNameCompare_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   54503             : {
   54504           0 :         const struct ndr_interface_call *call = NULL;
   54505           0 :         struct srvsvc_NetPRNameCompare *object = (struct srvsvc_NetPRNameCompare *)pytalloc_get_ptr(py_obj);
   54506           0 :         struct ndr_pull *pull = NULL;
   54507             :         enum ndr_err_code err;
   54508             : 
   54509           0 :         if (ndr_table_srvsvc.num_calls < 36) {
   54510           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetPRNameCompare_ndr_unpack");
   54511           0 :                 return NULL;
   54512             :         }
   54513           0 :         call = &ndr_table_srvsvc.calls[35];
   54514             : 
   54515           0 :         pull = ndr_pull_init_blob(blob, object);
   54516           0 :         if (pull == NULL) {
   54517           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   54518           0 :                 return NULL;
   54519             :         }
   54520             : 
   54521           0 :         pull->flags |= ndr_pull_flags;
   54522             : 
   54523           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   54524           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   54525           0 :                 TALLOC_FREE(pull);
   54526           0 :                 PyErr_SetNdrError(err);
   54527           0 :                 return NULL;
   54528             :         }
   54529           0 :         if (!allow_remaining) {
   54530             :                 uint32_t highest_ofs;
   54531             : 
   54532           0 :                 if (pull->offset > pull->relative_highest_offset) {
   54533           0 :                         highest_ofs = pull->offset;
   54534             :                 } else {
   54535           0 :                         highest_ofs = pull->relative_highest_offset;
   54536             :                 }
   54537           0 :                 if (highest_ofs < pull->data_size) {
   54538           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   54539             :                                 "not all bytes consumed ofs[%u] size[%u]",
   54540             :                                 highest_ofs, pull->data_size);
   54541           0 :                         TALLOC_FREE(pull);
   54542           0 :                         PyErr_SetNdrError(err);
   54543           0 :                         return NULL;
   54544             :                 }
   54545             :         }
   54546             : 
   54547           0 :         TALLOC_FREE(pull);
   54548           0 :         Py_RETURN_NONE;
   54549             : }
   54550             : 
   54551           0 : static PyObject *py_srvsvc_NetPRNameCompare_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   54552             : {
   54553             :         DATA_BLOB blob;
   54554           0 :         Py_ssize_t blob_length = 0;
   54555           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   54556           0 :         PyObject *bigendian_obj = NULL;
   54557           0 :         PyObject *ndr64_obj = NULL;
   54558           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   54559           0 :         PyObject *allow_remaining_obj = NULL;
   54560           0 :         bool allow_remaining = false;
   54561             : 
   54562           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   54563             :                 discard_const_p(char *, kwnames),
   54564             :                 &blob.data, &blob_length,
   54565             :                 &bigendian_obj,
   54566             :                 &ndr64_obj,
   54567             :                 &allow_remaining_obj)) {
   54568           0 :                 return NULL;
   54569             :         }
   54570           0 :         blob.length = blob_length;
   54571             : 
   54572           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   54573           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   54574             :         }
   54575           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   54576           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   54577             :         }
   54578             : 
   54579           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   54580           0 :                 allow_remaining = true;
   54581             :         }
   54582             : 
   54583           0 :         return py_srvsvc_NetPRNameCompare_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   54584             : }
   54585             : 
   54586           0 : static PyObject *py_srvsvc_NetPRNameCompare_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   54587             : {
   54588             :         DATA_BLOB blob;
   54589           0 :         Py_ssize_t blob_length = 0;
   54590           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   54591           0 :         PyObject *bigendian_obj = NULL;
   54592           0 :         PyObject *ndr64_obj = NULL;
   54593           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   54594           0 :         PyObject *allow_remaining_obj = NULL;
   54595           0 :         bool allow_remaining = false;
   54596             : 
   54597           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   54598             :                 discard_const_p(char *, kwnames),
   54599             :                 &blob.data, &blob_length,
   54600             :                 &bigendian_obj,
   54601             :                 &ndr64_obj,
   54602             :                 &allow_remaining_obj)) {
   54603           0 :                 return NULL;
   54604             :         }
   54605           0 :         blob.length = blob_length;
   54606             : 
   54607           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   54608           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   54609             :         }
   54610           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   54611           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   54612             :         }
   54613             : 
   54614           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   54615           0 :                 allow_remaining = true;
   54616             :         }
   54617             : 
   54618           0 :         return py_srvsvc_NetPRNameCompare_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   54619             : }
   54620             : 
   54621           0 : static PyObject *py_srvsvc_NetPRNameCompare_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   54622             : {
   54623           0 :         const struct ndr_interface_call *call = NULL;
   54624           0 :         struct srvsvc_NetPRNameCompare *object = (struct srvsvc_NetPRNameCompare *)pytalloc_get_ptr(py_obj);
   54625             :         PyObject *ret;
   54626             :         char *retstr;
   54627             : 
   54628           0 :         if (ndr_table_srvsvc.num_calls < 36) {
   54629           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetPRNameCompare_ndr_print");
   54630           0 :                 return NULL;
   54631             :         }
   54632           0 :         call = &ndr_table_srvsvc.calls[35];
   54633             : 
   54634           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   54635           0 :         ret = PyUnicode_FromString(retstr);
   54636           0 :         TALLOC_FREE(retstr);
   54637             : 
   54638           0 :         return ret;
   54639             : }
   54640             : 
   54641           0 : static PyObject *py_srvsvc_NetPRNameCompare_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   54642             : {
   54643           0 :         return py_srvsvc_NetPRNameCompare_ndr_print(py_obj, "srvsvc_NetPRNameCompare_in", NDR_IN);
   54644             : }
   54645             : 
   54646           0 : static PyObject *py_srvsvc_NetPRNameCompare_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   54647             : {
   54648           0 :         return py_srvsvc_NetPRNameCompare_ndr_print(py_obj, "srvsvc_NetPRNameCompare_out", NDR_OUT);
   54649             : }
   54650             : 
   54651             : static PyMethodDef py_srvsvc_NetPRNameCompare_methods[] = {
   54652             :         { "opnum", (PyCFunction)py_srvsvc_NetPRNameCompare_ndr_opnum, METH_NOARGS|METH_CLASS,
   54653             :                 "srvsvc.NetPRNameCompare.opnum() -> 35 (0x23) " },
   54654             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPRNameCompare_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   54655             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   54656             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPRNameCompare_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   54657             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   54658             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPRNameCompare_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   54659             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   54660             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetPRNameCompare_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   54661             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   54662             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetPRNameCompare_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   54663             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetPRNameCompare_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   54664             :         { NULL, NULL, 0, NULL }
   54665             : };
   54666             : 
   54667             : 
   54668             : static PyTypeObject srvsvc_NetPRNameCompare_Type = {
   54669             :         PyVarObject_HEAD_INIT(NULL, 0)
   54670             :         .tp_name = "srvsvc.NetPRNameCompare",
   54671             :         .tp_getset = py_srvsvc_NetPRNameCompare_getsetters,
   54672             :         .tp_methods = py_srvsvc_NetPRNameCompare_methods,
   54673             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   54674             :         .tp_new = py_srvsvc_NetPRNameCompare_new,
   54675             : };
   54676             : 
   54677           0 : static bool pack_py_srvsvc_NetPRNameCompare_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetPRNameCompare *r)
   54678             : {
   54679             :         PyObject *py_server_unc;
   54680             :         PyObject *py_name1;
   54681             :         PyObject *py_name2;
   54682             :         PyObject *py_name_type;
   54683             :         PyObject *py_flags;
   54684           0 :         const char *kwnames[] = {
   54685             :                 "server_unc", "name1", "name2", "name_type", "flags", NULL
   54686             :         };
   54687             : 
   54688           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:srvsvc_NetPRNameCompare", discard_const_p(char *, kwnames), &py_server_unc, &py_name1, &py_name2, &py_name_type, &py_flags)) {
   54689           0 :                 return false;
   54690             :         }
   54691             : 
   54692           0 :         if (py_server_unc == NULL) {
   54693           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   54694           0 :                 return false;
   54695             :         }
   54696           0 :         if (py_server_unc == Py_None) {
   54697           0 :                 r->in.server_unc = NULL;
   54698             :         } else {
   54699           0 :                 r->in.server_unc = NULL;
   54700             :                 {
   54701             :                         const char *test_str;
   54702             :                         const char *talloc_str;
   54703           0 :                         PyObject *unicode = NULL;
   54704           0 :                         if (PyUnicode_Check(py_server_unc)) {
   54705           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   54706           0 :                                 if (unicode == NULL) {
   54707           0 :                                         PyErr_NoMemory();
   54708           0 :                                         return false;
   54709             :                                 }
   54710           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   54711           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   54712           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   54713             :                         } else {
   54714           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   54715           0 :                                 return false;
   54716             :                         }
   54717           0 :                         talloc_str = talloc_strdup(r, test_str);
   54718           0 :                         if (unicode != NULL) {
   54719           0 :                                 Py_DECREF(unicode);
   54720             :                         }
   54721           0 :                         if (talloc_str == NULL) {
   54722           0 :                                 PyErr_NoMemory();
   54723           0 :                                 return false;
   54724             :                         }
   54725           0 :                         r->in.server_unc = talloc_str;
   54726             :                 }
   54727             :         }
   54728           0 :         if (py_name1 == NULL) {
   54729           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.name1");
   54730           0 :                 return false;
   54731             :         }
   54732             :         {
   54733             :                 const char *test_str;
   54734             :                 const char *talloc_str;
   54735           0 :                 PyObject *unicode = NULL;
   54736           0 :                 if (PyUnicode_Check(py_name1)) {
   54737           0 :                         unicode = PyUnicode_AsEncodedString(py_name1, "utf-8", "ignore");
   54738           0 :                         if (unicode == NULL) {
   54739           0 :                                 PyErr_NoMemory();
   54740           0 :                                 return false;
   54741             :                         }
   54742           0 :                         test_str = PyBytes_AS_STRING(unicode);
   54743           0 :                 } else if (PyBytes_Check(py_name1)) {
   54744           0 :                         test_str = PyBytes_AS_STRING(py_name1);
   54745             :                 } else {
   54746           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_name1)->tp_name);
   54747           0 :                         return false;
   54748             :                 }
   54749           0 :                 talloc_str = talloc_strdup(r, test_str);
   54750           0 :                 if (unicode != NULL) {
   54751           0 :                         Py_DECREF(unicode);
   54752             :                 }
   54753           0 :                 if (talloc_str == NULL) {
   54754           0 :                         PyErr_NoMemory();
   54755           0 :                         return false;
   54756             :                 }
   54757           0 :                 r->in.name1 = talloc_str;
   54758             :         }
   54759           0 :         if (py_name2 == NULL) {
   54760           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.name2");
   54761           0 :                 return false;
   54762             :         }
   54763             :         {
   54764             :                 const char *test_str;
   54765             :                 const char *talloc_str;
   54766           0 :                 PyObject *unicode = NULL;
   54767           0 :                 if (PyUnicode_Check(py_name2)) {
   54768           0 :                         unicode = PyUnicode_AsEncodedString(py_name2, "utf-8", "ignore");
   54769           0 :                         if (unicode == NULL) {
   54770           0 :                                 PyErr_NoMemory();
   54771           0 :                                 return false;
   54772             :                         }
   54773           0 :                         test_str = PyBytes_AS_STRING(unicode);
   54774           0 :                 } else if (PyBytes_Check(py_name2)) {
   54775           0 :                         test_str = PyBytes_AS_STRING(py_name2);
   54776             :                 } else {
   54777           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_name2)->tp_name);
   54778           0 :                         return false;
   54779             :                 }
   54780           0 :                 talloc_str = talloc_strdup(r, test_str);
   54781           0 :                 if (unicode != NULL) {
   54782           0 :                         Py_DECREF(unicode);
   54783             :                 }
   54784           0 :                 if (talloc_str == NULL) {
   54785           0 :                         PyErr_NoMemory();
   54786           0 :                         return false;
   54787             :                 }
   54788           0 :                 r->in.name2 = talloc_str;
   54789             :         }
   54790           0 :         if (py_name_type == NULL) {
   54791           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.name_type");
   54792           0 :                 return false;
   54793             :         }
   54794             :         {
   54795           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.name_type));
   54796           0 :                 if (PyLong_Check(py_name_type)) {
   54797             :                         unsigned long long test_var;
   54798           0 :                         test_var = PyLong_AsUnsignedLongLong(py_name_type);
   54799           0 :                         if (PyErr_Occurred() != NULL) {
   54800           0 :                                 return false;
   54801             :                         }
   54802           0 :                         if (test_var > uint_max) {
   54803           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54804             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54805           0 :                                 return false;
   54806             :                         }
   54807           0 :                         r->in.name_type = test_var;
   54808             :                 } else {
   54809           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54810             :                           PyLong_Type.tp_name);
   54811           0 :                         return false;
   54812             :                 }
   54813             :         }
   54814           0 :         if (py_flags == NULL) {
   54815           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   54816           0 :                 return false;
   54817             :         }
   54818             :         {
   54819           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   54820           0 :                 if (PyLong_Check(py_flags)) {
   54821             :                         unsigned long long test_var;
   54822           0 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   54823           0 :                         if (PyErr_Occurred() != NULL) {
   54824           0 :                                 return false;
   54825             :                         }
   54826           0 :                         if (test_var > uint_max) {
   54827           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   54828             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54829           0 :                                 return false;
   54830             :                         }
   54831           0 :                         r->in.flags = test_var;
   54832             :                 } else {
   54833           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   54834             :                           PyLong_Type.tp_name);
   54835           0 :                         return false;
   54836             :                 }
   54837             :         }
   54838           0 :         return true;
   54839             : }
   54840             : 
   54841           0 : static PyObject *unpack_py_srvsvc_NetPRNameCompare_args_out(struct srvsvc_NetPRNameCompare *r)
   54842             : {
   54843             :         PyObject *result;
   54844           0 :         result = Py_None;
   54845           0 :         Py_INCREF(result);
   54846           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   54847           0 :                 PyErr_SetWERROR(r->out.result);
   54848           0 :                 return NULL;
   54849             :         }
   54850             : 
   54851           0 :         return result;
   54852             : }
   54853             : 
   54854             : 
   54855           0 : static PyObject *py_srvsvc_NetShareEnum_in_get_server_unc(PyObject *obj, void *closure)
   54856             : {
   54857           0 :         struct srvsvc_NetShareEnum *object = (struct srvsvc_NetShareEnum *)pytalloc_get_ptr(obj);
   54858             :         PyObject *py_server_unc;
   54859           0 :         if (object->in.server_unc == NULL) {
   54860           0 :                 Py_RETURN_NONE;
   54861             :         }
   54862           0 :         if (object->in.server_unc == NULL) {
   54863           0 :                 py_server_unc = Py_None;
   54864           0 :                 Py_INCREF(py_server_unc);
   54865             :         } else {
   54866           0 :                 if (object->in.server_unc == NULL) {
   54867           0 :                         py_server_unc = Py_None;
   54868           0 :                         Py_INCREF(py_server_unc);
   54869             :                 } else {
   54870           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   54871             :                 }
   54872             :         }
   54873           0 :         return py_server_unc;
   54874             : }
   54875             : 
   54876           0 : static int py_srvsvc_NetShareEnum_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   54877             : {
   54878           0 :         struct srvsvc_NetShareEnum *object = (struct srvsvc_NetShareEnum *)pytalloc_get_ptr(py_obj);
   54879           0 :         if (value == NULL) {
   54880           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   54881           0 :                 return -1;
   54882             :         }
   54883           0 :         if (value == Py_None) {
   54884           0 :                 object->in.server_unc = NULL;
   54885             :         } else {
   54886           0 :                 object->in.server_unc = NULL;
   54887             :                 {
   54888             :                         const char *test_str;
   54889             :                         const char *talloc_str;
   54890           0 :                         PyObject *unicode = NULL;
   54891           0 :                         if (PyUnicode_Check(value)) {
   54892           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   54893           0 :                                 if (unicode == NULL) {
   54894           0 :                                         PyErr_NoMemory();
   54895           0 :                                         return -1;
   54896             :                                 }
   54897           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   54898           0 :                         } else if (PyBytes_Check(value)) {
   54899           0 :                                 test_str = PyBytes_AS_STRING(value);
   54900             :                         } else {
   54901           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   54902           0 :                                 return -1;
   54903             :                         }
   54904           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   54905           0 :                         if (unicode != NULL) {
   54906           0 :                                 Py_DECREF(unicode);
   54907             :                         }
   54908           0 :                         if (talloc_str == NULL) {
   54909           0 :                                 PyErr_NoMemory();
   54910           0 :                                 return -1;
   54911             :                         }
   54912           0 :                         object->in.server_unc = talloc_str;
   54913             :                 }
   54914             :         }
   54915           0 :         return 0;
   54916             : }
   54917             : 
   54918           0 : static PyObject *py_srvsvc_NetShareEnum_in_get_info_ctr(PyObject *obj, void *closure)
   54919             : {
   54920           0 :         struct srvsvc_NetShareEnum *object = (struct srvsvc_NetShareEnum *)pytalloc_get_ptr(obj);
   54921             :         PyObject *py_info_ctr;
   54922           0 :         if (object->in.info_ctr == NULL) {
   54923           0 :                 Py_RETURN_NONE;
   54924             :         }
   54925           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetShareInfoCtr_Type, object->in.info_ctr, object->in.info_ctr);
   54926           0 :         return py_info_ctr;
   54927             : }
   54928             : 
   54929           0 : static int py_srvsvc_NetShareEnum_in_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   54930             : {
   54931           0 :         struct srvsvc_NetShareEnum *object = (struct srvsvc_NetShareEnum *)pytalloc_get_ptr(py_obj);
   54932           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.info_ctr));
   54933           0 :         if (value == NULL) {
   54934           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.info_ctr");
   54935           0 :                 return -1;
   54936             :         }
   54937           0 :         object->in.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.info_ctr);
   54938           0 :         if (object->in.info_ctr == NULL) {
   54939           0 :                 PyErr_NoMemory();
   54940           0 :                 return -1;
   54941             :         }
   54942           0 :         PY_CHECK_TYPE(&srvsvc_NetShareInfoCtr_Type, value, return -1;);
   54943           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   54944           0 :                 PyErr_NoMemory();
   54945           0 :                 return -1;
   54946             :         }
   54947           0 :         object->in.info_ctr = (struct srvsvc_NetShareInfoCtr *)pytalloc_get_ptr(value);
   54948           0 :         return 0;
   54949             : }
   54950             : 
   54951           0 : static PyObject *py_srvsvc_NetShareEnum_out_get_info_ctr(PyObject *obj, void *closure)
   54952             : {
   54953           0 :         struct srvsvc_NetShareEnum *object = (struct srvsvc_NetShareEnum *)pytalloc_get_ptr(obj);
   54954             :         PyObject *py_info_ctr;
   54955           0 :         if (object->out.info_ctr == NULL) {
   54956           0 :                 Py_RETURN_NONE;
   54957             :         }
   54958           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetShareInfoCtr_Type, object->out.info_ctr, object->out.info_ctr);
   54959           0 :         return py_info_ctr;
   54960             : }
   54961             : 
   54962           0 : static int py_srvsvc_NetShareEnum_out_set_info_ctr(PyObject *py_obj, PyObject *value, void *closure)
   54963             : {
   54964           0 :         struct srvsvc_NetShareEnum *object = (struct srvsvc_NetShareEnum *)pytalloc_get_ptr(py_obj);
   54965           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info_ctr));
   54966           0 :         if (value == NULL) {
   54967           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info_ctr");
   54968           0 :                 return -1;
   54969             :         }
   54970           0 :         object->out.info_ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info_ctr);
   54971           0 :         if (object->out.info_ctr == NULL) {
   54972           0 :                 PyErr_NoMemory();
   54973           0 :                 return -1;
   54974             :         }
   54975           0 :         PY_CHECK_TYPE(&srvsvc_NetShareInfoCtr_Type, value, return -1;);
   54976           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   54977           0 :                 PyErr_NoMemory();
   54978           0 :                 return -1;
   54979             :         }
   54980           0 :         object->out.info_ctr = (struct srvsvc_NetShareInfoCtr *)pytalloc_get_ptr(value);
   54981           0 :         return 0;
   54982             : }
   54983             : 
   54984           0 : static PyObject *py_srvsvc_NetShareEnum_in_get_max_buffer(PyObject *obj, void *closure)
   54985             : {
   54986           0 :         struct srvsvc_NetShareEnum *object = (struct srvsvc_NetShareEnum *)pytalloc_get_ptr(obj);
   54987             :         PyObject *py_max_buffer;
   54988           0 :         py_max_buffer = PyLong_FromUnsignedLongLong((uint32_t)object->in.max_buffer);
   54989           0 :         return py_max_buffer;
   54990             : }
   54991             : 
   54992           0 : static int py_srvsvc_NetShareEnum_in_set_max_buffer(PyObject *py_obj, PyObject *value, void *closure)
   54993             : {
   54994           0 :         struct srvsvc_NetShareEnum *object = (struct srvsvc_NetShareEnum *)pytalloc_get_ptr(py_obj);
   54995           0 :         if (value == NULL) {
   54996           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.max_buffer");
   54997           0 :                 return -1;
   54998             :         }
   54999             :         {
   55000           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.max_buffer));
   55001           0 :                 if (PyLong_Check(value)) {
   55002             :                         unsigned long long test_var;
   55003           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   55004           0 :                         if (PyErr_Occurred() != NULL) {
   55005           0 :                                 return -1;
   55006             :                         }
   55007           0 :                         if (test_var > uint_max) {
   55008           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   55009             :                                   PyLong_Type.tp_name, uint_max, test_var);
   55010           0 :                                 return -1;
   55011             :                         }
   55012           0 :                         object->in.max_buffer = test_var;
   55013             :                 } else {
   55014           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   55015             :                           PyLong_Type.tp_name);
   55016           0 :                         return -1;
   55017             :                 }
   55018             :         }
   55019           0 :         return 0;
   55020             : }
   55021             : 
   55022           0 : static PyObject *py_srvsvc_NetShareEnum_out_get_totalentries(PyObject *obj, void *closure)
   55023             : {
   55024           0 :         struct srvsvc_NetShareEnum *object = (struct srvsvc_NetShareEnum *)pytalloc_get_ptr(obj);
   55025             :         PyObject *py_totalentries;
   55026           0 :         if (object->out.totalentries == NULL) {
   55027           0 :                 Py_RETURN_NONE;
   55028             :         }
   55029           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)*object->out.totalentries);
   55030           0 :         return py_totalentries;
   55031             : }
   55032             : 
   55033           0 : static int py_srvsvc_NetShareEnum_out_set_totalentries(PyObject *py_obj, PyObject *value, void *closure)
   55034             : {
   55035           0 :         struct srvsvc_NetShareEnum *object = (struct srvsvc_NetShareEnum *)pytalloc_get_ptr(py_obj);
   55036           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.totalentries));
   55037           0 :         if (value == NULL) {
   55038           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.totalentries");
   55039           0 :                 return -1;
   55040             :         }
   55041           0 :         object->out.totalentries = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.totalentries);
   55042           0 :         if (object->out.totalentries == NULL) {
   55043           0 :                 PyErr_NoMemory();
   55044           0 :                 return -1;
   55045             :         }
   55046             :         {
   55047           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.totalentries));
   55048           0 :                 if (PyLong_Check(value)) {
   55049             :                         unsigned long long test_var;
   55050           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   55051           0 :                         if (PyErr_Occurred() != NULL) {
   55052           0 :                                 return -1;
   55053             :                         }
   55054           0 :                         if (test_var > uint_max) {
   55055           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   55056             :                                   PyLong_Type.tp_name, uint_max, test_var);
   55057           0 :                                 return -1;
   55058             :                         }
   55059           0 :                         *object->out.totalentries = test_var;
   55060             :                 } else {
   55061           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   55062             :                           PyLong_Type.tp_name);
   55063           0 :                         return -1;
   55064             :                 }
   55065             :         }
   55066           0 :         return 0;
   55067             : }
   55068             : 
   55069           0 : static PyObject *py_srvsvc_NetShareEnum_in_get_resume_handle(PyObject *obj, void *closure)
   55070             : {
   55071           0 :         struct srvsvc_NetShareEnum *object = (struct srvsvc_NetShareEnum *)pytalloc_get_ptr(obj);
   55072             :         PyObject *py_resume_handle;
   55073           0 :         if (object->in.resume_handle == NULL) {
   55074           0 :                 Py_RETURN_NONE;
   55075             :         }
   55076           0 :         if (object->in.resume_handle == NULL) {
   55077           0 :                 py_resume_handle = Py_None;
   55078           0 :                 Py_INCREF(py_resume_handle);
   55079             :         } else {
   55080           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)*object->in.resume_handle);
   55081             :         }
   55082           0 :         return py_resume_handle;
   55083             : }
   55084             : 
   55085           0 : static int py_srvsvc_NetShareEnum_in_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   55086             : {
   55087           0 :         struct srvsvc_NetShareEnum *object = (struct srvsvc_NetShareEnum *)pytalloc_get_ptr(py_obj);
   55088           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.resume_handle));
   55089           0 :         if (value == NULL) {
   55090           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.resume_handle");
   55091           0 :                 return -1;
   55092             :         }
   55093           0 :         if (value == Py_None) {
   55094           0 :                 object->in.resume_handle = NULL;
   55095             :         } else {
   55096           0 :                 object->in.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.resume_handle);
   55097           0 :                 if (object->in.resume_handle == NULL) {
   55098           0 :                         PyErr_NoMemory();
   55099           0 :                         return -1;
   55100             :                 }
   55101             :                 {
   55102           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.resume_handle));
   55103           0 :                         if (PyLong_Check(value)) {
   55104             :                                 unsigned long long test_var;
   55105           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   55106           0 :                                 if (PyErr_Occurred() != NULL) {
   55107           0 :                                         return -1;
   55108             :                                 }
   55109           0 :                                 if (test_var > uint_max) {
   55110           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   55111             :                                           PyLong_Type.tp_name, uint_max, test_var);
   55112           0 :                                         return -1;
   55113             :                                 }
   55114           0 :                                 *object->in.resume_handle = test_var;
   55115             :                         } else {
   55116           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   55117             :                                   PyLong_Type.tp_name);
   55118           0 :                                 return -1;
   55119             :                         }
   55120             :                 }
   55121             :         }
   55122           0 :         return 0;
   55123             : }
   55124             : 
   55125           0 : static PyObject *py_srvsvc_NetShareEnum_out_get_resume_handle(PyObject *obj, void *closure)
   55126             : {
   55127           0 :         struct srvsvc_NetShareEnum *object = (struct srvsvc_NetShareEnum *)pytalloc_get_ptr(obj);
   55128             :         PyObject *py_resume_handle;
   55129           0 :         if (object->out.resume_handle == NULL) {
   55130           0 :                 Py_RETURN_NONE;
   55131             :         }
   55132           0 :         if (object->out.resume_handle == NULL) {
   55133           0 :                 py_resume_handle = Py_None;
   55134           0 :                 Py_INCREF(py_resume_handle);
   55135             :         } else {
   55136           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)*object->out.resume_handle);
   55137             :         }
   55138           0 :         return py_resume_handle;
   55139             : }
   55140             : 
   55141           0 : static int py_srvsvc_NetShareEnum_out_set_resume_handle(PyObject *py_obj, PyObject *value, void *closure)
   55142             : {
   55143           0 :         struct srvsvc_NetShareEnum *object = (struct srvsvc_NetShareEnum *)pytalloc_get_ptr(py_obj);
   55144           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.resume_handle));
   55145           0 :         if (value == NULL) {
   55146           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.resume_handle");
   55147           0 :                 return -1;
   55148             :         }
   55149           0 :         if (value == Py_None) {
   55150           0 :                 object->out.resume_handle = NULL;
   55151             :         } else {
   55152           0 :                 object->out.resume_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.resume_handle);
   55153           0 :                 if (object->out.resume_handle == NULL) {
   55154           0 :                         PyErr_NoMemory();
   55155           0 :                         return -1;
   55156             :                 }
   55157             :                 {
   55158           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.resume_handle));
   55159           0 :                         if (PyLong_Check(value)) {
   55160             :                                 unsigned long long test_var;
   55161           0 :                                 test_var = PyLong_AsUnsignedLongLong(value);
   55162           0 :                                 if (PyErr_Occurred() != NULL) {
   55163           0 :                                         return -1;
   55164             :                                 }
   55165           0 :                                 if (test_var > uint_max) {
   55166           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   55167             :                                           PyLong_Type.tp_name, uint_max, test_var);
   55168           0 :                                         return -1;
   55169             :                                 }
   55170           0 :                                 *object->out.resume_handle = test_var;
   55171             :                         } else {
   55172           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   55173             :                                   PyLong_Type.tp_name);
   55174           0 :                                 return -1;
   55175             :                         }
   55176             :                 }
   55177             :         }
   55178           0 :         return 0;
   55179             : }
   55180             : 
   55181           0 : static PyObject *py_srvsvc_NetShareEnum_get_result(PyObject *obj, void *closure)
   55182             : {
   55183           0 :         struct srvsvc_NetShareEnum *object = (struct srvsvc_NetShareEnum *)pytalloc_get_ptr(obj);
   55184             :         PyObject *py_result;
   55185           0 :         py_result = PyErr_FromWERROR(object->out.result);
   55186           0 :         return py_result;
   55187             : }
   55188             : 
   55189           0 : static int py_srvsvc_NetShareEnum_set_result(PyObject *py_obj, PyObject *value, void *closure)
   55190             : {
   55191           0 :         struct srvsvc_NetShareEnum *object = (struct srvsvc_NetShareEnum *)pytalloc_get_ptr(py_obj);
   55192           0 :         if (value == NULL) {
   55193           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   55194           0 :                 return -1;
   55195             :         }
   55196           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   55197           0 :         return 0;
   55198             : }
   55199             : 
   55200             : static PyGetSetDef py_srvsvc_NetShareEnum_getsetters[] = {
   55201             :         {
   55202             :                 .name = discard_const_p(char, "in_server_unc"),
   55203             :                 .get = py_srvsvc_NetShareEnum_in_get_server_unc,
   55204             :                 .set = py_srvsvc_NetShareEnum_in_set_server_unc,
   55205             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   55206             :         },
   55207             :         {
   55208             :                 .name = discard_const_p(char, "in_info_ctr"),
   55209             :                 .get = py_srvsvc_NetShareEnum_in_get_info_ctr,
   55210             :                 .set = py_srvsvc_NetShareEnum_in_set_info_ctr,
   55211             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfoCtr")
   55212             :         },
   55213             :         {
   55214             :                 .name = discard_const_p(char, "out_info_ctr"),
   55215             :                 .get = py_srvsvc_NetShareEnum_out_get_info_ctr,
   55216             :                 .set = py_srvsvc_NetShareEnum_out_set_info_ctr,
   55217             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetShareInfoCtr")
   55218             :         },
   55219             :         {
   55220             :                 .name = discard_const_p(char, "in_max_buffer"),
   55221             :                 .get = py_srvsvc_NetShareEnum_in_get_max_buffer,
   55222             :                 .set = py_srvsvc_NetShareEnum_in_set_max_buffer,
   55223             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   55224             :         },
   55225             :         {
   55226             :                 .name = discard_const_p(char, "out_totalentries"),
   55227             :                 .get = py_srvsvc_NetShareEnum_out_get_totalentries,
   55228             :                 .set = py_srvsvc_NetShareEnum_out_set_totalentries,
   55229             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   55230             :         },
   55231             :         {
   55232             :                 .name = discard_const_p(char, "in_resume_handle"),
   55233             :                 .get = py_srvsvc_NetShareEnum_in_get_resume_handle,
   55234             :                 .set = py_srvsvc_NetShareEnum_in_set_resume_handle,
   55235             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   55236             :         },
   55237             :         {
   55238             :                 .name = discard_const_p(char, "out_resume_handle"),
   55239             :                 .get = py_srvsvc_NetShareEnum_out_get_resume_handle,
   55240             :                 .set = py_srvsvc_NetShareEnum_out_set_resume_handle,
   55241             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   55242             :         },
   55243             :         {
   55244             :                 .name = discard_const_p(char, "result"),
   55245             :                 .get = py_srvsvc_NetShareEnum_get_result,
   55246             :                 .set = py_srvsvc_NetShareEnum_set_result,
   55247             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   55248             :         },
   55249             :         { .name = NULL }
   55250             : };
   55251             : 
   55252           0 : static PyObject *py_srvsvc_NetShareEnum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   55253             : {
   55254           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetShareEnum, type);
   55255           0 :         struct srvsvc_NetShareEnum *_self = (struct srvsvc_NetShareEnum *)pytalloc_get_ptr(self);
   55256           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   55257           0 :         _self->in.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetShareInfoCtr);
   55258           0 :         _self->out.info_ctr = talloc_zero(mem_ctx, struct srvsvc_NetShareInfoCtr);
   55259           0 :         _self->out.totalentries = talloc_zero(mem_ctx, uint32_t);
   55260           0 :         return self;
   55261             : }
   55262             : 
   55263           0 : static PyObject *py_srvsvc_NetShareEnum_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   55264             : {
   55265             : 
   55266             : 
   55267           0 :         return PyLong_FromLong(36);
   55268             : }
   55269             : 
   55270           0 : static PyObject *py_srvsvc_NetShareEnum_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   55271             : {
   55272           0 :         const struct ndr_interface_call *call = NULL;
   55273           0 :         struct srvsvc_NetShareEnum *object = (struct srvsvc_NetShareEnum *)pytalloc_get_ptr(py_obj);
   55274           0 :         PyObject *ret = NULL;
   55275           0 :         struct ndr_push *push = NULL;
   55276             :         DATA_BLOB blob;
   55277             :         enum ndr_err_code err;
   55278             : 
   55279           0 :         if (ndr_table_srvsvc.num_calls < 37) {
   55280           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareEnum_ndr_pack");
   55281           0 :                 return NULL;
   55282             :         }
   55283           0 :         call = &ndr_table_srvsvc.calls[36];
   55284             : 
   55285           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   55286           0 :         if (push == NULL) {
   55287           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   55288           0 :                 return NULL;
   55289             :         }
   55290             : 
   55291           0 :         push->flags |= ndr_push_flags;
   55292             : 
   55293           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   55294           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   55295           0 :                 TALLOC_FREE(push);
   55296           0 :                 PyErr_SetNdrError(err);
   55297           0 :                 return NULL;
   55298             :         }
   55299           0 :         blob = ndr_push_blob(push);
   55300           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   55301           0 :         TALLOC_FREE(push);
   55302           0 :         return ret;
   55303             : }
   55304             : 
   55305           0 : static PyObject *py_srvsvc_NetShareEnum_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55306             : {
   55307           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   55308           0 :         PyObject *bigendian_obj = NULL;
   55309           0 :         PyObject *ndr64_obj = NULL;
   55310           0 :         uint32_t ndr_push_flags = 0;
   55311             : 
   55312           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   55313             :                 discard_const_p(char *, kwnames),
   55314             :                 &bigendian_obj,
   55315             :                 &ndr64_obj)) {
   55316           0 :                 return NULL;
   55317             :         }
   55318             : 
   55319           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55320           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   55321             :         }
   55322           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55323           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   55324             :         }
   55325             : 
   55326           0 :         return py_srvsvc_NetShareEnum_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   55327             : }
   55328             : 
   55329           0 : static PyObject *py_srvsvc_NetShareEnum_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55330             : {
   55331           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   55332           0 :         PyObject *bigendian_obj = NULL;
   55333           0 :         PyObject *ndr64_obj = NULL;
   55334           0 :         uint32_t ndr_push_flags = 0;
   55335             : 
   55336           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   55337             :                 discard_const_p(char *, kwnames),
   55338             :                 &bigendian_obj,
   55339             :                 &ndr64_obj)) {
   55340           0 :                 return NULL;
   55341             :         }
   55342             : 
   55343           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55344           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   55345             :         }
   55346           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55347           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   55348             :         }
   55349             : 
   55350           0 :         return py_srvsvc_NetShareEnum_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   55351             : }
   55352             : 
   55353           0 : static PyObject *py_srvsvc_NetShareEnum_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   55354             : {
   55355           0 :         const struct ndr_interface_call *call = NULL;
   55356           0 :         struct srvsvc_NetShareEnum *object = (struct srvsvc_NetShareEnum *)pytalloc_get_ptr(py_obj);
   55357           0 :         struct ndr_pull *pull = NULL;
   55358             :         enum ndr_err_code err;
   55359             : 
   55360           0 :         if (ndr_table_srvsvc.num_calls < 37) {
   55361           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareEnum_ndr_unpack");
   55362           0 :                 return NULL;
   55363             :         }
   55364           0 :         call = &ndr_table_srvsvc.calls[36];
   55365             : 
   55366           0 :         pull = ndr_pull_init_blob(blob, object);
   55367           0 :         if (pull == NULL) {
   55368           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   55369           0 :                 return NULL;
   55370             :         }
   55371             : 
   55372           0 :         pull->flags |= ndr_pull_flags;
   55373             : 
   55374           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   55375           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   55376           0 :                 TALLOC_FREE(pull);
   55377           0 :                 PyErr_SetNdrError(err);
   55378           0 :                 return NULL;
   55379             :         }
   55380           0 :         if (!allow_remaining) {
   55381             :                 uint32_t highest_ofs;
   55382             : 
   55383           0 :                 if (pull->offset > pull->relative_highest_offset) {
   55384           0 :                         highest_ofs = pull->offset;
   55385             :                 } else {
   55386           0 :                         highest_ofs = pull->relative_highest_offset;
   55387             :                 }
   55388           0 :                 if (highest_ofs < pull->data_size) {
   55389           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   55390             :                                 "not all bytes consumed ofs[%u] size[%u]",
   55391             :                                 highest_ofs, pull->data_size);
   55392           0 :                         TALLOC_FREE(pull);
   55393           0 :                         PyErr_SetNdrError(err);
   55394           0 :                         return NULL;
   55395             :                 }
   55396             :         }
   55397             : 
   55398           0 :         TALLOC_FREE(pull);
   55399           0 :         Py_RETURN_NONE;
   55400             : }
   55401             : 
   55402           0 : static PyObject *py_srvsvc_NetShareEnum_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55403             : {
   55404             :         DATA_BLOB blob;
   55405           0 :         Py_ssize_t blob_length = 0;
   55406           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   55407           0 :         PyObject *bigendian_obj = NULL;
   55408           0 :         PyObject *ndr64_obj = NULL;
   55409           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   55410           0 :         PyObject *allow_remaining_obj = NULL;
   55411           0 :         bool allow_remaining = false;
   55412             : 
   55413           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   55414             :                 discard_const_p(char *, kwnames),
   55415             :                 &blob.data, &blob_length,
   55416             :                 &bigendian_obj,
   55417             :                 &ndr64_obj,
   55418             :                 &allow_remaining_obj)) {
   55419           0 :                 return NULL;
   55420             :         }
   55421           0 :         blob.length = blob_length;
   55422             : 
   55423           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55424           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   55425             :         }
   55426           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55427           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   55428             :         }
   55429             : 
   55430           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   55431           0 :                 allow_remaining = true;
   55432             :         }
   55433             : 
   55434           0 :         return py_srvsvc_NetShareEnum_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   55435             : }
   55436             : 
   55437           0 : static PyObject *py_srvsvc_NetShareEnum_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55438             : {
   55439             :         DATA_BLOB blob;
   55440           0 :         Py_ssize_t blob_length = 0;
   55441           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   55442           0 :         PyObject *bigendian_obj = NULL;
   55443           0 :         PyObject *ndr64_obj = NULL;
   55444           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   55445           0 :         PyObject *allow_remaining_obj = NULL;
   55446           0 :         bool allow_remaining = false;
   55447             : 
   55448           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   55449             :                 discard_const_p(char *, kwnames),
   55450             :                 &blob.data, &blob_length,
   55451             :                 &bigendian_obj,
   55452             :                 &ndr64_obj,
   55453             :                 &allow_remaining_obj)) {
   55454           0 :                 return NULL;
   55455             :         }
   55456           0 :         blob.length = blob_length;
   55457             : 
   55458           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55459           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   55460             :         }
   55461           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55462           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   55463             :         }
   55464             : 
   55465           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   55466           0 :                 allow_remaining = true;
   55467             :         }
   55468             : 
   55469           0 :         return py_srvsvc_NetShareEnum_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   55470             : }
   55471             : 
   55472           0 : static PyObject *py_srvsvc_NetShareEnum_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   55473             : {
   55474           0 :         const struct ndr_interface_call *call = NULL;
   55475           0 :         struct srvsvc_NetShareEnum *object = (struct srvsvc_NetShareEnum *)pytalloc_get_ptr(py_obj);
   55476             :         PyObject *ret;
   55477             :         char *retstr;
   55478             : 
   55479           0 :         if (ndr_table_srvsvc.num_calls < 37) {
   55480           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareEnum_ndr_print");
   55481           0 :                 return NULL;
   55482             :         }
   55483           0 :         call = &ndr_table_srvsvc.calls[36];
   55484             : 
   55485           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   55486           0 :         ret = PyUnicode_FromString(retstr);
   55487           0 :         TALLOC_FREE(retstr);
   55488             : 
   55489           0 :         return ret;
   55490             : }
   55491             : 
   55492           0 : static PyObject *py_srvsvc_NetShareEnum_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   55493             : {
   55494           0 :         return py_srvsvc_NetShareEnum_ndr_print(py_obj, "srvsvc_NetShareEnum_in", NDR_IN);
   55495             : }
   55496             : 
   55497           0 : static PyObject *py_srvsvc_NetShareEnum_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   55498             : {
   55499           0 :         return py_srvsvc_NetShareEnum_ndr_print(py_obj, "srvsvc_NetShareEnum_out", NDR_OUT);
   55500             : }
   55501             : 
   55502             : static PyMethodDef py_srvsvc_NetShareEnum_methods[] = {
   55503             :         { "opnum", (PyCFunction)py_srvsvc_NetShareEnum_ndr_opnum, METH_NOARGS|METH_CLASS,
   55504             :                 "srvsvc.NetShareEnum.opnum() -> 36 (0x24) " },
   55505             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareEnum_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   55506             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   55507             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareEnum_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   55508             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   55509             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareEnum_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   55510             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   55511             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareEnum_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   55512             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   55513             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetShareEnum_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   55514             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetShareEnum_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   55515             :         { NULL, NULL, 0, NULL }
   55516             : };
   55517             : 
   55518             : 
   55519             : static PyTypeObject srvsvc_NetShareEnum_Type = {
   55520             :         PyVarObject_HEAD_INIT(NULL, 0)
   55521             :         .tp_name = "srvsvc.NetShareEnum",
   55522             :         .tp_getset = py_srvsvc_NetShareEnum_getsetters,
   55523             :         .tp_methods = py_srvsvc_NetShareEnum_methods,
   55524             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   55525             :         .tp_new = py_srvsvc_NetShareEnum_new,
   55526             : };
   55527             : 
   55528           0 : static bool pack_py_srvsvc_NetShareEnum_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareEnum *r)
   55529             : {
   55530             :         PyObject *py_server_unc;
   55531             :         PyObject *py_info_ctr;
   55532             :         PyObject *py_max_buffer;
   55533             :         PyObject *py_resume_handle;
   55534           0 :         const char *kwnames[] = {
   55535             :                 "server_unc", "info_ctr", "max_buffer", "resume_handle", NULL
   55536             :         };
   55537             : 
   55538           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetShareEnum", discard_const_p(char *, kwnames), &py_server_unc, &py_info_ctr, &py_max_buffer, &py_resume_handle)) {
   55539           0 :                 return false;
   55540             :         }
   55541             : 
   55542           0 :         if (py_server_unc == NULL) {
   55543           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   55544           0 :                 return false;
   55545             :         }
   55546           0 :         if (py_server_unc == Py_None) {
   55547           0 :                 r->in.server_unc = NULL;
   55548             :         } else {
   55549           0 :                 r->in.server_unc = NULL;
   55550             :                 {
   55551             :                         const char *test_str;
   55552             :                         const char *talloc_str;
   55553           0 :                         PyObject *unicode = NULL;
   55554           0 :                         if (PyUnicode_Check(py_server_unc)) {
   55555           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   55556           0 :                                 if (unicode == NULL) {
   55557           0 :                                         PyErr_NoMemory();
   55558           0 :                                         return false;
   55559             :                                 }
   55560           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   55561           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   55562           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   55563             :                         } else {
   55564           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   55565           0 :                                 return false;
   55566             :                         }
   55567           0 :                         talloc_str = talloc_strdup(r, test_str);
   55568           0 :                         if (unicode != NULL) {
   55569           0 :                                 Py_DECREF(unicode);
   55570             :                         }
   55571           0 :                         if (talloc_str == NULL) {
   55572           0 :                                 PyErr_NoMemory();
   55573           0 :                                 return false;
   55574             :                         }
   55575           0 :                         r->in.server_unc = talloc_str;
   55576             :                 }
   55577             :         }
   55578           0 :         if (py_info_ctr == NULL) {
   55579           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info_ctr");
   55580           0 :                 return false;
   55581             :         }
   55582           0 :         r->in.info_ctr = talloc_ptrtype(r, r->in.info_ctr);
   55583           0 :         if (r->in.info_ctr == NULL) {
   55584           0 :                 PyErr_NoMemory();
   55585           0 :                 return false;
   55586             :         }
   55587           0 :         PY_CHECK_TYPE(&srvsvc_NetShareInfoCtr_Type, py_info_ctr, return false;);
   55588           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_info_ctr)) == NULL) {
   55589           0 :                 PyErr_NoMemory();
   55590           0 :                 return false;
   55591             :         }
   55592           0 :         r->in.info_ctr = (struct srvsvc_NetShareInfoCtr *)pytalloc_get_ptr(py_info_ctr);
   55593           0 :         if (py_max_buffer == NULL) {
   55594           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.max_buffer");
   55595           0 :                 return false;
   55596             :         }
   55597             :         {
   55598           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.max_buffer));
   55599           0 :                 if (PyLong_Check(py_max_buffer)) {
   55600             :                         unsigned long long test_var;
   55601           0 :                         test_var = PyLong_AsUnsignedLongLong(py_max_buffer);
   55602           0 :                         if (PyErr_Occurred() != NULL) {
   55603           0 :                                 return false;
   55604             :                         }
   55605           0 :                         if (test_var > uint_max) {
   55606           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   55607             :                                   PyLong_Type.tp_name, uint_max, test_var);
   55608           0 :                                 return false;
   55609             :                         }
   55610           0 :                         r->in.max_buffer = test_var;
   55611             :                 } else {
   55612           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   55613             :                           PyLong_Type.tp_name);
   55614           0 :                         return false;
   55615             :                 }
   55616             :         }
   55617           0 :         if (py_resume_handle == NULL) {
   55618           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.resume_handle");
   55619           0 :                 return false;
   55620             :         }
   55621           0 :         if (py_resume_handle == Py_None) {
   55622           0 :                 r->in.resume_handle = NULL;
   55623             :         } else {
   55624           0 :                 r->in.resume_handle = talloc_ptrtype(r, r->in.resume_handle);
   55625           0 :                 if (r->in.resume_handle == NULL) {
   55626           0 :                         PyErr_NoMemory();
   55627           0 :                         return false;
   55628             :                 }
   55629             :                 {
   55630           0 :                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.resume_handle));
   55631           0 :                         if (PyLong_Check(py_resume_handle)) {
   55632             :                                 unsigned long long test_var;
   55633           0 :                                 test_var = PyLong_AsUnsignedLongLong(py_resume_handle);
   55634           0 :                                 if (PyErr_Occurred() != NULL) {
   55635           0 :                                         return false;
   55636             :                                 }
   55637           0 :                                 if (test_var > uint_max) {
   55638           0 :                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   55639             :                                           PyLong_Type.tp_name, uint_max, test_var);
   55640           0 :                                         return false;
   55641             :                                 }
   55642           0 :                                 *r->in.resume_handle = test_var;
   55643             :                         } else {
   55644           0 :                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   55645             :                                   PyLong_Type.tp_name);
   55646           0 :                                 return false;
   55647             :                         }
   55648             :                 }
   55649             :         }
   55650           0 :         return true;
   55651             : }
   55652             : 
   55653           0 : static PyObject *unpack_py_srvsvc_NetShareEnum_args_out(struct srvsvc_NetShareEnum *r)
   55654             : {
   55655             :         PyObject *result;
   55656             :         PyObject *py_info_ctr;
   55657             :         PyObject *py_totalentries;
   55658             :         PyObject *py_resume_handle;
   55659           0 :         result = PyTuple_New(3);
   55660           0 :         py_info_ctr = pytalloc_reference_ex(&srvsvc_NetShareInfoCtr_Type, r->out.info_ctr, r->out.info_ctr);
   55661           0 :         PyTuple_SetItem(result, 0, py_info_ctr);
   55662           0 :         py_totalentries = PyLong_FromUnsignedLongLong((uint32_t)*r->out.totalentries);
   55663           0 :         PyTuple_SetItem(result, 1, py_totalentries);
   55664           0 :         if (r->out.resume_handle == NULL) {
   55665           0 :                 py_resume_handle = Py_None;
   55666           0 :                 Py_INCREF(py_resume_handle);
   55667             :         } else {
   55668           0 :                 py_resume_handle = PyLong_FromUnsignedLongLong((uint32_t)*r->out.resume_handle);
   55669             :         }
   55670           0 :         PyTuple_SetItem(result, 2, py_resume_handle);
   55671           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   55672           0 :                 PyErr_SetWERROR(r->out.result);
   55673           0 :                 return NULL;
   55674             :         }
   55675             : 
   55676           0 :         return result;
   55677             : }
   55678             : 
   55679             : 
   55680           0 : static PyObject *py_srvsvc_NetShareDelStart_in_get_server_unc(PyObject *obj, void *closure)
   55681             : {
   55682           0 :         struct srvsvc_NetShareDelStart *object = (struct srvsvc_NetShareDelStart *)pytalloc_get_ptr(obj);
   55683             :         PyObject *py_server_unc;
   55684           0 :         if (object->in.server_unc == NULL) {
   55685           0 :                 Py_RETURN_NONE;
   55686             :         }
   55687           0 :         if (object->in.server_unc == NULL) {
   55688           0 :                 py_server_unc = Py_None;
   55689           0 :                 Py_INCREF(py_server_unc);
   55690             :         } else {
   55691           0 :                 if (object->in.server_unc == NULL) {
   55692           0 :                         py_server_unc = Py_None;
   55693           0 :                         Py_INCREF(py_server_unc);
   55694             :                 } else {
   55695           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   55696             :                 }
   55697             :         }
   55698           0 :         return py_server_unc;
   55699             : }
   55700             : 
   55701           0 : static int py_srvsvc_NetShareDelStart_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   55702             : {
   55703           0 :         struct srvsvc_NetShareDelStart *object = (struct srvsvc_NetShareDelStart *)pytalloc_get_ptr(py_obj);
   55704           0 :         if (value == NULL) {
   55705           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   55706           0 :                 return -1;
   55707             :         }
   55708           0 :         if (value == Py_None) {
   55709           0 :                 object->in.server_unc = NULL;
   55710             :         } else {
   55711           0 :                 object->in.server_unc = NULL;
   55712             :                 {
   55713             :                         const char *test_str;
   55714             :                         const char *talloc_str;
   55715           0 :                         PyObject *unicode = NULL;
   55716           0 :                         if (PyUnicode_Check(value)) {
   55717           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   55718           0 :                                 if (unicode == NULL) {
   55719           0 :                                         PyErr_NoMemory();
   55720           0 :                                         return -1;
   55721             :                                 }
   55722           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   55723           0 :                         } else if (PyBytes_Check(value)) {
   55724           0 :                                 test_str = PyBytes_AS_STRING(value);
   55725             :                         } else {
   55726           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   55727           0 :                                 return -1;
   55728             :                         }
   55729           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   55730           0 :                         if (unicode != NULL) {
   55731           0 :                                 Py_DECREF(unicode);
   55732             :                         }
   55733           0 :                         if (talloc_str == NULL) {
   55734           0 :                                 PyErr_NoMemory();
   55735           0 :                                 return -1;
   55736             :                         }
   55737           0 :                         object->in.server_unc = talloc_str;
   55738             :                 }
   55739             :         }
   55740           0 :         return 0;
   55741             : }
   55742             : 
   55743           0 : static PyObject *py_srvsvc_NetShareDelStart_in_get_share(PyObject *obj, void *closure)
   55744             : {
   55745           0 :         struct srvsvc_NetShareDelStart *object = (struct srvsvc_NetShareDelStart *)pytalloc_get_ptr(obj);
   55746             :         PyObject *py_share;
   55747           0 :         if (object->in.share == NULL) {
   55748           0 :                 py_share = Py_None;
   55749           0 :                 Py_INCREF(py_share);
   55750             :         } else {
   55751           0 :                 py_share = PyUnicode_Decode(object->in.share, strlen(object->in.share), "utf-8", "ignore");
   55752             :         }
   55753           0 :         return py_share;
   55754             : }
   55755             : 
   55756           0 : static int py_srvsvc_NetShareDelStart_in_set_share(PyObject *py_obj, PyObject *value, void *closure)
   55757             : {
   55758           0 :         struct srvsvc_NetShareDelStart *object = (struct srvsvc_NetShareDelStart *)pytalloc_get_ptr(py_obj);
   55759           0 :         if (value == NULL) {
   55760           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.share");
   55761           0 :                 return -1;
   55762             :         }
   55763             :         {
   55764             :                 const char *test_str;
   55765             :                 const char *talloc_str;
   55766           0 :                 PyObject *unicode = NULL;
   55767           0 :                 if (PyUnicode_Check(value)) {
   55768           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   55769           0 :                         if (unicode == NULL) {
   55770           0 :                                 PyErr_NoMemory();
   55771           0 :                                 return -1;
   55772             :                         }
   55773           0 :                         test_str = PyBytes_AS_STRING(unicode);
   55774           0 :                 } else if (PyBytes_Check(value)) {
   55775           0 :                         test_str = PyBytes_AS_STRING(value);
   55776             :                 } else {
   55777           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   55778           0 :                         return -1;
   55779             :                 }
   55780           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   55781           0 :                 if (unicode != NULL) {
   55782           0 :                         Py_DECREF(unicode);
   55783             :                 }
   55784           0 :                 if (talloc_str == NULL) {
   55785           0 :                         PyErr_NoMemory();
   55786           0 :                         return -1;
   55787             :                 }
   55788           0 :                 object->in.share = talloc_str;
   55789             :         }
   55790           0 :         return 0;
   55791             : }
   55792             : 
   55793           0 : static PyObject *py_srvsvc_NetShareDelStart_in_get_reserved(PyObject *obj, void *closure)
   55794             : {
   55795           0 :         struct srvsvc_NetShareDelStart *object = (struct srvsvc_NetShareDelStart *)pytalloc_get_ptr(obj);
   55796             :         PyObject *py_reserved;
   55797           0 :         py_reserved = PyLong_FromUnsignedLongLong((uint32_t)object->in.reserved);
   55798           0 :         return py_reserved;
   55799             : }
   55800             : 
   55801           0 : static int py_srvsvc_NetShareDelStart_in_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
   55802             : {
   55803           0 :         struct srvsvc_NetShareDelStart *object = (struct srvsvc_NetShareDelStart *)pytalloc_get_ptr(py_obj);
   55804           0 :         if (value == NULL) {
   55805           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.reserved");
   55806           0 :                 return -1;
   55807             :         }
   55808             :         {
   55809           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.reserved));
   55810           0 :                 if (PyLong_Check(value)) {
   55811             :                         unsigned long long test_var;
   55812           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   55813           0 :                         if (PyErr_Occurred() != NULL) {
   55814           0 :                                 return -1;
   55815             :                         }
   55816           0 :                         if (test_var > uint_max) {
   55817           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   55818             :                                   PyLong_Type.tp_name, uint_max, test_var);
   55819           0 :                                 return -1;
   55820             :                         }
   55821           0 :                         object->in.reserved = test_var;
   55822             :                 } else {
   55823           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   55824             :                           PyLong_Type.tp_name);
   55825           0 :                         return -1;
   55826             :                 }
   55827             :         }
   55828           0 :         return 0;
   55829             : }
   55830             : 
   55831           0 : static PyObject *py_srvsvc_NetShareDelStart_out_get_hnd(PyObject *obj, void *closure)
   55832             : {
   55833           0 :         struct srvsvc_NetShareDelStart *object = (struct srvsvc_NetShareDelStart *)pytalloc_get_ptr(obj);
   55834             :         PyObject *py_hnd;
   55835           0 :         if (object->out.hnd == NULL) {
   55836           0 :                 Py_RETURN_NONE;
   55837             :         }
   55838           0 :         if (object->out.hnd == NULL) {
   55839           0 :                 py_hnd = Py_None;
   55840           0 :                 Py_INCREF(py_hnd);
   55841             :         } else {
   55842           0 :                 py_hnd = pytalloc_reference_ex(policy_handle_Type, object->out.hnd, object->out.hnd);
   55843             :         }
   55844           0 :         return py_hnd;
   55845             : }
   55846             : 
   55847           0 : static int py_srvsvc_NetShareDelStart_out_set_hnd(PyObject *py_obj, PyObject *value, void *closure)
   55848             : {
   55849           0 :         struct srvsvc_NetShareDelStart *object = (struct srvsvc_NetShareDelStart *)pytalloc_get_ptr(py_obj);
   55850           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.hnd));
   55851           0 :         if (value == NULL) {
   55852           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.hnd");
   55853           0 :                 return -1;
   55854             :         }
   55855           0 :         if (value == Py_None) {
   55856           0 :                 object->out.hnd = NULL;
   55857             :         } else {
   55858           0 :                 object->out.hnd = NULL;
   55859           0 :                 PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
   55860           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   55861           0 :                         PyErr_NoMemory();
   55862           0 :                         return -1;
   55863             :                 }
   55864           0 :                 object->out.hnd = (struct policy_handle *)pytalloc_get_ptr(value);
   55865             :         }
   55866           0 :         return 0;
   55867             : }
   55868             : 
   55869           0 : static PyObject *py_srvsvc_NetShareDelStart_get_result(PyObject *obj, void *closure)
   55870             : {
   55871           0 :         struct srvsvc_NetShareDelStart *object = (struct srvsvc_NetShareDelStart *)pytalloc_get_ptr(obj);
   55872             :         PyObject *py_result;
   55873           0 :         py_result = PyErr_FromWERROR(object->out.result);
   55874           0 :         return py_result;
   55875             : }
   55876             : 
   55877           0 : static int py_srvsvc_NetShareDelStart_set_result(PyObject *py_obj, PyObject *value, void *closure)
   55878             : {
   55879           0 :         struct srvsvc_NetShareDelStart *object = (struct srvsvc_NetShareDelStart *)pytalloc_get_ptr(py_obj);
   55880           0 :         if (value == NULL) {
   55881           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   55882           0 :                 return -1;
   55883             :         }
   55884           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   55885           0 :         return 0;
   55886             : }
   55887             : 
   55888             : static PyGetSetDef py_srvsvc_NetShareDelStart_getsetters[] = {
   55889             :         {
   55890             :                 .name = discard_const_p(char, "in_server_unc"),
   55891             :                 .get = py_srvsvc_NetShareDelStart_in_get_server_unc,
   55892             :                 .set = py_srvsvc_NetShareDelStart_in_set_server_unc,
   55893             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   55894             :         },
   55895             :         {
   55896             :                 .name = discard_const_p(char, "in_share"),
   55897             :                 .get = py_srvsvc_NetShareDelStart_in_get_share,
   55898             :                 .set = py_srvsvc_NetShareDelStart_in_set_share,
   55899             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   55900             :         },
   55901             :         {
   55902             :                 .name = discard_const_p(char, "in_reserved"),
   55903             :                 .get = py_srvsvc_NetShareDelStart_in_get_reserved,
   55904             :                 .set = py_srvsvc_NetShareDelStart_in_set_reserved,
   55905             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   55906             :         },
   55907             :         {
   55908             :                 .name = discard_const_p(char, "out_hnd"),
   55909             :                 .get = py_srvsvc_NetShareDelStart_out_get_hnd,
   55910             :                 .set = py_srvsvc_NetShareDelStart_out_set_hnd,
   55911             :                 .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
   55912             :         },
   55913             :         {
   55914             :                 .name = discard_const_p(char, "result"),
   55915             :                 .get = py_srvsvc_NetShareDelStart_get_result,
   55916             :                 .set = py_srvsvc_NetShareDelStart_set_result,
   55917             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   55918             :         },
   55919             :         { .name = NULL }
   55920             : };
   55921             : 
   55922           0 : static PyObject *py_srvsvc_NetShareDelStart_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   55923             : {
   55924           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetShareDelStart, type);
   55925           0 :         return self;
   55926             : }
   55927             : 
   55928           0 : static PyObject *py_srvsvc_NetShareDelStart_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   55929             : {
   55930             : 
   55931             : 
   55932           0 :         return PyLong_FromLong(37);
   55933             : }
   55934             : 
   55935           0 : static PyObject *py_srvsvc_NetShareDelStart_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   55936             : {
   55937           0 :         const struct ndr_interface_call *call = NULL;
   55938           0 :         struct srvsvc_NetShareDelStart *object = (struct srvsvc_NetShareDelStart *)pytalloc_get_ptr(py_obj);
   55939           0 :         PyObject *ret = NULL;
   55940           0 :         struct ndr_push *push = NULL;
   55941             :         DATA_BLOB blob;
   55942             :         enum ndr_err_code err;
   55943             : 
   55944           0 :         if (ndr_table_srvsvc.num_calls < 38) {
   55945           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareDelStart_ndr_pack");
   55946           0 :                 return NULL;
   55947             :         }
   55948           0 :         call = &ndr_table_srvsvc.calls[37];
   55949             : 
   55950           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   55951           0 :         if (push == NULL) {
   55952           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   55953           0 :                 return NULL;
   55954             :         }
   55955             : 
   55956           0 :         push->flags |= ndr_push_flags;
   55957             : 
   55958           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   55959           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   55960           0 :                 TALLOC_FREE(push);
   55961           0 :                 PyErr_SetNdrError(err);
   55962           0 :                 return NULL;
   55963             :         }
   55964           0 :         blob = ndr_push_blob(push);
   55965           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   55966           0 :         TALLOC_FREE(push);
   55967           0 :         return ret;
   55968             : }
   55969             : 
   55970           0 : static PyObject *py_srvsvc_NetShareDelStart_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55971             : {
   55972           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   55973           0 :         PyObject *bigendian_obj = NULL;
   55974           0 :         PyObject *ndr64_obj = NULL;
   55975           0 :         uint32_t ndr_push_flags = 0;
   55976             : 
   55977           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   55978             :                 discard_const_p(char *, kwnames),
   55979             :                 &bigendian_obj,
   55980             :                 &ndr64_obj)) {
   55981           0 :                 return NULL;
   55982             :         }
   55983             : 
   55984           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55985           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   55986             :         }
   55987           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55988           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   55989             :         }
   55990             : 
   55991           0 :         return py_srvsvc_NetShareDelStart_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   55992             : }
   55993             : 
   55994           0 : static PyObject *py_srvsvc_NetShareDelStart_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55995             : {
   55996           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   55997           0 :         PyObject *bigendian_obj = NULL;
   55998           0 :         PyObject *ndr64_obj = NULL;
   55999           0 :         uint32_t ndr_push_flags = 0;
   56000             : 
   56001           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   56002             :                 discard_const_p(char *, kwnames),
   56003             :                 &bigendian_obj,
   56004             :                 &ndr64_obj)) {
   56005           0 :                 return NULL;
   56006             :         }
   56007             : 
   56008           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   56009           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   56010             :         }
   56011           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   56012           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   56013             :         }
   56014             : 
   56015           0 :         return py_srvsvc_NetShareDelStart_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   56016             : }
   56017             : 
   56018           0 : static PyObject *py_srvsvc_NetShareDelStart_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   56019             : {
   56020           0 :         const struct ndr_interface_call *call = NULL;
   56021           0 :         struct srvsvc_NetShareDelStart *object = (struct srvsvc_NetShareDelStart *)pytalloc_get_ptr(py_obj);
   56022           0 :         struct ndr_pull *pull = NULL;
   56023             :         enum ndr_err_code err;
   56024             : 
   56025           0 :         if (ndr_table_srvsvc.num_calls < 38) {
   56026           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareDelStart_ndr_unpack");
   56027           0 :                 return NULL;
   56028             :         }
   56029           0 :         call = &ndr_table_srvsvc.calls[37];
   56030             : 
   56031           0 :         pull = ndr_pull_init_blob(blob, object);
   56032           0 :         if (pull == NULL) {
   56033           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   56034           0 :                 return NULL;
   56035             :         }
   56036             : 
   56037           0 :         pull->flags |= ndr_pull_flags;
   56038             : 
   56039           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   56040           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   56041           0 :                 TALLOC_FREE(pull);
   56042           0 :                 PyErr_SetNdrError(err);
   56043           0 :                 return NULL;
   56044             :         }
   56045           0 :         if (!allow_remaining) {
   56046             :                 uint32_t highest_ofs;
   56047             : 
   56048           0 :                 if (pull->offset > pull->relative_highest_offset) {
   56049           0 :                         highest_ofs = pull->offset;
   56050             :                 } else {
   56051           0 :                         highest_ofs = pull->relative_highest_offset;
   56052             :                 }
   56053           0 :                 if (highest_ofs < pull->data_size) {
   56054           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   56055             :                                 "not all bytes consumed ofs[%u] size[%u]",
   56056             :                                 highest_ofs, pull->data_size);
   56057           0 :                         TALLOC_FREE(pull);
   56058           0 :                         PyErr_SetNdrError(err);
   56059           0 :                         return NULL;
   56060             :                 }
   56061             :         }
   56062             : 
   56063           0 :         TALLOC_FREE(pull);
   56064           0 :         Py_RETURN_NONE;
   56065             : }
   56066             : 
   56067           0 : static PyObject *py_srvsvc_NetShareDelStart_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   56068             : {
   56069             :         DATA_BLOB blob;
   56070           0 :         Py_ssize_t blob_length = 0;
   56071           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   56072           0 :         PyObject *bigendian_obj = NULL;
   56073           0 :         PyObject *ndr64_obj = NULL;
   56074           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   56075           0 :         PyObject *allow_remaining_obj = NULL;
   56076           0 :         bool allow_remaining = false;
   56077             : 
   56078           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   56079             :                 discard_const_p(char *, kwnames),
   56080             :                 &blob.data, &blob_length,
   56081             :                 &bigendian_obj,
   56082             :                 &ndr64_obj,
   56083             :                 &allow_remaining_obj)) {
   56084           0 :                 return NULL;
   56085             :         }
   56086           0 :         blob.length = blob_length;
   56087             : 
   56088           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   56089           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   56090             :         }
   56091           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   56092           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   56093             :         }
   56094             : 
   56095           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   56096           0 :                 allow_remaining = true;
   56097             :         }
   56098             : 
   56099           0 :         return py_srvsvc_NetShareDelStart_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   56100             : }
   56101             : 
   56102           0 : static PyObject *py_srvsvc_NetShareDelStart_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   56103             : {
   56104             :         DATA_BLOB blob;
   56105           0 :         Py_ssize_t blob_length = 0;
   56106           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   56107           0 :         PyObject *bigendian_obj = NULL;
   56108           0 :         PyObject *ndr64_obj = NULL;
   56109           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   56110           0 :         PyObject *allow_remaining_obj = NULL;
   56111           0 :         bool allow_remaining = false;
   56112             : 
   56113           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   56114             :                 discard_const_p(char *, kwnames),
   56115             :                 &blob.data, &blob_length,
   56116             :                 &bigendian_obj,
   56117             :                 &ndr64_obj,
   56118             :                 &allow_remaining_obj)) {
   56119           0 :                 return NULL;
   56120             :         }
   56121           0 :         blob.length = blob_length;
   56122             : 
   56123           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   56124           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   56125             :         }
   56126           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   56127           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   56128             :         }
   56129             : 
   56130           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   56131           0 :                 allow_remaining = true;
   56132             :         }
   56133             : 
   56134           0 :         return py_srvsvc_NetShareDelStart_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   56135             : }
   56136             : 
   56137           0 : static PyObject *py_srvsvc_NetShareDelStart_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   56138             : {
   56139           0 :         const struct ndr_interface_call *call = NULL;
   56140           0 :         struct srvsvc_NetShareDelStart *object = (struct srvsvc_NetShareDelStart *)pytalloc_get_ptr(py_obj);
   56141             :         PyObject *ret;
   56142             :         char *retstr;
   56143             : 
   56144           0 :         if (ndr_table_srvsvc.num_calls < 38) {
   56145           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareDelStart_ndr_print");
   56146           0 :                 return NULL;
   56147             :         }
   56148           0 :         call = &ndr_table_srvsvc.calls[37];
   56149             : 
   56150           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   56151           0 :         ret = PyUnicode_FromString(retstr);
   56152           0 :         TALLOC_FREE(retstr);
   56153             : 
   56154           0 :         return ret;
   56155             : }
   56156             : 
   56157           0 : static PyObject *py_srvsvc_NetShareDelStart_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   56158             : {
   56159           0 :         return py_srvsvc_NetShareDelStart_ndr_print(py_obj, "srvsvc_NetShareDelStart_in", NDR_IN);
   56160             : }
   56161             : 
   56162           0 : static PyObject *py_srvsvc_NetShareDelStart_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   56163             : {
   56164           0 :         return py_srvsvc_NetShareDelStart_ndr_print(py_obj, "srvsvc_NetShareDelStart_out", NDR_OUT);
   56165             : }
   56166             : 
   56167             : static PyMethodDef py_srvsvc_NetShareDelStart_methods[] = {
   56168             :         { "opnum", (PyCFunction)py_srvsvc_NetShareDelStart_ndr_opnum, METH_NOARGS|METH_CLASS,
   56169             :                 "srvsvc.NetShareDelStart.opnum() -> 37 (0x25) " },
   56170             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDelStart_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   56171             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   56172             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDelStart_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   56173             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   56174             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDelStart_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   56175             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   56176             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDelStart_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   56177             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   56178             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetShareDelStart_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   56179             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetShareDelStart_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   56180             :         { NULL, NULL, 0, NULL }
   56181             : };
   56182             : 
   56183             : 
   56184             : static PyTypeObject srvsvc_NetShareDelStart_Type = {
   56185             :         PyVarObject_HEAD_INIT(NULL, 0)
   56186             :         .tp_name = "srvsvc.NetShareDelStart",
   56187             :         .tp_getset = py_srvsvc_NetShareDelStart_getsetters,
   56188             :         .tp_methods = py_srvsvc_NetShareDelStart_methods,
   56189             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   56190             :         .tp_new = py_srvsvc_NetShareDelStart_new,
   56191             : };
   56192             : 
   56193           0 : static bool pack_py_srvsvc_NetShareDelStart_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareDelStart *r)
   56194             : {
   56195             :         PyObject *py_server_unc;
   56196             :         PyObject *py_share;
   56197             :         PyObject *py_reserved;
   56198           0 :         const char *kwnames[] = {
   56199             :                 "server_unc", "share", "reserved", NULL
   56200             :         };
   56201             : 
   56202           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetShareDelStart", discard_const_p(char *, kwnames), &py_server_unc, &py_share, &py_reserved)) {
   56203           0 :                 return false;
   56204             :         }
   56205             : 
   56206           0 :         if (py_server_unc == NULL) {
   56207           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   56208           0 :                 return false;
   56209             :         }
   56210           0 :         if (py_server_unc == Py_None) {
   56211           0 :                 r->in.server_unc = NULL;
   56212             :         } else {
   56213           0 :                 r->in.server_unc = NULL;
   56214             :                 {
   56215             :                         const char *test_str;
   56216             :                         const char *talloc_str;
   56217           0 :                         PyObject *unicode = NULL;
   56218           0 :                         if (PyUnicode_Check(py_server_unc)) {
   56219           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   56220           0 :                                 if (unicode == NULL) {
   56221           0 :                                         PyErr_NoMemory();
   56222           0 :                                         return false;
   56223             :                                 }
   56224           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   56225           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   56226           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   56227             :                         } else {
   56228           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   56229           0 :                                 return false;
   56230             :                         }
   56231           0 :                         talloc_str = talloc_strdup(r, test_str);
   56232           0 :                         if (unicode != NULL) {
   56233           0 :                                 Py_DECREF(unicode);
   56234             :                         }
   56235           0 :                         if (talloc_str == NULL) {
   56236           0 :                                 PyErr_NoMemory();
   56237           0 :                                 return false;
   56238             :                         }
   56239           0 :                         r->in.server_unc = talloc_str;
   56240             :                 }
   56241             :         }
   56242           0 :         if (py_share == NULL) {
   56243           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.share");
   56244           0 :                 return false;
   56245             :         }
   56246             :         {
   56247             :                 const char *test_str;
   56248             :                 const char *talloc_str;
   56249           0 :                 PyObject *unicode = NULL;
   56250           0 :                 if (PyUnicode_Check(py_share)) {
   56251           0 :                         unicode = PyUnicode_AsEncodedString(py_share, "utf-8", "ignore");
   56252           0 :                         if (unicode == NULL) {
   56253           0 :                                 PyErr_NoMemory();
   56254           0 :                                 return false;
   56255             :                         }
   56256           0 :                         test_str = PyBytes_AS_STRING(unicode);
   56257           0 :                 } else if (PyBytes_Check(py_share)) {
   56258           0 :                         test_str = PyBytes_AS_STRING(py_share);
   56259             :                 } else {
   56260           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share)->tp_name);
   56261           0 :                         return false;
   56262             :                 }
   56263           0 :                 talloc_str = talloc_strdup(r, test_str);
   56264           0 :                 if (unicode != NULL) {
   56265           0 :                         Py_DECREF(unicode);
   56266             :                 }
   56267           0 :                 if (talloc_str == NULL) {
   56268           0 :                         PyErr_NoMemory();
   56269           0 :                         return false;
   56270             :                 }
   56271           0 :                 r->in.share = talloc_str;
   56272             :         }
   56273           0 :         if (py_reserved == NULL) {
   56274           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.reserved");
   56275           0 :                 return false;
   56276             :         }
   56277             :         {
   56278           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.reserved));
   56279           0 :                 if (PyLong_Check(py_reserved)) {
   56280             :                         unsigned long long test_var;
   56281           0 :                         test_var = PyLong_AsUnsignedLongLong(py_reserved);
   56282           0 :                         if (PyErr_Occurred() != NULL) {
   56283           0 :                                 return false;
   56284             :                         }
   56285           0 :                         if (test_var > uint_max) {
   56286           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   56287             :                                   PyLong_Type.tp_name, uint_max, test_var);
   56288           0 :                                 return false;
   56289             :                         }
   56290           0 :                         r->in.reserved = test_var;
   56291             :                 } else {
   56292           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   56293             :                           PyLong_Type.tp_name);
   56294           0 :                         return false;
   56295             :                 }
   56296             :         }
   56297           0 :         return true;
   56298             : }
   56299             : 
   56300           0 : static PyObject *unpack_py_srvsvc_NetShareDelStart_args_out(struct srvsvc_NetShareDelStart *r)
   56301             : {
   56302             :         PyObject *result;
   56303             :         PyObject *py_hnd;
   56304           0 :         if (r->out.hnd == NULL) {
   56305           0 :                 py_hnd = Py_None;
   56306           0 :                 Py_INCREF(py_hnd);
   56307             :         } else {
   56308           0 :                 py_hnd = pytalloc_reference_ex(policy_handle_Type, r->out.hnd, r->out.hnd);
   56309             :         }
   56310           0 :         result = py_hnd;
   56311           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   56312           0 :                 PyErr_SetWERROR(r->out.result);
   56313           0 :                 return NULL;
   56314             :         }
   56315             : 
   56316           0 :         return result;
   56317             : }
   56318             : 
   56319             : 
   56320           0 : static PyObject *py_srvsvc_NetShareDelCommit_in_get_hnd(PyObject *obj, void *closure)
   56321             : {
   56322           0 :         struct srvsvc_NetShareDelCommit *object = (struct srvsvc_NetShareDelCommit *)pytalloc_get_ptr(obj);
   56323             :         PyObject *py_hnd;
   56324           0 :         if (object->in.hnd == NULL) {
   56325           0 :                 Py_RETURN_NONE;
   56326             :         }
   56327           0 :         if (object->in.hnd == NULL) {
   56328           0 :                 py_hnd = Py_None;
   56329           0 :                 Py_INCREF(py_hnd);
   56330             :         } else {
   56331           0 :                 py_hnd = pytalloc_reference_ex(policy_handle_Type, object->in.hnd, object->in.hnd);
   56332             :         }
   56333           0 :         return py_hnd;
   56334             : }
   56335             : 
   56336           0 : static int py_srvsvc_NetShareDelCommit_in_set_hnd(PyObject *py_obj, PyObject *value, void *closure)
   56337             : {
   56338           0 :         struct srvsvc_NetShareDelCommit *object = (struct srvsvc_NetShareDelCommit *)pytalloc_get_ptr(py_obj);
   56339           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.hnd));
   56340           0 :         if (value == NULL) {
   56341           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.hnd");
   56342           0 :                 return -1;
   56343             :         }
   56344           0 :         if (value == Py_None) {
   56345           0 :                 object->in.hnd = NULL;
   56346             :         } else {
   56347           0 :                 object->in.hnd = NULL;
   56348           0 :                 PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
   56349           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   56350           0 :                         PyErr_NoMemory();
   56351           0 :                         return -1;
   56352             :                 }
   56353           0 :                 object->in.hnd = (struct policy_handle *)pytalloc_get_ptr(value);
   56354             :         }
   56355           0 :         return 0;
   56356             : }
   56357             : 
   56358           0 : static PyObject *py_srvsvc_NetShareDelCommit_out_get_hnd(PyObject *obj, void *closure)
   56359             : {
   56360           0 :         struct srvsvc_NetShareDelCommit *object = (struct srvsvc_NetShareDelCommit *)pytalloc_get_ptr(obj);
   56361             :         PyObject *py_hnd;
   56362           0 :         if (object->out.hnd == NULL) {
   56363           0 :                 Py_RETURN_NONE;
   56364             :         }
   56365           0 :         if (object->out.hnd == NULL) {
   56366           0 :                 py_hnd = Py_None;
   56367           0 :                 Py_INCREF(py_hnd);
   56368             :         } else {
   56369           0 :                 py_hnd = pytalloc_reference_ex(policy_handle_Type, object->out.hnd, object->out.hnd);
   56370             :         }
   56371           0 :         return py_hnd;
   56372             : }
   56373             : 
   56374           0 : static int py_srvsvc_NetShareDelCommit_out_set_hnd(PyObject *py_obj, PyObject *value, void *closure)
   56375             : {
   56376           0 :         struct srvsvc_NetShareDelCommit *object = (struct srvsvc_NetShareDelCommit *)pytalloc_get_ptr(py_obj);
   56377           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.hnd));
   56378           0 :         if (value == NULL) {
   56379           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.hnd");
   56380           0 :                 return -1;
   56381             :         }
   56382           0 :         if (value == Py_None) {
   56383           0 :                 object->out.hnd = NULL;
   56384             :         } else {
   56385           0 :                 object->out.hnd = NULL;
   56386           0 :                 PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
   56387           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   56388           0 :                         PyErr_NoMemory();
   56389           0 :                         return -1;
   56390             :                 }
   56391           0 :                 object->out.hnd = (struct policy_handle *)pytalloc_get_ptr(value);
   56392             :         }
   56393           0 :         return 0;
   56394             : }
   56395             : 
   56396           0 : static PyObject *py_srvsvc_NetShareDelCommit_get_result(PyObject *obj, void *closure)
   56397             : {
   56398           0 :         struct srvsvc_NetShareDelCommit *object = (struct srvsvc_NetShareDelCommit *)pytalloc_get_ptr(obj);
   56399             :         PyObject *py_result;
   56400           0 :         py_result = PyErr_FromWERROR(object->out.result);
   56401           0 :         return py_result;
   56402             : }
   56403             : 
   56404           0 : static int py_srvsvc_NetShareDelCommit_set_result(PyObject *py_obj, PyObject *value, void *closure)
   56405             : {
   56406           0 :         struct srvsvc_NetShareDelCommit *object = (struct srvsvc_NetShareDelCommit *)pytalloc_get_ptr(py_obj);
   56407           0 :         if (value == NULL) {
   56408           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   56409           0 :                 return -1;
   56410             :         }
   56411           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   56412           0 :         return 0;
   56413             : }
   56414             : 
   56415             : static PyGetSetDef py_srvsvc_NetShareDelCommit_getsetters[] = {
   56416             :         {
   56417             :                 .name = discard_const_p(char, "in_hnd"),
   56418             :                 .get = py_srvsvc_NetShareDelCommit_in_get_hnd,
   56419             :                 .set = py_srvsvc_NetShareDelCommit_in_set_hnd,
   56420             :                 .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
   56421             :         },
   56422             :         {
   56423             :                 .name = discard_const_p(char, "out_hnd"),
   56424             :                 .get = py_srvsvc_NetShareDelCommit_out_get_hnd,
   56425             :                 .set = py_srvsvc_NetShareDelCommit_out_set_hnd,
   56426             :                 .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
   56427             :         },
   56428             :         {
   56429             :                 .name = discard_const_p(char, "result"),
   56430             :                 .get = py_srvsvc_NetShareDelCommit_get_result,
   56431             :                 .set = py_srvsvc_NetShareDelCommit_set_result,
   56432             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   56433             :         },
   56434             :         { .name = NULL }
   56435             : };
   56436             : 
   56437           0 : static PyObject *py_srvsvc_NetShareDelCommit_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   56438             : {
   56439           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetShareDelCommit, type);
   56440           0 :         return self;
   56441             : }
   56442             : 
   56443           0 : static PyObject *py_srvsvc_NetShareDelCommit_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   56444             : {
   56445             : 
   56446             : 
   56447           0 :         return PyLong_FromLong(38);
   56448             : }
   56449             : 
   56450           0 : static PyObject *py_srvsvc_NetShareDelCommit_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   56451             : {
   56452           0 :         const struct ndr_interface_call *call = NULL;
   56453           0 :         struct srvsvc_NetShareDelCommit *object = (struct srvsvc_NetShareDelCommit *)pytalloc_get_ptr(py_obj);
   56454           0 :         PyObject *ret = NULL;
   56455           0 :         struct ndr_push *push = NULL;
   56456             :         DATA_BLOB blob;
   56457             :         enum ndr_err_code err;
   56458             : 
   56459           0 :         if (ndr_table_srvsvc.num_calls < 39) {
   56460           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareDelCommit_ndr_pack");
   56461           0 :                 return NULL;
   56462             :         }
   56463           0 :         call = &ndr_table_srvsvc.calls[38];
   56464             : 
   56465           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   56466           0 :         if (push == NULL) {
   56467           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   56468           0 :                 return NULL;
   56469             :         }
   56470             : 
   56471           0 :         push->flags |= ndr_push_flags;
   56472             : 
   56473           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   56474           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   56475           0 :                 TALLOC_FREE(push);
   56476           0 :                 PyErr_SetNdrError(err);
   56477           0 :                 return NULL;
   56478             :         }
   56479           0 :         blob = ndr_push_blob(push);
   56480           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   56481           0 :         TALLOC_FREE(push);
   56482           0 :         return ret;
   56483             : }
   56484             : 
   56485           0 : static PyObject *py_srvsvc_NetShareDelCommit_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   56486             : {
   56487           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   56488           0 :         PyObject *bigendian_obj = NULL;
   56489           0 :         PyObject *ndr64_obj = NULL;
   56490           0 :         uint32_t ndr_push_flags = 0;
   56491             : 
   56492           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   56493             :                 discard_const_p(char *, kwnames),
   56494             :                 &bigendian_obj,
   56495             :                 &ndr64_obj)) {
   56496           0 :                 return NULL;
   56497             :         }
   56498             : 
   56499           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   56500           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   56501             :         }
   56502           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   56503           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   56504             :         }
   56505             : 
   56506           0 :         return py_srvsvc_NetShareDelCommit_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   56507             : }
   56508             : 
   56509           0 : static PyObject *py_srvsvc_NetShareDelCommit_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   56510             : {
   56511           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   56512           0 :         PyObject *bigendian_obj = NULL;
   56513           0 :         PyObject *ndr64_obj = NULL;
   56514           0 :         uint32_t ndr_push_flags = 0;
   56515             : 
   56516           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   56517             :                 discard_const_p(char *, kwnames),
   56518             :                 &bigendian_obj,
   56519             :                 &ndr64_obj)) {
   56520           0 :                 return NULL;
   56521             :         }
   56522             : 
   56523           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   56524           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   56525             :         }
   56526           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   56527           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   56528             :         }
   56529             : 
   56530           0 :         return py_srvsvc_NetShareDelCommit_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   56531             : }
   56532             : 
   56533           0 : static PyObject *py_srvsvc_NetShareDelCommit_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   56534             : {
   56535           0 :         const struct ndr_interface_call *call = NULL;
   56536           0 :         struct srvsvc_NetShareDelCommit *object = (struct srvsvc_NetShareDelCommit *)pytalloc_get_ptr(py_obj);
   56537           0 :         struct ndr_pull *pull = NULL;
   56538             :         enum ndr_err_code err;
   56539             : 
   56540           0 :         if (ndr_table_srvsvc.num_calls < 39) {
   56541           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareDelCommit_ndr_unpack");
   56542           0 :                 return NULL;
   56543             :         }
   56544           0 :         call = &ndr_table_srvsvc.calls[38];
   56545             : 
   56546           0 :         pull = ndr_pull_init_blob(blob, object);
   56547           0 :         if (pull == NULL) {
   56548           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   56549           0 :                 return NULL;
   56550             :         }
   56551             : 
   56552           0 :         pull->flags |= ndr_pull_flags;
   56553             : 
   56554           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   56555           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   56556           0 :                 TALLOC_FREE(pull);
   56557           0 :                 PyErr_SetNdrError(err);
   56558           0 :                 return NULL;
   56559             :         }
   56560           0 :         if (!allow_remaining) {
   56561             :                 uint32_t highest_ofs;
   56562             : 
   56563           0 :                 if (pull->offset > pull->relative_highest_offset) {
   56564           0 :                         highest_ofs = pull->offset;
   56565             :                 } else {
   56566           0 :                         highest_ofs = pull->relative_highest_offset;
   56567             :                 }
   56568           0 :                 if (highest_ofs < pull->data_size) {
   56569           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   56570             :                                 "not all bytes consumed ofs[%u] size[%u]",
   56571             :                                 highest_ofs, pull->data_size);
   56572           0 :                         TALLOC_FREE(pull);
   56573           0 :                         PyErr_SetNdrError(err);
   56574           0 :                         return NULL;
   56575             :                 }
   56576             :         }
   56577             : 
   56578           0 :         TALLOC_FREE(pull);
   56579           0 :         Py_RETURN_NONE;
   56580             : }
   56581             : 
   56582           0 : static PyObject *py_srvsvc_NetShareDelCommit_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   56583             : {
   56584             :         DATA_BLOB blob;
   56585           0 :         Py_ssize_t blob_length = 0;
   56586           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   56587           0 :         PyObject *bigendian_obj = NULL;
   56588           0 :         PyObject *ndr64_obj = NULL;
   56589           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   56590           0 :         PyObject *allow_remaining_obj = NULL;
   56591           0 :         bool allow_remaining = false;
   56592             : 
   56593           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   56594             :                 discard_const_p(char *, kwnames),
   56595             :                 &blob.data, &blob_length,
   56596             :                 &bigendian_obj,
   56597             :                 &ndr64_obj,
   56598             :                 &allow_remaining_obj)) {
   56599           0 :                 return NULL;
   56600             :         }
   56601           0 :         blob.length = blob_length;
   56602             : 
   56603           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   56604           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   56605             :         }
   56606           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   56607           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   56608             :         }
   56609             : 
   56610           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   56611           0 :                 allow_remaining = true;
   56612             :         }
   56613             : 
   56614           0 :         return py_srvsvc_NetShareDelCommit_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   56615             : }
   56616             : 
   56617           0 : static PyObject *py_srvsvc_NetShareDelCommit_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   56618             : {
   56619             :         DATA_BLOB blob;
   56620           0 :         Py_ssize_t blob_length = 0;
   56621           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   56622           0 :         PyObject *bigendian_obj = NULL;
   56623           0 :         PyObject *ndr64_obj = NULL;
   56624           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   56625           0 :         PyObject *allow_remaining_obj = NULL;
   56626           0 :         bool allow_remaining = false;
   56627             : 
   56628           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   56629             :                 discard_const_p(char *, kwnames),
   56630             :                 &blob.data, &blob_length,
   56631             :                 &bigendian_obj,
   56632             :                 &ndr64_obj,
   56633             :                 &allow_remaining_obj)) {
   56634           0 :                 return NULL;
   56635             :         }
   56636           0 :         blob.length = blob_length;
   56637             : 
   56638           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   56639           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   56640             :         }
   56641           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   56642           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   56643             :         }
   56644             : 
   56645           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   56646           0 :                 allow_remaining = true;
   56647             :         }
   56648             : 
   56649           0 :         return py_srvsvc_NetShareDelCommit_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   56650             : }
   56651             : 
   56652           0 : static PyObject *py_srvsvc_NetShareDelCommit_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   56653             : {
   56654           0 :         const struct ndr_interface_call *call = NULL;
   56655           0 :         struct srvsvc_NetShareDelCommit *object = (struct srvsvc_NetShareDelCommit *)pytalloc_get_ptr(py_obj);
   56656             :         PyObject *ret;
   56657             :         char *retstr;
   56658             : 
   56659           0 :         if (ndr_table_srvsvc.num_calls < 39) {
   56660           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetShareDelCommit_ndr_print");
   56661           0 :                 return NULL;
   56662             :         }
   56663           0 :         call = &ndr_table_srvsvc.calls[38];
   56664             : 
   56665           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   56666           0 :         ret = PyUnicode_FromString(retstr);
   56667           0 :         TALLOC_FREE(retstr);
   56668             : 
   56669           0 :         return ret;
   56670             : }
   56671             : 
   56672           0 : static PyObject *py_srvsvc_NetShareDelCommit_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   56673             : {
   56674           0 :         return py_srvsvc_NetShareDelCommit_ndr_print(py_obj, "srvsvc_NetShareDelCommit_in", NDR_IN);
   56675             : }
   56676             : 
   56677           0 : static PyObject *py_srvsvc_NetShareDelCommit_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   56678             : {
   56679           0 :         return py_srvsvc_NetShareDelCommit_ndr_print(py_obj, "srvsvc_NetShareDelCommit_out", NDR_OUT);
   56680             : }
   56681             : 
   56682             : static PyMethodDef py_srvsvc_NetShareDelCommit_methods[] = {
   56683             :         { "opnum", (PyCFunction)py_srvsvc_NetShareDelCommit_ndr_opnum, METH_NOARGS|METH_CLASS,
   56684             :                 "srvsvc.NetShareDelCommit.opnum() -> 38 (0x26) " },
   56685             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDelCommit_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   56686             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   56687             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDelCommit_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   56688             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   56689             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDelCommit_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   56690             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   56691             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetShareDelCommit_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   56692             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   56693             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetShareDelCommit_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   56694             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetShareDelCommit_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   56695             :         { NULL, NULL, 0, NULL }
   56696             : };
   56697             : 
   56698             : 
   56699             : static PyTypeObject srvsvc_NetShareDelCommit_Type = {
   56700             :         PyVarObject_HEAD_INIT(NULL, 0)
   56701             :         .tp_name = "srvsvc.NetShareDelCommit",
   56702             :         .tp_getset = py_srvsvc_NetShareDelCommit_getsetters,
   56703             :         .tp_methods = py_srvsvc_NetShareDelCommit_methods,
   56704             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   56705             :         .tp_new = py_srvsvc_NetShareDelCommit_new,
   56706             : };
   56707             : 
   56708           0 : static bool pack_py_srvsvc_NetShareDelCommit_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetShareDelCommit *r)
   56709             : {
   56710             :         PyObject *py_hnd;
   56711           0 :         const char *kwnames[] = {
   56712             :                 "hnd", NULL
   56713             :         };
   56714             : 
   56715           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:srvsvc_NetShareDelCommit", discard_const_p(char *, kwnames), &py_hnd)) {
   56716           0 :                 return false;
   56717             :         }
   56718             : 
   56719           0 :         if (py_hnd == NULL) {
   56720           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.hnd");
   56721           0 :                 return false;
   56722             :         }
   56723           0 :         if (py_hnd == Py_None) {
   56724           0 :                 r->in.hnd = NULL;
   56725             :         } else {
   56726           0 :                 r->in.hnd = NULL;
   56727           0 :                 PY_CHECK_TYPE(policy_handle_Type, py_hnd, return false;);
   56728           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_hnd)) == NULL) {
   56729           0 :                         PyErr_NoMemory();
   56730           0 :                         return false;
   56731             :                 }
   56732           0 :                 r->in.hnd = (struct policy_handle *)pytalloc_get_ptr(py_hnd);
   56733             :         }
   56734           0 :         return true;
   56735             : }
   56736             : 
   56737           0 : static PyObject *unpack_py_srvsvc_NetShareDelCommit_args_out(struct srvsvc_NetShareDelCommit *r)
   56738             : {
   56739             :         PyObject *result;
   56740             :         PyObject *py_hnd;
   56741           0 :         if (r->out.hnd == NULL) {
   56742           0 :                 py_hnd = Py_None;
   56743           0 :                 Py_INCREF(py_hnd);
   56744             :         } else {
   56745           0 :                 py_hnd = pytalloc_reference_ex(policy_handle_Type, r->out.hnd, r->out.hnd);
   56746             :         }
   56747           0 :         result = py_hnd;
   56748           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   56749           0 :                 PyErr_SetWERROR(r->out.result);
   56750           0 :                 return NULL;
   56751             :         }
   56752             : 
   56753           0 :         return result;
   56754             : }
   56755             : 
   56756             : 
   56757           0 : static PyObject *py_srvsvc_NetGetFileSecurity_in_get_server_unc(PyObject *obj, void *closure)
   56758             : {
   56759           0 :         struct srvsvc_NetGetFileSecurity *object = (struct srvsvc_NetGetFileSecurity *)pytalloc_get_ptr(obj);
   56760             :         PyObject *py_server_unc;
   56761           0 :         if (object->in.server_unc == NULL) {
   56762           0 :                 Py_RETURN_NONE;
   56763             :         }
   56764           0 :         if (object->in.server_unc == NULL) {
   56765           0 :                 py_server_unc = Py_None;
   56766           0 :                 Py_INCREF(py_server_unc);
   56767             :         } else {
   56768           0 :                 if (object->in.server_unc == NULL) {
   56769           0 :                         py_server_unc = Py_None;
   56770           0 :                         Py_INCREF(py_server_unc);
   56771             :                 } else {
   56772           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   56773             :                 }
   56774             :         }
   56775           0 :         return py_server_unc;
   56776             : }
   56777             : 
   56778           0 : static int py_srvsvc_NetGetFileSecurity_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   56779             : {
   56780           0 :         struct srvsvc_NetGetFileSecurity *object = (struct srvsvc_NetGetFileSecurity *)pytalloc_get_ptr(py_obj);
   56781           0 :         if (value == NULL) {
   56782           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   56783           0 :                 return -1;
   56784             :         }
   56785           0 :         if (value == Py_None) {
   56786           0 :                 object->in.server_unc = NULL;
   56787             :         } else {
   56788           0 :                 object->in.server_unc = NULL;
   56789             :                 {
   56790             :                         const char *test_str;
   56791             :                         const char *talloc_str;
   56792           0 :                         PyObject *unicode = NULL;
   56793           0 :                         if (PyUnicode_Check(value)) {
   56794           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   56795           0 :                                 if (unicode == NULL) {
   56796           0 :                                         PyErr_NoMemory();
   56797           0 :                                         return -1;
   56798             :                                 }
   56799           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   56800           0 :                         } else if (PyBytes_Check(value)) {
   56801           0 :                                 test_str = PyBytes_AS_STRING(value);
   56802             :                         } else {
   56803           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   56804           0 :                                 return -1;
   56805             :                         }
   56806           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   56807           0 :                         if (unicode != NULL) {
   56808           0 :                                 Py_DECREF(unicode);
   56809             :                         }
   56810           0 :                         if (talloc_str == NULL) {
   56811           0 :                                 PyErr_NoMemory();
   56812           0 :                                 return -1;
   56813             :                         }
   56814           0 :                         object->in.server_unc = talloc_str;
   56815             :                 }
   56816             :         }
   56817           0 :         return 0;
   56818             : }
   56819             : 
   56820           0 : static PyObject *py_srvsvc_NetGetFileSecurity_in_get_share(PyObject *obj, void *closure)
   56821             : {
   56822           0 :         struct srvsvc_NetGetFileSecurity *object = (struct srvsvc_NetGetFileSecurity *)pytalloc_get_ptr(obj);
   56823             :         PyObject *py_share;
   56824           0 :         if (object->in.share == NULL) {
   56825           0 :                 Py_RETURN_NONE;
   56826             :         }
   56827           0 :         if (object->in.share == NULL) {
   56828           0 :                 py_share = Py_None;
   56829           0 :                 Py_INCREF(py_share);
   56830             :         } else {
   56831           0 :                 if (object->in.share == NULL) {
   56832           0 :                         py_share = Py_None;
   56833           0 :                         Py_INCREF(py_share);
   56834             :                 } else {
   56835           0 :                         py_share = PyUnicode_Decode(object->in.share, strlen(object->in.share), "utf-8", "ignore");
   56836             :                 }
   56837             :         }
   56838           0 :         return py_share;
   56839             : }
   56840             : 
   56841           0 : static int py_srvsvc_NetGetFileSecurity_in_set_share(PyObject *py_obj, PyObject *value, void *closure)
   56842             : {
   56843           0 :         struct srvsvc_NetGetFileSecurity *object = (struct srvsvc_NetGetFileSecurity *)pytalloc_get_ptr(py_obj);
   56844           0 :         if (value == NULL) {
   56845           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.share");
   56846           0 :                 return -1;
   56847             :         }
   56848           0 :         if (value == Py_None) {
   56849           0 :                 object->in.share = NULL;
   56850             :         } else {
   56851           0 :                 object->in.share = NULL;
   56852             :                 {
   56853             :                         const char *test_str;
   56854             :                         const char *talloc_str;
   56855           0 :                         PyObject *unicode = NULL;
   56856           0 :                         if (PyUnicode_Check(value)) {
   56857           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   56858           0 :                                 if (unicode == NULL) {
   56859           0 :                                         PyErr_NoMemory();
   56860           0 :                                         return -1;
   56861             :                                 }
   56862           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   56863           0 :                         } else if (PyBytes_Check(value)) {
   56864           0 :                                 test_str = PyBytes_AS_STRING(value);
   56865             :                         } else {
   56866           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   56867           0 :                                 return -1;
   56868             :                         }
   56869           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   56870           0 :                         if (unicode != NULL) {
   56871           0 :                                 Py_DECREF(unicode);
   56872             :                         }
   56873           0 :                         if (talloc_str == NULL) {
   56874           0 :                                 PyErr_NoMemory();
   56875           0 :                                 return -1;
   56876             :                         }
   56877           0 :                         object->in.share = talloc_str;
   56878             :                 }
   56879             :         }
   56880           0 :         return 0;
   56881             : }
   56882             : 
   56883           0 : static PyObject *py_srvsvc_NetGetFileSecurity_in_get_file(PyObject *obj, void *closure)
   56884             : {
   56885           0 :         struct srvsvc_NetGetFileSecurity *object = (struct srvsvc_NetGetFileSecurity *)pytalloc_get_ptr(obj);
   56886             :         PyObject *py_file;
   56887           0 :         if (object->in.file == NULL) {
   56888           0 :                 py_file = Py_None;
   56889           0 :                 Py_INCREF(py_file);
   56890             :         } else {
   56891           0 :                 py_file = PyUnicode_Decode(object->in.file, strlen(object->in.file), "utf-8", "ignore");
   56892             :         }
   56893           0 :         return py_file;
   56894             : }
   56895             : 
   56896           0 : static int py_srvsvc_NetGetFileSecurity_in_set_file(PyObject *py_obj, PyObject *value, void *closure)
   56897             : {
   56898           0 :         struct srvsvc_NetGetFileSecurity *object = (struct srvsvc_NetGetFileSecurity *)pytalloc_get_ptr(py_obj);
   56899           0 :         if (value == NULL) {
   56900           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.file");
   56901           0 :                 return -1;
   56902             :         }
   56903             :         {
   56904             :                 const char *test_str;
   56905             :                 const char *talloc_str;
   56906           0 :                 PyObject *unicode = NULL;
   56907           0 :                 if (PyUnicode_Check(value)) {
   56908           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   56909           0 :                         if (unicode == NULL) {
   56910           0 :                                 PyErr_NoMemory();
   56911           0 :                                 return -1;
   56912             :                         }
   56913           0 :                         test_str = PyBytes_AS_STRING(unicode);
   56914           0 :                 } else if (PyBytes_Check(value)) {
   56915           0 :                         test_str = PyBytes_AS_STRING(value);
   56916             :                 } else {
   56917           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   56918           0 :                         return -1;
   56919             :                 }
   56920           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   56921           0 :                 if (unicode != NULL) {
   56922           0 :                         Py_DECREF(unicode);
   56923             :                 }
   56924           0 :                 if (talloc_str == NULL) {
   56925           0 :                         PyErr_NoMemory();
   56926           0 :                         return -1;
   56927             :                 }
   56928           0 :                 object->in.file = talloc_str;
   56929             :         }
   56930           0 :         return 0;
   56931             : }
   56932             : 
   56933           0 : static PyObject *py_srvsvc_NetGetFileSecurity_in_get_securityinformation(PyObject *obj, void *closure)
   56934             : {
   56935           0 :         struct srvsvc_NetGetFileSecurity *object = (struct srvsvc_NetGetFileSecurity *)pytalloc_get_ptr(obj);
   56936             :         PyObject *py_securityinformation;
   56937           0 :         py_securityinformation = PyLong_FromUnsignedLongLong((uint32_t)object->in.securityinformation);
   56938           0 :         return py_securityinformation;
   56939             : }
   56940             : 
   56941           0 : static int py_srvsvc_NetGetFileSecurity_in_set_securityinformation(PyObject *py_obj, PyObject *value, void *closure)
   56942             : {
   56943           0 :         struct srvsvc_NetGetFileSecurity *object = (struct srvsvc_NetGetFileSecurity *)pytalloc_get_ptr(py_obj);
   56944           0 :         if (value == NULL) {
   56945           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.securityinformation");
   56946           0 :                 return -1;
   56947             :         }
   56948             :         {
   56949           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.securityinformation));
   56950           0 :                 if (PyLong_Check(value)) {
   56951             :                         unsigned long long test_var;
   56952           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   56953           0 :                         if (PyErr_Occurred() != NULL) {
   56954           0 :                                 return -1;
   56955             :                         }
   56956           0 :                         if (test_var > uint_max) {
   56957           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   56958             :                                   PyLong_Type.tp_name, uint_max, test_var);
   56959           0 :                                 return -1;
   56960             :                         }
   56961           0 :                         object->in.securityinformation = test_var;
   56962             :                 } else {
   56963           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   56964             :                           PyLong_Type.tp_name);
   56965           0 :                         return -1;
   56966             :                 }
   56967             :         }
   56968           0 :         return 0;
   56969             : }
   56970             : 
   56971           0 : static PyObject *py_srvsvc_NetGetFileSecurity_out_get_sd_buf(PyObject *obj, void *closure)
   56972             : {
   56973           0 :         struct srvsvc_NetGetFileSecurity *object = (struct srvsvc_NetGetFileSecurity *)pytalloc_get_ptr(obj);
   56974             :         PyObject *py_sd_buf;
   56975           0 :         if (object->out.sd_buf == NULL) {
   56976           0 :                 Py_RETURN_NONE;
   56977             :         }
   56978           0 :         if (*object->out.sd_buf == NULL) {
   56979           0 :                 py_sd_buf = Py_None;
   56980           0 :                 Py_INCREF(py_sd_buf);
   56981             :         } else {
   56982           0 :                 py_sd_buf = pytalloc_reference_ex(sec_desc_buf_Type, *object->out.sd_buf, *object->out.sd_buf);
   56983             :         }
   56984           0 :         return py_sd_buf;
   56985             : }
   56986             : 
   56987           0 : static int py_srvsvc_NetGetFileSecurity_out_set_sd_buf(PyObject *py_obj, PyObject *value, void *closure)
   56988             : {
   56989           0 :         struct srvsvc_NetGetFileSecurity *object = (struct srvsvc_NetGetFileSecurity *)pytalloc_get_ptr(py_obj);
   56990           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.sd_buf));
   56991           0 :         if (value == NULL) {
   56992           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.sd_buf");
   56993           0 :                 return -1;
   56994             :         }
   56995           0 :         object->out.sd_buf = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.sd_buf);
   56996           0 :         if (object->out.sd_buf == NULL) {
   56997           0 :                 PyErr_NoMemory();
   56998           0 :                 return -1;
   56999             :         }
   57000           0 :         if (value == Py_None) {
   57001           0 :                 *object->out.sd_buf = NULL;
   57002             :         } else {
   57003           0 :                 *object->out.sd_buf = NULL;
   57004           0 :                 PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
   57005           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   57006           0 :                         PyErr_NoMemory();
   57007           0 :                         return -1;
   57008             :                 }
   57009           0 :                 *object->out.sd_buf = (struct sec_desc_buf *)pytalloc_get_ptr(value);
   57010             :         }
   57011           0 :         return 0;
   57012             : }
   57013             : 
   57014           0 : static PyObject *py_srvsvc_NetGetFileSecurity_get_result(PyObject *obj, void *closure)
   57015             : {
   57016           0 :         struct srvsvc_NetGetFileSecurity *object = (struct srvsvc_NetGetFileSecurity *)pytalloc_get_ptr(obj);
   57017             :         PyObject *py_result;
   57018           0 :         py_result = PyErr_FromWERROR(object->out.result);
   57019           0 :         return py_result;
   57020             : }
   57021             : 
   57022           0 : static int py_srvsvc_NetGetFileSecurity_set_result(PyObject *py_obj, PyObject *value, void *closure)
   57023             : {
   57024           0 :         struct srvsvc_NetGetFileSecurity *object = (struct srvsvc_NetGetFileSecurity *)pytalloc_get_ptr(py_obj);
   57025           0 :         if (value == NULL) {
   57026           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   57027           0 :                 return -1;
   57028             :         }
   57029           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   57030           0 :         return 0;
   57031             : }
   57032             : 
   57033             : static PyGetSetDef py_srvsvc_NetGetFileSecurity_getsetters[] = {
   57034             :         {
   57035             :                 .name = discard_const_p(char, "in_server_unc"),
   57036             :                 .get = py_srvsvc_NetGetFileSecurity_in_get_server_unc,
   57037             :                 .set = py_srvsvc_NetGetFileSecurity_in_set_server_unc,
   57038             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   57039             :         },
   57040             :         {
   57041             :                 .name = discard_const_p(char, "in_share"),
   57042             :                 .get = py_srvsvc_NetGetFileSecurity_in_get_share,
   57043             :                 .set = py_srvsvc_NetGetFileSecurity_in_set_share,
   57044             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   57045             :         },
   57046             :         {
   57047             :                 .name = discard_const_p(char, "in_file"),
   57048             :                 .get = py_srvsvc_NetGetFileSecurity_in_get_file,
   57049             :                 .set = py_srvsvc_NetGetFileSecurity_in_set_file,
   57050             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   57051             :         },
   57052             :         {
   57053             :                 .name = discard_const_p(char, "in_securityinformation"),
   57054             :                 .get = py_srvsvc_NetGetFileSecurity_in_get_securityinformation,
   57055             :                 .set = py_srvsvc_NetGetFileSecurity_in_set_securityinformation,
   57056             :                 .doc = discard_const_p(char, "PIDL-generated element of base type security_secinfo")
   57057             :         },
   57058             :         {
   57059             :                 .name = discard_const_p(char, "out_sd_buf"),
   57060             :                 .get = py_srvsvc_NetGetFileSecurity_out_get_sd_buf,
   57061             :                 .set = py_srvsvc_NetGetFileSecurity_out_set_sd_buf,
   57062             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
   57063             :         },
   57064             :         {
   57065             :                 .name = discard_const_p(char, "result"),
   57066             :                 .get = py_srvsvc_NetGetFileSecurity_get_result,
   57067             :                 .set = py_srvsvc_NetGetFileSecurity_set_result,
   57068             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   57069             :         },
   57070             :         { .name = NULL }
   57071             : };
   57072             : 
   57073           0 : static PyObject *py_srvsvc_NetGetFileSecurity_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   57074             : {
   57075           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetGetFileSecurity, type);
   57076           0 :         struct srvsvc_NetGetFileSecurity *_self = (struct srvsvc_NetGetFileSecurity *)pytalloc_get_ptr(self);
   57077           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   57078             :         /* a pointer to a NULL pointer */
   57079           0 :         _self->out.sd_buf = talloc_zero(mem_ctx, struct sec_desc_buf *);
   57080           0 :         return self;
   57081             : }
   57082             : 
   57083           0 : static PyObject *py_srvsvc_NetGetFileSecurity_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   57084             : {
   57085             : 
   57086             : 
   57087           0 :         return PyLong_FromLong(39);
   57088             : }
   57089             : 
   57090           0 : static PyObject *py_srvsvc_NetGetFileSecurity_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   57091             : {
   57092           0 :         const struct ndr_interface_call *call = NULL;
   57093           0 :         struct srvsvc_NetGetFileSecurity *object = (struct srvsvc_NetGetFileSecurity *)pytalloc_get_ptr(py_obj);
   57094           0 :         PyObject *ret = NULL;
   57095           0 :         struct ndr_push *push = NULL;
   57096             :         DATA_BLOB blob;
   57097             :         enum ndr_err_code err;
   57098             : 
   57099           0 :         if (ndr_table_srvsvc.num_calls < 40) {
   57100           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetGetFileSecurity_ndr_pack");
   57101           0 :                 return NULL;
   57102             :         }
   57103           0 :         call = &ndr_table_srvsvc.calls[39];
   57104             : 
   57105           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   57106           0 :         if (push == NULL) {
   57107           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   57108           0 :                 return NULL;
   57109             :         }
   57110             : 
   57111           0 :         push->flags |= ndr_push_flags;
   57112             : 
   57113           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   57114           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   57115           0 :                 TALLOC_FREE(push);
   57116           0 :                 PyErr_SetNdrError(err);
   57117           0 :                 return NULL;
   57118             :         }
   57119           0 :         blob = ndr_push_blob(push);
   57120           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   57121           0 :         TALLOC_FREE(push);
   57122           0 :         return ret;
   57123             : }
   57124             : 
   57125           0 : static PyObject *py_srvsvc_NetGetFileSecurity_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   57126             : {
   57127           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   57128           0 :         PyObject *bigendian_obj = NULL;
   57129           0 :         PyObject *ndr64_obj = NULL;
   57130           0 :         uint32_t ndr_push_flags = 0;
   57131             : 
   57132           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   57133             :                 discard_const_p(char *, kwnames),
   57134             :                 &bigendian_obj,
   57135             :                 &ndr64_obj)) {
   57136           0 :                 return NULL;
   57137             :         }
   57138             : 
   57139           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   57140           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   57141             :         }
   57142           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   57143           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   57144             :         }
   57145             : 
   57146           0 :         return py_srvsvc_NetGetFileSecurity_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   57147             : }
   57148             : 
   57149           0 : static PyObject *py_srvsvc_NetGetFileSecurity_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   57150             : {
   57151           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   57152           0 :         PyObject *bigendian_obj = NULL;
   57153           0 :         PyObject *ndr64_obj = NULL;
   57154           0 :         uint32_t ndr_push_flags = 0;
   57155             : 
   57156           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   57157             :                 discard_const_p(char *, kwnames),
   57158             :                 &bigendian_obj,
   57159             :                 &ndr64_obj)) {
   57160           0 :                 return NULL;
   57161             :         }
   57162             : 
   57163           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   57164           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   57165             :         }
   57166           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   57167           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   57168             :         }
   57169             : 
   57170           0 :         return py_srvsvc_NetGetFileSecurity_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   57171             : }
   57172             : 
   57173           0 : static PyObject *py_srvsvc_NetGetFileSecurity_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   57174             : {
   57175           0 :         const struct ndr_interface_call *call = NULL;
   57176           0 :         struct srvsvc_NetGetFileSecurity *object = (struct srvsvc_NetGetFileSecurity *)pytalloc_get_ptr(py_obj);
   57177           0 :         struct ndr_pull *pull = NULL;
   57178             :         enum ndr_err_code err;
   57179             : 
   57180           0 :         if (ndr_table_srvsvc.num_calls < 40) {
   57181           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetGetFileSecurity_ndr_unpack");
   57182           0 :                 return NULL;
   57183             :         }
   57184           0 :         call = &ndr_table_srvsvc.calls[39];
   57185             : 
   57186           0 :         pull = ndr_pull_init_blob(blob, object);
   57187           0 :         if (pull == NULL) {
   57188           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   57189           0 :                 return NULL;
   57190             :         }
   57191             : 
   57192           0 :         pull->flags |= ndr_pull_flags;
   57193             : 
   57194           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   57195           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   57196           0 :                 TALLOC_FREE(pull);
   57197           0 :                 PyErr_SetNdrError(err);
   57198           0 :                 return NULL;
   57199             :         }
   57200           0 :         if (!allow_remaining) {
   57201             :                 uint32_t highest_ofs;
   57202             : 
   57203           0 :                 if (pull->offset > pull->relative_highest_offset) {
   57204           0 :                         highest_ofs = pull->offset;
   57205             :                 } else {
   57206           0 :                         highest_ofs = pull->relative_highest_offset;
   57207             :                 }
   57208           0 :                 if (highest_ofs < pull->data_size) {
   57209           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   57210             :                                 "not all bytes consumed ofs[%u] size[%u]",
   57211             :                                 highest_ofs, pull->data_size);
   57212           0 :                         TALLOC_FREE(pull);
   57213           0 :                         PyErr_SetNdrError(err);
   57214           0 :                         return NULL;
   57215             :                 }
   57216             :         }
   57217             : 
   57218           0 :         TALLOC_FREE(pull);
   57219           0 :         Py_RETURN_NONE;
   57220             : }
   57221             : 
   57222           0 : static PyObject *py_srvsvc_NetGetFileSecurity_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   57223             : {
   57224             :         DATA_BLOB blob;
   57225           0 :         Py_ssize_t blob_length = 0;
   57226           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   57227           0 :         PyObject *bigendian_obj = NULL;
   57228           0 :         PyObject *ndr64_obj = NULL;
   57229           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   57230           0 :         PyObject *allow_remaining_obj = NULL;
   57231           0 :         bool allow_remaining = false;
   57232             : 
   57233           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   57234             :                 discard_const_p(char *, kwnames),
   57235             :                 &blob.data, &blob_length,
   57236             :                 &bigendian_obj,
   57237             :                 &ndr64_obj,
   57238             :                 &allow_remaining_obj)) {
   57239           0 :                 return NULL;
   57240             :         }
   57241           0 :         blob.length = blob_length;
   57242             : 
   57243           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   57244           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   57245             :         }
   57246           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   57247           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   57248             :         }
   57249             : 
   57250           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   57251           0 :                 allow_remaining = true;
   57252             :         }
   57253             : 
   57254           0 :         return py_srvsvc_NetGetFileSecurity_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   57255             : }
   57256             : 
   57257           0 : static PyObject *py_srvsvc_NetGetFileSecurity_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   57258             : {
   57259             :         DATA_BLOB blob;
   57260           0 :         Py_ssize_t blob_length = 0;
   57261           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   57262           0 :         PyObject *bigendian_obj = NULL;
   57263           0 :         PyObject *ndr64_obj = NULL;
   57264           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   57265           0 :         PyObject *allow_remaining_obj = NULL;
   57266           0 :         bool allow_remaining = false;
   57267             : 
   57268           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   57269             :                 discard_const_p(char *, kwnames),
   57270             :                 &blob.data, &blob_length,
   57271             :                 &bigendian_obj,
   57272             :                 &ndr64_obj,
   57273             :                 &allow_remaining_obj)) {
   57274           0 :                 return NULL;
   57275             :         }
   57276           0 :         blob.length = blob_length;
   57277             : 
   57278           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   57279           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   57280             :         }
   57281           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   57282           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   57283             :         }
   57284             : 
   57285           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   57286           0 :                 allow_remaining = true;
   57287             :         }
   57288             : 
   57289           0 :         return py_srvsvc_NetGetFileSecurity_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   57290             : }
   57291             : 
   57292           0 : static PyObject *py_srvsvc_NetGetFileSecurity_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   57293             : {
   57294           0 :         const struct ndr_interface_call *call = NULL;
   57295           0 :         struct srvsvc_NetGetFileSecurity *object = (struct srvsvc_NetGetFileSecurity *)pytalloc_get_ptr(py_obj);
   57296             :         PyObject *ret;
   57297             :         char *retstr;
   57298             : 
   57299           0 :         if (ndr_table_srvsvc.num_calls < 40) {
   57300           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetGetFileSecurity_ndr_print");
   57301           0 :                 return NULL;
   57302             :         }
   57303           0 :         call = &ndr_table_srvsvc.calls[39];
   57304             : 
   57305           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   57306           0 :         ret = PyUnicode_FromString(retstr);
   57307           0 :         TALLOC_FREE(retstr);
   57308             : 
   57309           0 :         return ret;
   57310             : }
   57311             : 
   57312           0 : static PyObject *py_srvsvc_NetGetFileSecurity_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   57313             : {
   57314           0 :         return py_srvsvc_NetGetFileSecurity_ndr_print(py_obj, "srvsvc_NetGetFileSecurity_in", NDR_IN);
   57315             : }
   57316             : 
   57317           0 : static PyObject *py_srvsvc_NetGetFileSecurity_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   57318             : {
   57319           0 :         return py_srvsvc_NetGetFileSecurity_ndr_print(py_obj, "srvsvc_NetGetFileSecurity_out", NDR_OUT);
   57320             : }
   57321             : 
   57322             : static PyMethodDef py_srvsvc_NetGetFileSecurity_methods[] = {
   57323             :         { "opnum", (PyCFunction)py_srvsvc_NetGetFileSecurity_ndr_opnum, METH_NOARGS|METH_CLASS,
   57324             :                 "srvsvc.NetGetFileSecurity.opnum() -> 39 (0x27) " },
   57325             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetGetFileSecurity_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   57326             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   57327             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetGetFileSecurity_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   57328             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   57329             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetGetFileSecurity_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   57330             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   57331             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetGetFileSecurity_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   57332             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   57333             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetGetFileSecurity_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   57334             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetGetFileSecurity_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   57335             :         { NULL, NULL, 0, NULL }
   57336             : };
   57337             : 
   57338             : 
   57339             : static PyTypeObject srvsvc_NetGetFileSecurity_Type = {
   57340             :         PyVarObject_HEAD_INIT(NULL, 0)
   57341             :         .tp_name = "srvsvc.NetGetFileSecurity",
   57342             :         .tp_getset = py_srvsvc_NetGetFileSecurity_getsetters,
   57343             :         .tp_methods = py_srvsvc_NetGetFileSecurity_methods,
   57344             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   57345             :         .tp_new = py_srvsvc_NetGetFileSecurity_new,
   57346             : };
   57347             : 
   57348           0 : static bool pack_py_srvsvc_NetGetFileSecurity_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetGetFileSecurity *r)
   57349             : {
   57350             :         PyObject *py_server_unc;
   57351             :         PyObject *py_share;
   57352             :         PyObject *py_file;
   57353             :         PyObject *py_securityinformation;
   57354           0 :         const char *kwnames[] = {
   57355             :                 "server_unc", "share", "file", "securityinformation", NULL
   57356             :         };
   57357             : 
   57358           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:srvsvc_NetGetFileSecurity", discard_const_p(char *, kwnames), &py_server_unc, &py_share, &py_file, &py_securityinformation)) {
   57359           0 :                 return false;
   57360             :         }
   57361             : 
   57362           0 :         if (py_server_unc == NULL) {
   57363           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   57364           0 :                 return false;
   57365             :         }
   57366           0 :         if (py_server_unc == Py_None) {
   57367           0 :                 r->in.server_unc = NULL;
   57368             :         } else {
   57369           0 :                 r->in.server_unc = NULL;
   57370             :                 {
   57371             :                         const char *test_str;
   57372             :                         const char *talloc_str;
   57373           0 :                         PyObject *unicode = NULL;
   57374           0 :                         if (PyUnicode_Check(py_server_unc)) {
   57375           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   57376           0 :                                 if (unicode == NULL) {
   57377           0 :                                         PyErr_NoMemory();
   57378           0 :                                         return false;
   57379             :                                 }
   57380           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   57381           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   57382           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   57383             :                         } else {
   57384           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   57385           0 :                                 return false;
   57386             :                         }
   57387           0 :                         talloc_str = talloc_strdup(r, test_str);
   57388           0 :                         if (unicode != NULL) {
   57389           0 :                                 Py_DECREF(unicode);
   57390             :                         }
   57391           0 :                         if (talloc_str == NULL) {
   57392           0 :                                 PyErr_NoMemory();
   57393           0 :                                 return false;
   57394             :                         }
   57395           0 :                         r->in.server_unc = talloc_str;
   57396             :                 }
   57397             :         }
   57398           0 :         if (py_share == NULL) {
   57399           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.share");
   57400           0 :                 return false;
   57401             :         }
   57402           0 :         if (py_share == Py_None) {
   57403           0 :                 r->in.share = NULL;
   57404             :         } else {
   57405           0 :                 r->in.share = NULL;
   57406             :                 {
   57407             :                         const char *test_str;
   57408             :                         const char *talloc_str;
   57409           0 :                         PyObject *unicode = NULL;
   57410           0 :                         if (PyUnicode_Check(py_share)) {
   57411           0 :                                 unicode = PyUnicode_AsEncodedString(py_share, "utf-8", "ignore");
   57412           0 :                                 if (unicode == NULL) {
   57413           0 :                                         PyErr_NoMemory();
   57414           0 :                                         return false;
   57415             :                                 }
   57416           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   57417           0 :                         } else if (PyBytes_Check(py_share)) {
   57418           0 :                                 test_str = PyBytes_AS_STRING(py_share);
   57419             :                         } else {
   57420           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share)->tp_name);
   57421           0 :                                 return false;
   57422             :                         }
   57423           0 :                         talloc_str = talloc_strdup(r, test_str);
   57424           0 :                         if (unicode != NULL) {
   57425           0 :                                 Py_DECREF(unicode);
   57426             :                         }
   57427           0 :                         if (talloc_str == NULL) {
   57428           0 :                                 PyErr_NoMemory();
   57429           0 :                                 return false;
   57430             :                         }
   57431           0 :                         r->in.share = talloc_str;
   57432             :                 }
   57433             :         }
   57434           0 :         if (py_file == NULL) {
   57435           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.file");
   57436           0 :                 return false;
   57437             :         }
   57438             :         {
   57439             :                 const char *test_str;
   57440             :                 const char *talloc_str;
   57441           0 :                 PyObject *unicode = NULL;
   57442           0 :                 if (PyUnicode_Check(py_file)) {
   57443           0 :                         unicode = PyUnicode_AsEncodedString(py_file, "utf-8", "ignore");
   57444           0 :                         if (unicode == NULL) {
   57445           0 :                                 PyErr_NoMemory();
   57446           0 :                                 return false;
   57447             :                         }
   57448           0 :                         test_str = PyBytes_AS_STRING(unicode);
   57449           0 :                 } else if (PyBytes_Check(py_file)) {
   57450           0 :                         test_str = PyBytes_AS_STRING(py_file);
   57451             :                 } else {
   57452           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_file)->tp_name);
   57453           0 :                         return false;
   57454             :                 }
   57455           0 :                 talloc_str = talloc_strdup(r, test_str);
   57456           0 :                 if (unicode != NULL) {
   57457           0 :                         Py_DECREF(unicode);
   57458             :                 }
   57459           0 :                 if (talloc_str == NULL) {
   57460           0 :                         PyErr_NoMemory();
   57461           0 :                         return false;
   57462             :                 }
   57463           0 :                 r->in.file = talloc_str;
   57464             :         }
   57465           0 :         if (py_securityinformation == NULL) {
   57466           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.securityinformation");
   57467           0 :                 return false;
   57468             :         }
   57469             :         {
   57470           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.securityinformation));
   57471           0 :                 if (PyLong_Check(py_securityinformation)) {
   57472             :                         unsigned long long test_var;
   57473           0 :                         test_var = PyLong_AsUnsignedLongLong(py_securityinformation);
   57474           0 :                         if (PyErr_Occurred() != NULL) {
   57475           0 :                                 return false;
   57476             :                         }
   57477           0 :                         if (test_var > uint_max) {
   57478           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   57479             :                                   PyLong_Type.tp_name, uint_max, test_var);
   57480           0 :                                 return false;
   57481             :                         }
   57482           0 :                         r->in.securityinformation = test_var;
   57483             :                 } else {
   57484           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   57485             :                           PyLong_Type.tp_name);
   57486           0 :                         return false;
   57487             :                 }
   57488             :         }
   57489           0 :         return true;
   57490             : }
   57491             : 
   57492           0 : static PyObject *unpack_py_srvsvc_NetGetFileSecurity_args_out(struct srvsvc_NetGetFileSecurity *r)
   57493             : {
   57494             :         PyObject *result;
   57495             :         PyObject *py_sd_buf;
   57496           0 :         if (*r->out.sd_buf == NULL) {
   57497           0 :                 py_sd_buf = Py_None;
   57498           0 :                 Py_INCREF(py_sd_buf);
   57499             :         } else {
   57500           0 :                 py_sd_buf = pytalloc_reference_ex(sec_desc_buf_Type, *r->out.sd_buf, *r->out.sd_buf);
   57501             :         }
   57502           0 :         result = py_sd_buf;
   57503           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   57504           0 :                 PyErr_SetWERROR(r->out.result);
   57505           0 :                 return NULL;
   57506             :         }
   57507             : 
   57508           0 :         return result;
   57509             : }
   57510             : 
   57511             : 
   57512           0 : static PyObject *py_srvsvc_NetSetFileSecurity_in_get_server_unc(PyObject *obj, void *closure)
   57513             : {
   57514           0 :         struct srvsvc_NetSetFileSecurity *object = (struct srvsvc_NetSetFileSecurity *)pytalloc_get_ptr(obj);
   57515             :         PyObject *py_server_unc;
   57516           0 :         if (object->in.server_unc == NULL) {
   57517           0 :                 Py_RETURN_NONE;
   57518             :         }
   57519           0 :         if (object->in.server_unc == NULL) {
   57520           0 :                 py_server_unc = Py_None;
   57521           0 :                 Py_INCREF(py_server_unc);
   57522             :         } else {
   57523           0 :                 if (object->in.server_unc == NULL) {
   57524           0 :                         py_server_unc = Py_None;
   57525           0 :                         Py_INCREF(py_server_unc);
   57526             :                 } else {
   57527           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   57528             :                 }
   57529             :         }
   57530           0 :         return py_server_unc;
   57531             : }
   57532             : 
   57533           0 : static int py_srvsvc_NetSetFileSecurity_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   57534             : {
   57535           0 :         struct srvsvc_NetSetFileSecurity *object = (struct srvsvc_NetSetFileSecurity *)pytalloc_get_ptr(py_obj);
   57536           0 :         if (value == NULL) {
   57537           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   57538           0 :                 return -1;
   57539             :         }
   57540           0 :         if (value == Py_None) {
   57541           0 :                 object->in.server_unc = NULL;
   57542             :         } else {
   57543           0 :                 object->in.server_unc = NULL;
   57544             :                 {
   57545             :                         const char *test_str;
   57546             :                         const char *talloc_str;
   57547           0 :                         PyObject *unicode = NULL;
   57548           0 :                         if (PyUnicode_Check(value)) {
   57549           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   57550           0 :                                 if (unicode == NULL) {
   57551           0 :                                         PyErr_NoMemory();
   57552           0 :                                         return -1;
   57553             :                                 }
   57554           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   57555           0 :                         } else if (PyBytes_Check(value)) {
   57556           0 :                                 test_str = PyBytes_AS_STRING(value);
   57557             :                         } else {
   57558           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   57559           0 :                                 return -1;
   57560             :                         }
   57561           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   57562           0 :                         if (unicode != NULL) {
   57563           0 :                                 Py_DECREF(unicode);
   57564             :                         }
   57565           0 :                         if (talloc_str == NULL) {
   57566           0 :                                 PyErr_NoMemory();
   57567           0 :                                 return -1;
   57568             :                         }
   57569           0 :                         object->in.server_unc = talloc_str;
   57570             :                 }
   57571             :         }
   57572           0 :         return 0;
   57573             : }
   57574             : 
   57575           0 : static PyObject *py_srvsvc_NetSetFileSecurity_in_get_share(PyObject *obj, void *closure)
   57576             : {
   57577           0 :         struct srvsvc_NetSetFileSecurity *object = (struct srvsvc_NetSetFileSecurity *)pytalloc_get_ptr(obj);
   57578             :         PyObject *py_share;
   57579           0 :         if (object->in.share == NULL) {
   57580           0 :                 Py_RETURN_NONE;
   57581             :         }
   57582           0 :         if (object->in.share == NULL) {
   57583           0 :                 py_share = Py_None;
   57584           0 :                 Py_INCREF(py_share);
   57585             :         } else {
   57586           0 :                 if (object->in.share == NULL) {
   57587           0 :                         py_share = Py_None;
   57588           0 :                         Py_INCREF(py_share);
   57589             :                 } else {
   57590           0 :                         py_share = PyUnicode_Decode(object->in.share, strlen(object->in.share), "utf-8", "ignore");
   57591             :                 }
   57592             :         }
   57593           0 :         return py_share;
   57594             : }
   57595             : 
   57596           0 : static int py_srvsvc_NetSetFileSecurity_in_set_share(PyObject *py_obj, PyObject *value, void *closure)
   57597             : {
   57598           0 :         struct srvsvc_NetSetFileSecurity *object = (struct srvsvc_NetSetFileSecurity *)pytalloc_get_ptr(py_obj);
   57599           0 :         if (value == NULL) {
   57600           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.share");
   57601           0 :                 return -1;
   57602             :         }
   57603           0 :         if (value == Py_None) {
   57604           0 :                 object->in.share = NULL;
   57605             :         } else {
   57606           0 :                 object->in.share = NULL;
   57607             :                 {
   57608             :                         const char *test_str;
   57609             :                         const char *talloc_str;
   57610           0 :                         PyObject *unicode = NULL;
   57611           0 :                         if (PyUnicode_Check(value)) {
   57612           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   57613           0 :                                 if (unicode == NULL) {
   57614           0 :                                         PyErr_NoMemory();
   57615           0 :                                         return -1;
   57616             :                                 }
   57617           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   57618           0 :                         } else if (PyBytes_Check(value)) {
   57619           0 :                                 test_str = PyBytes_AS_STRING(value);
   57620             :                         } else {
   57621           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   57622           0 :                                 return -1;
   57623             :                         }
   57624           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   57625           0 :                         if (unicode != NULL) {
   57626           0 :                                 Py_DECREF(unicode);
   57627             :                         }
   57628           0 :                         if (talloc_str == NULL) {
   57629           0 :                                 PyErr_NoMemory();
   57630           0 :                                 return -1;
   57631             :                         }
   57632           0 :                         object->in.share = talloc_str;
   57633             :                 }
   57634             :         }
   57635           0 :         return 0;
   57636             : }
   57637             : 
   57638           0 : static PyObject *py_srvsvc_NetSetFileSecurity_in_get_file(PyObject *obj, void *closure)
   57639             : {
   57640           0 :         struct srvsvc_NetSetFileSecurity *object = (struct srvsvc_NetSetFileSecurity *)pytalloc_get_ptr(obj);
   57641             :         PyObject *py_file;
   57642           0 :         if (object->in.file == NULL) {
   57643           0 :                 py_file = Py_None;
   57644           0 :                 Py_INCREF(py_file);
   57645             :         } else {
   57646           0 :                 py_file = PyUnicode_Decode(object->in.file, strlen(object->in.file), "utf-8", "ignore");
   57647             :         }
   57648           0 :         return py_file;
   57649             : }
   57650             : 
   57651           0 : static int py_srvsvc_NetSetFileSecurity_in_set_file(PyObject *py_obj, PyObject *value, void *closure)
   57652             : {
   57653           0 :         struct srvsvc_NetSetFileSecurity *object = (struct srvsvc_NetSetFileSecurity *)pytalloc_get_ptr(py_obj);
   57654           0 :         if (value == NULL) {
   57655           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.file");
   57656           0 :                 return -1;
   57657             :         }
   57658             :         {
   57659             :                 const char *test_str;
   57660             :                 const char *talloc_str;
   57661           0 :                 PyObject *unicode = NULL;
   57662           0 :                 if (PyUnicode_Check(value)) {
   57663           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   57664           0 :                         if (unicode == NULL) {
   57665           0 :                                 PyErr_NoMemory();
   57666           0 :                                 return -1;
   57667             :                         }
   57668           0 :                         test_str = PyBytes_AS_STRING(unicode);
   57669           0 :                 } else if (PyBytes_Check(value)) {
   57670           0 :                         test_str = PyBytes_AS_STRING(value);
   57671             :                 } else {
   57672           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   57673           0 :                         return -1;
   57674             :                 }
   57675           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   57676           0 :                 if (unicode != NULL) {
   57677           0 :                         Py_DECREF(unicode);
   57678             :                 }
   57679           0 :                 if (talloc_str == NULL) {
   57680           0 :                         PyErr_NoMemory();
   57681           0 :                         return -1;
   57682             :                 }
   57683           0 :                 object->in.file = talloc_str;
   57684             :         }
   57685           0 :         return 0;
   57686             : }
   57687             : 
   57688           0 : static PyObject *py_srvsvc_NetSetFileSecurity_in_get_securityinformation(PyObject *obj, void *closure)
   57689             : {
   57690           0 :         struct srvsvc_NetSetFileSecurity *object = (struct srvsvc_NetSetFileSecurity *)pytalloc_get_ptr(obj);
   57691             :         PyObject *py_securityinformation;
   57692           0 :         py_securityinformation = PyLong_FromUnsignedLongLong((uint32_t)object->in.securityinformation);
   57693           0 :         return py_securityinformation;
   57694             : }
   57695             : 
   57696           0 : static int py_srvsvc_NetSetFileSecurity_in_set_securityinformation(PyObject *py_obj, PyObject *value, void *closure)
   57697             : {
   57698           0 :         struct srvsvc_NetSetFileSecurity *object = (struct srvsvc_NetSetFileSecurity *)pytalloc_get_ptr(py_obj);
   57699           0 :         if (value == NULL) {
   57700           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.securityinformation");
   57701           0 :                 return -1;
   57702             :         }
   57703             :         {
   57704           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.securityinformation));
   57705           0 :                 if (PyLong_Check(value)) {
   57706             :                         unsigned long long test_var;
   57707           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   57708           0 :                         if (PyErr_Occurred() != NULL) {
   57709           0 :                                 return -1;
   57710             :                         }
   57711           0 :                         if (test_var > uint_max) {
   57712           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   57713             :                                   PyLong_Type.tp_name, uint_max, test_var);
   57714           0 :                                 return -1;
   57715             :                         }
   57716           0 :                         object->in.securityinformation = test_var;
   57717             :                 } else {
   57718           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   57719             :                           PyLong_Type.tp_name);
   57720           0 :                         return -1;
   57721             :                 }
   57722             :         }
   57723           0 :         return 0;
   57724             : }
   57725             : 
   57726           0 : static PyObject *py_srvsvc_NetSetFileSecurity_in_get_sd_buf(PyObject *obj, void *closure)
   57727             : {
   57728           0 :         struct srvsvc_NetSetFileSecurity *object = (struct srvsvc_NetSetFileSecurity *)pytalloc_get_ptr(obj);
   57729             :         PyObject *py_sd_buf;
   57730           0 :         if (object->in.sd_buf == NULL) {
   57731           0 :                 Py_RETURN_NONE;
   57732             :         }
   57733           0 :         py_sd_buf = pytalloc_reference_ex(sec_desc_buf_Type, object->in.sd_buf, object->in.sd_buf);
   57734           0 :         return py_sd_buf;
   57735             : }
   57736             : 
   57737           0 : static int py_srvsvc_NetSetFileSecurity_in_set_sd_buf(PyObject *py_obj, PyObject *value, void *closure)
   57738             : {
   57739           0 :         struct srvsvc_NetSetFileSecurity *object = (struct srvsvc_NetSetFileSecurity *)pytalloc_get_ptr(py_obj);
   57740           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.sd_buf));
   57741           0 :         if (value == NULL) {
   57742           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.sd_buf");
   57743           0 :                 return -1;
   57744             :         }
   57745           0 :         object->in.sd_buf = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.sd_buf);
   57746           0 :         if (object->in.sd_buf == NULL) {
   57747           0 :                 PyErr_NoMemory();
   57748           0 :                 return -1;
   57749             :         }
   57750           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
   57751           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   57752           0 :                 PyErr_NoMemory();
   57753           0 :                 return -1;
   57754             :         }
   57755           0 :         object->in.sd_buf = (struct sec_desc_buf *)pytalloc_get_ptr(value);
   57756           0 :         return 0;
   57757             : }
   57758             : 
   57759           0 : static PyObject *py_srvsvc_NetSetFileSecurity_get_result(PyObject *obj, void *closure)
   57760             : {
   57761           0 :         struct srvsvc_NetSetFileSecurity *object = (struct srvsvc_NetSetFileSecurity *)pytalloc_get_ptr(obj);
   57762             :         PyObject *py_result;
   57763           0 :         py_result = PyErr_FromWERROR(object->out.result);
   57764           0 :         return py_result;
   57765             : }
   57766             : 
   57767           0 : static int py_srvsvc_NetSetFileSecurity_set_result(PyObject *py_obj, PyObject *value, void *closure)
   57768             : {
   57769           0 :         struct srvsvc_NetSetFileSecurity *object = (struct srvsvc_NetSetFileSecurity *)pytalloc_get_ptr(py_obj);
   57770           0 :         if (value == NULL) {
   57771           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   57772           0 :                 return -1;
   57773             :         }
   57774           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   57775           0 :         return 0;
   57776             : }
   57777             : 
   57778             : static PyGetSetDef py_srvsvc_NetSetFileSecurity_getsetters[] = {
   57779             :         {
   57780             :                 .name = discard_const_p(char, "in_server_unc"),
   57781             :                 .get = py_srvsvc_NetSetFileSecurity_in_get_server_unc,
   57782             :                 .set = py_srvsvc_NetSetFileSecurity_in_set_server_unc,
   57783             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   57784             :         },
   57785             :         {
   57786             :                 .name = discard_const_p(char, "in_share"),
   57787             :                 .get = py_srvsvc_NetSetFileSecurity_in_get_share,
   57788             :                 .set = py_srvsvc_NetSetFileSecurity_in_set_share,
   57789             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   57790             :         },
   57791             :         {
   57792             :                 .name = discard_const_p(char, "in_file"),
   57793             :                 .get = py_srvsvc_NetSetFileSecurity_in_get_file,
   57794             :                 .set = py_srvsvc_NetSetFileSecurity_in_set_file,
   57795             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   57796             :         },
   57797             :         {
   57798             :                 .name = discard_const_p(char, "in_securityinformation"),
   57799             :                 .get = py_srvsvc_NetSetFileSecurity_in_get_securityinformation,
   57800             :                 .set = py_srvsvc_NetSetFileSecurity_in_set_securityinformation,
   57801             :                 .doc = discard_const_p(char, "PIDL-generated element of base type security_secinfo")
   57802             :         },
   57803             :         {
   57804             :                 .name = discard_const_p(char, "in_sd_buf"),
   57805             :                 .get = py_srvsvc_NetSetFileSecurity_in_get_sd_buf,
   57806             :                 .set = py_srvsvc_NetSetFileSecurity_in_set_sd_buf,
   57807             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
   57808             :         },
   57809             :         {
   57810             :                 .name = discard_const_p(char, "result"),
   57811             :                 .get = py_srvsvc_NetSetFileSecurity_get_result,
   57812             :                 .set = py_srvsvc_NetSetFileSecurity_set_result,
   57813             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   57814             :         },
   57815             :         { .name = NULL }
   57816             : };
   57817             : 
   57818           0 : static PyObject *py_srvsvc_NetSetFileSecurity_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   57819             : {
   57820           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetSetFileSecurity, type);
   57821           0 :         struct srvsvc_NetSetFileSecurity *_self = (struct srvsvc_NetSetFileSecurity *)pytalloc_get_ptr(self);
   57822           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   57823           0 :         _self->in.sd_buf = talloc_zero(mem_ctx, struct sec_desc_buf);
   57824           0 :         return self;
   57825             : }
   57826             : 
   57827           0 : static PyObject *py_srvsvc_NetSetFileSecurity_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   57828             : {
   57829             : 
   57830             : 
   57831           0 :         return PyLong_FromLong(40);
   57832             : }
   57833             : 
   57834           0 : static PyObject *py_srvsvc_NetSetFileSecurity_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   57835             : {
   57836           0 :         const struct ndr_interface_call *call = NULL;
   57837           0 :         struct srvsvc_NetSetFileSecurity *object = (struct srvsvc_NetSetFileSecurity *)pytalloc_get_ptr(py_obj);
   57838           0 :         PyObject *ret = NULL;
   57839           0 :         struct ndr_push *push = NULL;
   57840             :         DATA_BLOB blob;
   57841             :         enum ndr_err_code err;
   57842             : 
   57843           0 :         if (ndr_table_srvsvc.num_calls < 41) {
   57844           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSetFileSecurity_ndr_pack");
   57845           0 :                 return NULL;
   57846             :         }
   57847           0 :         call = &ndr_table_srvsvc.calls[40];
   57848             : 
   57849           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   57850           0 :         if (push == NULL) {
   57851           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   57852           0 :                 return NULL;
   57853             :         }
   57854             : 
   57855           0 :         push->flags |= ndr_push_flags;
   57856             : 
   57857           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   57858           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   57859           0 :                 TALLOC_FREE(push);
   57860           0 :                 PyErr_SetNdrError(err);
   57861           0 :                 return NULL;
   57862             :         }
   57863           0 :         blob = ndr_push_blob(push);
   57864           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   57865           0 :         TALLOC_FREE(push);
   57866           0 :         return ret;
   57867             : }
   57868             : 
   57869           0 : static PyObject *py_srvsvc_NetSetFileSecurity_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   57870             : {
   57871           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   57872           0 :         PyObject *bigendian_obj = NULL;
   57873           0 :         PyObject *ndr64_obj = NULL;
   57874           0 :         uint32_t ndr_push_flags = 0;
   57875             : 
   57876           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   57877             :                 discard_const_p(char *, kwnames),
   57878             :                 &bigendian_obj,
   57879             :                 &ndr64_obj)) {
   57880           0 :                 return NULL;
   57881             :         }
   57882             : 
   57883           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   57884           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   57885             :         }
   57886           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   57887           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   57888             :         }
   57889             : 
   57890           0 :         return py_srvsvc_NetSetFileSecurity_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   57891             : }
   57892             : 
   57893           0 : static PyObject *py_srvsvc_NetSetFileSecurity_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   57894             : {
   57895           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   57896           0 :         PyObject *bigendian_obj = NULL;
   57897           0 :         PyObject *ndr64_obj = NULL;
   57898           0 :         uint32_t ndr_push_flags = 0;
   57899             : 
   57900           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   57901             :                 discard_const_p(char *, kwnames),
   57902             :                 &bigendian_obj,
   57903             :                 &ndr64_obj)) {
   57904           0 :                 return NULL;
   57905             :         }
   57906             : 
   57907           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   57908           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   57909             :         }
   57910           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   57911           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   57912             :         }
   57913             : 
   57914           0 :         return py_srvsvc_NetSetFileSecurity_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   57915             : }
   57916             : 
   57917           0 : static PyObject *py_srvsvc_NetSetFileSecurity_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   57918             : {
   57919           0 :         const struct ndr_interface_call *call = NULL;
   57920           0 :         struct srvsvc_NetSetFileSecurity *object = (struct srvsvc_NetSetFileSecurity *)pytalloc_get_ptr(py_obj);
   57921           0 :         struct ndr_pull *pull = NULL;
   57922             :         enum ndr_err_code err;
   57923             : 
   57924           0 :         if (ndr_table_srvsvc.num_calls < 41) {
   57925           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSetFileSecurity_ndr_unpack");
   57926           0 :                 return NULL;
   57927             :         }
   57928           0 :         call = &ndr_table_srvsvc.calls[40];
   57929             : 
   57930           0 :         pull = ndr_pull_init_blob(blob, object);
   57931           0 :         if (pull == NULL) {
   57932           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   57933           0 :                 return NULL;
   57934             :         }
   57935             : 
   57936           0 :         pull->flags |= ndr_pull_flags;
   57937             : 
   57938           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   57939           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   57940           0 :                 TALLOC_FREE(pull);
   57941           0 :                 PyErr_SetNdrError(err);
   57942           0 :                 return NULL;
   57943             :         }
   57944           0 :         if (!allow_remaining) {
   57945             :                 uint32_t highest_ofs;
   57946             : 
   57947           0 :                 if (pull->offset > pull->relative_highest_offset) {
   57948           0 :                         highest_ofs = pull->offset;
   57949             :                 } else {
   57950           0 :                         highest_ofs = pull->relative_highest_offset;
   57951             :                 }
   57952           0 :                 if (highest_ofs < pull->data_size) {
   57953           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   57954             :                                 "not all bytes consumed ofs[%u] size[%u]",
   57955             :                                 highest_ofs, pull->data_size);
   57956           0 :                         TALLOC_FREE(pull);
   57957           0 :                         PyErr_SetNdrError(err);
   57958           0 :                         return NULL;
   57959             :                 }
   57960             :         }
   57961             : 
   57962           0 :         TALLOC_FREE(pull);
   57963           0 :         Py_RETURN_NONE;
   57964             : }
   57965             : 
   57966           0 : static PyObject *py_srvsvc_NetSetFileSecurity_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   57967             : {
   57968             :         DATA_BLOB blob;
   57969           0 :         Py_ssize_t blob_length = 0;
   57970           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   57971           0 :         PyObject *bigendian_obj = NULL;
   57972           0 :         PyObject *ndr64_obj = NULL;
   57973           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   57974           0 :         PyObject *allow_remaining_obj = NULL;
   57975           0 :         bool allow_remaining = false;
   57976             : 
   57977           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   57978             :                 discard_const_p(char *, kwnames),
   57979             :                 &blob.data, &blob_length,
   57980             :                 &bigendian_obj,
   57981             :                 &ndr64_obj,
   57982             :                 &allow_remaining_obj)) {
   57983           0 :                 return NULL;
   57984             :         }
   57985           0 :         blob.length = blob_length;
   57986             : 
   57987           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   57988           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   57989             :         }
   57990           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   57991           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   57992             :         }
   57993             : 
   57994           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   57995           0 :                 allow_remaining = true;
   57996             :         }
   57997             : 
   57998           0 :         return py_srvsvc_NetSetFileSecurity_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   57999             : }
   58000             : 
   58001           0 : static PyObject *py_srvsvc_NetSetFileSecurity_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   58002             : {
   58003             :         DATA_BLOB blob;
   58004           0 :         Py_ssize_t blob_length = 0;
   58005           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   58006           0 :         PyObject *bigendian_obj = NULL;
   58007           0 :         PyObject *ndr64_obj = NULL;
   58008           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   58009           0 :         PyObject *allow_remaining_obj = NULL;
   58010           0 :         bool allow_remaining = false;
   58011             : 
   58012           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   58013             :                 discard_const_p(char *, kwnames),
   58014             :                 &blob.data, &blob_length,
   58015             :                 &bigendian_obj,
   58016             :                 &ndr64_obj,
   58017             :                 &allow_remaining_obj)) {
   58018           0 :                 return NULL;
   58019             :         }
   58020           0 :         blob.length = blob_length;
   58021             : 
   58022           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   58023           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   58024             :         }
   58025           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   58026           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   58027             :         }
   58028             : 
   58029           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   58030           0 :                 allow_remaining = true;
   58031             :         }
   58032             : 
   58033           0 :         return py_srvsvc_NetSetFileSecurity_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   58034             : }
   58035             : 
   58036           0 : static PyObject *py_srvsvc_NetSetFileSecurity_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   58037             : {
   58038           0 :         const struct ndr_interface_call *call = NULL;
   58039           0 :         struct srvsvc_NetSetFileSecurity *object = (struct srvsvc_NetSetFileSecurity *)pytalloc_get_ptr(py_obj);
   58040             :         PyObject *ret;
   58041             :         char *retstr;
   58042             : 
   58043           0 :         if (ndr_table_srvsvc.num_calls < 41) {
   58044           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetSetFileSecurity_ndr_print");
   58045           0 :                 return NULL;
   58046             :         }
   58047           0 :         call = &ndr_table_srvsvc.calls[40];
   58048             : 
   58049           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   58050           0 :         ret = PyUnicode_FromString(retstr);
   58051           0 :         TALLOC_FREE(retstr);
   58052             : 
   58053           0 :         return ret;
   58054             : }
   58055             : 
   58056           0 : static PyObject *py_srvsvc_NetSetFileSecurity_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   58057             : {
   58058           0 :         return py_srvsvc_NetSetFileSecurity_ndr_print(py_obj, "srvsvc_NetSetFileSecurity_in", NDR_IN);
   58059             : }
   58060             : 
   58061           0 : static PyObject *py_srvsvc_NetSetFileSecurity_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   58062             : {
   58063           0 :         return py_srvsvc_NetSetFileSecurity_ndr_print(py_obj, "srvsvc_NetSetFileSecurity_out", NDR_OUT);
   58064             : }
   58065             : 
   58066             : static PyMethodDef py_srvsvc_NetSetFileSecurity_methods[] = {
   58067             :         { "opnum", (PyCFunction)py_srvsvc_NetSetFileSecurity_ndr_opnum, METH_NOARGS|METH_CLASS,
   58068             :                 "srvsvc.NetSetFileSecurity.opnum() -> 40 (0x28) " },
   58069             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSetFileSecurity_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   58070             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   58071             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSetFileSecurity_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   58072             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   58073             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSetFileSecurity_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   58074             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   58075             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetSetFileSecurity_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   58076             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   58077             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetSetFileSecurity_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   58078             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetSetFileSecurity_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   58079             :         { NULL, NULL, 0, NULL }
   58080             : };
   58081             : 
   58082             : 
   58083             : static PyTypeObject srvsvc_NetSetFileSecurity_Type = {
   58084             :         PyVarObject_HEAD_INIT(NULL, 0)
   58085             :         .tp_name = "srvsvc.NetSetFileSecurity",
   58086             :         .tp_getset = py_srvsvc_NetSetFileSecurity_getsetters,
   58087             :         .tp_methods = py_srvsvc_NetSetFileSecurity_methods,
   58088             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   58089             :         .tp_new = py_srvsvc_NetSetFileSecurity_new,
   58090             : };
   58091             : 
   58092           0 : static bool pack_py_srvsvc_NetSetFileSecurity_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetSetFileSecurity *r)
   58093             : {
   58094             :         PyObject *py_server_unc;
   58095             :         PyObject *py_share;
   58096             :         PyObject *py_file;
   58097             :         PyObject *py_securityinformation;
   58098             :         PyObject *py_sd_buf;
   58099           0 :         const char *kwnames[] = {
   58100             :                 "server_unc", "share", "file", "securityinformation", "sd_buf", NULL
   58101             :         };
   58102             : 
   58103           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:srvsvc_NetSetFileSecurity", discard_const_p(char *, kwnames), &py_server_unc, &py_share, &py_file, &py_securityinformation, &py_sd_buf)) {
   58104           0 :                 return false;
   58105             :         }
   58106             : 
   58107           0 :         if (py_server_unc == NULL) {
   58108           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   58109           0 :                 return false;
   58110             :         }
   58111           0 :         if (py_server_unc == Py_None) {
   58112           0 :                 r->in.server_unc = NULL;
   58113             :         } else {
   58114           0 :                 r->in.server_unc = NULL;
   58115             :                 {
   58116             :                         const char *test_str;
   58117             :                         const char *talloc_str;
   58118           0 :                         PyObject *unicode = NULL;
   58119           0 :                         if (PyUnicode_Check(py_server_unc)) {
   58120           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   58121           0 :                                 if (unicode == NULL) {
   58122           0 :                                         PyErr_NoMemory();
   58123           0 :                                         return false;
   58124             :                                 }
   58125           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   58126           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   58127           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   58128             :                         } else {
   58129           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   58130           0 :                                 return false;
   58131             :                         }
   58132           0 :                         talloc_str = talloc_strdup(r, test_str);
   58133           0 :                         if (unicode != NULL) {
   58134           0 :                                 Py_DECREF(unicode);
   58135             :                         }
   58136           0 :                         if (talloc_str == NULL) {
   58137           0 :                                 PyErr_NoMemory();
   58138           0 :                                 return false;
   58139             :                         }
   58140           0 :                         r->in.server_unc = talloc_str;
   58141             :                 }
   58142             :         }
   58143           0 :         if (py_share == NULL) {
   58144           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.share");
   58145           0 :                 return false;
   58146             :         }
   58147           0 :         if (py_share == Py_None) {
   58148           0 :                 r->in.share = NULL;
   58149             :         } else {
   58150           0 :                 r->in.share = NULL;
   58151             :                 {
   58152             :                         const char *test_str;
   58153             :                         const char *talloc_str;
   58154           0 :                         PyObject *unicode = NULL;
   58155           0 :                         if (PyUnicode_Check(py_share)) {
   58156           0 :                                 unicode = PyUnicode_AsEncodedString(py_share, "utf-8", "ignore");
   58157           0 :                                 if (unicode == NULL) {
   58158           0 :                                         PyErr_NoMemory();
   58159           0 :                                         return false;
   58160             :                                 }
   58161           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   58162           0 :                         } else if (PyBytes_Check(py_share)) {
   58163           0 :                                 test_str = PyBytes_AS_STRING(py_share);
   58164             :                         } else {
   58165           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_share)->tp_name);
   58166           0 :                                 return false;
   58167             :                         }
   58168           0 :                         talloc_str = talloc_strdup(r, test_str);
   58169           0 :                         if (unicode != NULL) {
   58170           0 :                                 Py_DECREF(unicode);
   58171             :                         }
   58172           0 :                         if (talloc_str == NULL) {
   58173           0 :                                 PyErr_NoMemory();
   58174           0 :                                 return false;
   58175             :                         }
   58176           0 :                         r->in.share = talloc_str;
   58177             :                 }
   58178             :         }
   58179           0 :         if (py_file == NULL) {
   58180           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.file");
   58181           0 :                 return false;
   58182             :         }
   58183             :         {
   58184             :                 const char *test_str;
   58185             :                 const char *talloc_str;
   58186           0 :                 PyObject *unicode = NULL;
   58187           0 :                 if (PyUnicode_Check(py_file)) {
   58188           0 :                         unicode = PyUnicode_AsEncodedString(py_file, "utf-8", "ignore");
   58189           0 :                         if (unicode == NULL) {
   58190           0 :                                 PyErr_NoMemory();
   58191           0 :                                 return false;
   58192             :                         }
   58193           0 :                         test_str = PyBytes_AS_STRING(unicode);
   58194           0 :                 } else if (PyBytes_Check(py_file)) {
   58195           0 :                         test_str = PyBytes_AS_STRING(py_file);
   58196             :                 } else {
   58197           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_file)->tp_name);
   58198           0 :                         return false;
   58199             :                 }
   58200           0 :                 talloc_str = talloc_strdup(r, test_str);
   58201           0 :                 if (unicode != NULL) {
   58202           0 :                         Py_DECREF(unicode);
   58203             :                 }
   58204           0 :                 if (talloc_str == NULL) {
   58205           0 :                         PyErr_NoMemory();
   58206           0 :                         return false;
   58207             :                 }
   58208           0 :                 r->in.file = talloc_str;
   58209             :         }
   58210           0 :         if (py_securityinformation == NULL) {
   58211           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.securityinformation");
   58212           0 :                 return false;
   58213             :         }
   58214             :         {
   58215           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.securityinformation));
   58216           0 :                 if (PyLong_Check(py_securityinformation)) {
   58217             :                         unsigned long long test_var;
   58218           0 :                         test_var = PyLong_AsUnsignedLongLong(py_securityinformation);
   58219           0 :                         if (PyErr_Occurred() != NULL) {
   58220           0 :                                 return false;
   58221             :                         }
   58222           0 :                         if (test_var > uint_max) {
   58223           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   58224             :                                   PyLong_Type.tp_name, uint_max, test_var);
   58225           0 :                                 return false;
   58226             :                         }
   58227           0 :                         r->in.securityinformation = test_var;
   58228             :                 } else {
   58229           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   58230             :                           PyLong_Type.tp_name);
   58231           0 :                         return false;
   58232             :                 }
   58233             :         }
   58234           0 :         if (py_sd_buf == NULL) {
   58235           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.sd_buf");
   58236           0 :                 return false;
   58237             :         }
   58238           0 :         r->in.sd_buf = talloc_ptrtype(r, r->in.sd_buf);
   58239           0 :         if (r->in.sd_buf == NULL) {
   58240           0 :                 PyErr_NoMemory();
   58241           0 :                 return false;
   58242             :         }
   58243           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, py_sd_buf, return false;);
   58244           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_sd_buf)) == NULL) {
   58245           0 :                 PyErr_NoMemory();
   58246           0 :                 return false;
   58247             :         }
   58248           0 :         r->in.sd_buf = (struct sec_desc_buf *)pytalloc_get_ptr(py_sd_buf);
   58249           0 :         return true;
   58250             : }
   58251             : 
   58252           0 : static PyObject *unpack_py_srvsvc_NetSetFileSecurity_args_out(struct srvsvc_NetSetFileSecurity *r)
   58253             : {
   58254             :         PyObject *result;
   58255           0 :         result = Py_None;
   58256           0 :         Py_INCREF(result);
   58257           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   58258           0 :                 PyErr_SetWERROR(r->out.result);
   58259           0 :                 return NULL;
   58260             :         }
   58261             : 
   58262           0 :         return result;
   58263             : }
   58264             : 
   58265             : 
   58266           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_in_get_server_unc(PyObject *obj, void *closure)
   58267             : {
   58268           0 :         struct srvsvc_NetServerTransportAddEx *object = (struct srvsvc_NetServerTransportAddEx *)pytalloc_get_ptr(obj);
   58269             :         PyObject *py_server_unc;
   58270           0 :         if (object->in.server_unc == NULL) {
   58271           0 :                 Py_RETURN_NONE;
   58272             :         }
   58273           0 :         if (object->in.server_unc == NULL) {
   58274           0 :                 py_server_unc = Py_None;
   58275           0 :                 Py_INCREF(py_server_unc);
   58276             :         } else {
   58277           0 :                 if (object->in.server_unc == NULL) {
   58278           0 :                         py_server_unc = Py_None;
   58279           0 :                         Py_INCREF(py_server_unc);
   58280             :                 } else {
   58281           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   58282             :                 }
   58283             :         }
   58284           0 :         return py_server_unc;
   58285             : }
   58286             : 
   58287           0 : static int py_srvsvc_NetServerTransportAddEx_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   58288             : {
   58289           0 :         struct srvsvc_NetServerTransportAddEx *object = (struct srvsvc_NetServerTransportAddEx *)pytalloc_get_ptr(py_obj);
   58290           0 :         if (value == NULL) {
   58291           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   58292           0 :                 return -1;
   58293             :         }
   58294           0 :         if (value == Py_None) {
   58295           0 :                 object->in.server_unc = NULL;
   58296             :         } else {
   58297           0 :                 object->in.server_unc = NULL;
   58298             :                 {
   58299             :                         const char *test_str;
   58300             :                         const char *talloc_str;
   58301           0 :                         PyObject *unicode = NULL;
   58302           0 :                         if (PyUnicode_Check(value)) {
   58303           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   58304           0 :                                 if (unicode == NULL) {
   58305           0 :                                         PyErr_NoMemory();
   58306           0 :                                         return -1;
   58307             :                                 }
   58308           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   58309           0 :                         } else if (PyBytes_Check(value)) {
   58310           0 :                                 test_str = PyBytes_AS_STRING(value);
   58311             :                         } else {
   58312           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   58313           0 :                                 return -1;
   58314             :                         }
   58315           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   58316           0 :                         if (unicode != NULL) {
   58317           0 :                                 Py_DECREF(unicode);
   58318             :                         }
   58319           0 :                         if (talloc_str == NULL) {
   58320           0 :                                 PyErr_NoMemory();
   58321           0 :                                 return -1;
   58322             :                         }
   58323           0 :                         object->in.server_unc = talloc_str;
   58324             :                 }
   58325             :         }
   58326           0 :         return 0;
   58327             : }
   58328             : 
   58329           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_in_get_level(PyObject *obj, void *closure)
   58330             : {
   58331           0 :         struct srvsvc_NetServerTransportAddEx *object = (struct srvsvc_NetServerTransportAddEx *)pytalloc_get_ptr(obj);
   58332             :         PyObject *py_level;
   58333           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   58334           0 :         return py_level;
   58335             : }
   58336             : 
   58337           0 : static int py_srvsvc_NetServerTransportAddEx_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   58338             : {
   58339           0 :         struct srvsvc_NetServerTransportAddEx *object = (struct srvsvc_NetServerTransportAddEx *)pytalloc_get_ptr(py_obj);
   58340           0 :         if (value == NULL) {
   58341           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   58342           0 :                 return -1;
   58343             :         }
   58344             :         {
   58345           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   58346           0 :                 if (PyLong_Check(value)) {
   58347             :                         unsigned long long test_var;
   58348           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   58349           0 :                         if (PyErr_Occurred() != NULL) {
   58350           0 :                                 return -1;
   58351             :                         }
   58352           0 :                         if (test_var > uint_max) {
   58353           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   58354             :                                   PyLong_Type.tp_name, uint_max, test_var);
   58355           0 :                                 return -1;
   58356             :                         }
   58357           0 :                         object->in.level = test_var;
   58358             :                 } else {
   58359           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   58360             :                           PyLong_Type.tp_name);
   58361           0 :                         return -1;
   58362             :                 }
   58363             :         }
   58364           0 :         return 0;
   58365             : }
   58366             : 
   58367           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_in_get_info(PyObject *obj, void *closure)
   58368             : {
   58369           0 :         struct srvsvc_NetServerTransportAddEx *object = (struct srvsvc_NetServerTransportAddEx *)pytalloc_get_ptr(obj);
   58370             :         PyObject *py_info;
   58371           0 :         py_info = pyrpc_import_union(&srvsvc_NetTransportInfo_Type, pytalloc_get_mem_ctx(obj), object->in.level, &object->in.info, "union srvsvc_NetTransportInfo");
   58372           0 :         if (py_info == NULL) {
   58373           0 :                 return NULL;
   58374             :         }
   58375           0 :         return py_info;
   58376             : }
   58377             : 
   58378           0 : static int py_srvsvc_NetServerTransportAddEx_in_set_info(PyObject *py_obj, PyObject *value, void *closure)
   58379             : {
   58380           0 :         struct srvsvc_NetServerTransportAddEx *object = (struct srvsvc_NetServerTransportAddEx *)pytalloc_get_ptr(py_obj);
   58381           0 :         if (value == NULL) {
   58382           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.info");
   58383           0 :                 return -1;
   58384             :         }
   58385             :         {
   58386             :                 union srvsvc_NetTransportInfo *info_switch_0;
   58387           0 :                 info_switch_0 = (union srvsvc_NetTransportInfo *)pyrpc_export_union(&srvsvc_NetTransportInfo_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union srvsvc_NetTransportInfo");
   58388           0 :                 if (info_switch_0 == NULL) {
   58389           0 :                         return -1;
   58390             :                 }
   58391           0 :                 object->in.info = *info_switch_0;
   58392             :         }
   58393           0 :         return 0;
   58394             : }
   58395             : 
   58396           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_get_result(PyObject *obj, void *closure)
   58397             : {
   58398           0 :         struct srvsvc_NetServerTransportAddEx *object = (struct srvsvc_NetServerTransportAddEx *)pytalloc_get_ptr(obj);
   58399             :         PyObject *py_result;
   58400           0 :         py_result = PyErr_FromWERROR(object->out.result);
   58401           0 :         return py_result;
   58402             : }
   58403             : 
   58404           0 : static int py_srvsvc_NetServerTransportAddEx_set_result(PyObject *py_obj, PyObject *value, void *closure)
   58405             : {
   58406           0 :         struct srvsvc_NetServerTransportAddEx *object = (struct srvsvc_NetServerTransportAddEx *)pytalloc_get_ptr(py_obj);
   58407           0 :         if (value == NULL) {
   58408           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   58409           0 :                 return -1;
   58410             :         }
   58411           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   58412           0 :         return 0;
   58413             : }
   58414             : 
   58415             : static PyGetSetDef py_srvsvc_NetServerTransportAddEx_getsetters[] = {
   58416             :         {
   58417             :                 .name = discard_const_p(char, "in_server_unc"),
   58418             :                 .get = py_srvsvc_NetServerTransportAddEx_in_get_server_unc,
   58419             :                 .set = py_srvsvc_NetServerTransportAddEx_in_set_server_unc,
   58420             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   58421             :         },
   58422             :         {
   58423             :                 .name = discard_const_p(char, "in_level"),
   58424             :                 .get = py_srvsvc_NetServerTransportAddEx_in_get_level,
   58425             :                 .set = py_srvsvc_NetServerTransportAddEx_in_set_level,
   58426             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   58427             :         },
   58428             :         {
   58429             :                 .name = discard_const_p(char, "in_info"),
   58430             :                 .get = py_srvsvc_NetServerTransportAddEx_in_get_info,
   58431             :                 .set = py_srvsvc_NetServerTransportAddEx_in_set_info,
   58432             :                 .doc = discard_const_p(char, "PIDL-generated element of base type srvsvc_NetTransportInfo")
   58433             :         },
   58434             :         {
   58435             :                 .name = discard_const_p(char, "result"),
   58436             :                 .get = py_srvsvc_NetServerTransportAddEx_get_result,
   58437             :                 .set = py_srvsvc_NetServerTransportAddEx_set_result,
   58438             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   58439             :         },
   58440             :         { .name = NULL }
   58441             : };
   58442             : 
   58443           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   58444             : {
   58445           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetServerTransportAddEx, type);
   58446           0 :         return self;
   58447             : }
   58448             : 
   58449           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   58450             : {
   58451             : 
   58452             : 
   58453           0 :         return PyLong_FromLong(41);
   58454             : }
   58455             : 
   58456           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   58457             : {
   58458           0 :         const struct ndr_interface_call *call = NULL;
   58459           0 :         struct srvsvc_NetServerTransportAddEx *object = (struct srvsvc_NetServerTransportAddEx *)pytalloc_get_ptr(py_obj);
   58460           0 :         PyObject *ret = NULL;
   58461           0 :         struct ndr_push *push = NULL;
   58462             :         DATA_BLOB blob;
   58463             :         enum ndr_err_code err;
   58464             : 
   58465           0 :         if (ndr_table_srvsvc.num_calls < 42) {
   58466           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetServerTransportAddEx_ndr_pack");
   58467           0 :                 return NULL;
   58468             :         }
   58469           0 :         call = &ndr_table_srvsvc.calls[41];
   58470             : 
   58471           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   58472           0 :         if (push == NULL) {
   58473           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   58474           0 :                 return NULL;
   58475             :         }
   58476             : 
   58477           0 :         push->flags |= ndr_push_flags;
   58478             : 
   58479           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   58480           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   58481           0 :                 TALLOC_FREE(push);
   58482           0 :                 PyErr_SetNdrError(err);
   58483           0 :                 return NULL;
   58484             :         }
   58485           0 :         blob = ndr_push_blob(push);
   58486           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   58487           0 :         TALLOC_FREE(push);
   58488           0 :         return ret;
   58489             : }
   58490             : 
   58491           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   58492             : {
   58493           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   58494           0 :         PyObject *bigendian_obj = NULL;
   58495           0 :         PyObject *ndr64_obj = NULL;
   58496           0 :         uint32_t ndr_push_flags = 0;
   58497             : 
   58498           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   58499             :                 discard_const_p(char *, kwnames),
   58500             :                 &bigendian_obj,
   58501             :                 &ndr64_obj)) {
   58502           0 :                 return NULL;
   58503             :         }
   58504             : 
   58505           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   58506           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   58507             :         }
   58508           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   58509           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   58510             :         }
   58511             : 
   58512           0 :         return py_srvsvc_NetServerTransportAddEx_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   58513             : }
   58514             : 
   58515           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   58516             : {
   58517           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   58518           0 :         PyObject *bigendian_obj = NULL;
   58519           0 :         PyObject *ndr64_obj = NULL;
   58520           0 :         uint32_t ndr_push_flags = 0;
   58521             : 
   58522           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   58523             :                 discard_const_p(char *, kwnames),
   58524             :                 &bigendian_obj,
   58525             :                 &ndr64_obj)) {
   58526           0 :                 return NULL;
   58527             :         }
   58528             : 
   58529           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   58530           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   58531             :         }
   58532           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   58533           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   58534             :         }
   58535             : 
   58536           0 :         return py_srvsvc_NetServerTransportAddEx_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   58537             : }
   58538             : 
   58539           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   58540             : {
   58541           0 :         const struct ndr_interface_call *call = NULL;
   58542           0 :         struct srvsvc_NetServerTransportAddEx *object = (struct srvsvc_NetServerTransportAddEx *)pytalloc_get_ptr(py_obj);
   58543           0 :         struct ndr_pull *pull = NULL;
   58544             :         enum ndr_err_code err;
   58545             : 
   58546           0 :         if (ndr_table_srvsvc.num_calls < 42) {
   58547           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetServerTransportAddEx_ndr_unpack");
   58548           0 :                 return NULL;
   58549             :         }
   58550           0 :         call = &ndr_table_srvsvc.calls[41];
   58551             : 
   58552           0 :         pull = ndr_pull_init_blob(blob, object);
   58553           0 :         if (pull == NULL) {
   58554           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   58555           0 :                 return NULL;
   58556             :         }
   58557             : 
   58558           0 :         pull->flags |= ndr_pull_flags;
   58559             : 
   58560           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   58561           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   58562           0 :                 TALLOC_FREE(pull);
   58563           0 :                 PyErr_SetNdrError(err);
   58564           0 :                 return NULL;
   58565             :         }
   58566           0 :         if (!allow_remaining) {
   58567             :                 uint32_t highest_ofs;
   58568             : 
   58569           0 :                 if (pull->offset > pull->relative_highest_offset) {
   58570           0 :                         highest_ofs = pull->offset;
   58571             :                 } else {
   58572           0 :                         highest_ofs = pull->relative_highest_offset;
   58573             :                 }
   58574           0 :                 if (highest_ofs < pull->data_size) {
   58575           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   58576             :                                 "not all bytes consumed ofs[%u] size[%u]",
   58577             :                                 highest_ofs, pull->data_size);
   58578           0 :                         TALLOC_FREE(pull);
   58579           0 :                         PyErr_SetNdrError(err);
   58580           0 :                         return NULL;
   58581             :                 }
   58582             :         }
   58583             : 
   58584           0 :         TALLOC_FREE(pull);
   58585           0 :         Py_RETURN_NONE;
   58586             : }
   58587             : 
   58588           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   58589             : {
   58590             :         DATA_BLOB blob;
   58591           0 :         Py_ssize_t blob_length = 0;
   58592           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   58593           0 :         PyObject *bigendian_obj = NULL;
   58594           0 :         PyObject *ndr64_obj = NULL;
   58595           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   58596           0 :         PyObject *allow_remaining_obj = NULL;
   58597           0 :         bool allow_remaining = false;
   58598             : 
   58599           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   58600             :                 discard_const_p(char *, kwnames),
   58601             :                 &blob.data, &blob_length,
   58602             :                 &bigendian_obj,
   58603             :                 &ndr64_obj,
   58604             :                 &allow_remaining_obj)) {
   58605           0 :                 return NULL;
   58606             :         }
   58607           0 :         blob.length = blob_length;
   58608             : 
   58609           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   58610           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   58611             :         }
   58612           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   58613           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   58614             :         }
   58615             : 
   58616           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   58617           0 :                 allow_remaining = true;
   58618             :         }
   58619             : 
   58620           0 :         return py_srvsvc_NetServerTransportAddEx_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   58621             : }
   58622             : 
   58623           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   58624             : {
   58625             :         DATA_BLOB blob;
   58626           0 :         Py_ssize_t blob_length = 0;
   58627           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   58628           0 :         PyObject *bigendian_obj = NULL;
   58629           0 :         PyObject *ndr64_obj = NULL;
   58630           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   58631           0 :         PyObject *allow_remaining_obj = NULL;
   58632           0 :         bool allow_remaining = false;
   58633             : 
   58634           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   58635             :                 discard_const_p(char *, kwnames),
   58636             :                 &blob.data, &blob_length,
   58637             :                 &bigendian_obj,
   58638             :                 &ndr64_obj,
   58639             :                 &allow_remaining_obj)) {
   58640           0 :                 return NULL;
   58641             :         }
   58642           0 :         blob.length = blob_length;
   58643             : 
   58644           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   58645           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   58646             :         }
   58647           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   58648           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   58649             :         }
   58650             : 
   58651           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   58652           0 :                 allow_remaining = true;
   58653             :         }
   58654             : 
   58655           0 :         return py_srvsvc_NetServerTransportAddEx_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   58656             : }
   58657             : 
   58658           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   58659             : {
   58660           0 :         const struct ndr_interface_call *call = NULL;
   58661           0 :         struct srvsvc_NetServerTransportAddEx *object = (struct srvsvc_NetServerTransportAddEx *)pytalloc_get_ptr(py_obj);
   58662             :         PyObject *ret;
   58663             :         char *retstr;
   58664             : 
   58665           0 :         if (ndr_table_srvsvc.num_calls < 42) {
   58666           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetServerTransportAddEx_ndr_print");
   58667           0 :                 return NULL;
   58668             :         }
   58669           0 :         call = &ndr_table_srvsvc.calls[41];
   58670             : 
   58671           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   58672           0 :         ret = PyUnicode_FromString(retstr);
   58673           0 :         TALLOC_FREE(retstr);
   58674             : 
   58675           0 :         return ret;
   58676             : }
   58677             : 
   58678           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   58679             : {
   58680           0 :         return py_srvsvc_NetServerTransportAddEx_ndr_print(py_obj, "srvsvc_NetServerTransportAddEx_in", NDR_IN);
   58681             : }
   58682             : 
   58683           0 : static PyObject *py_srvsvc_NetServerTransportAddEx_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   58684             : {
   58685           0 :         return py_srvsvc_NetServerTransportAddEx_ndr_print(py_obj, "srvsvc_NetServerTransportAddEx_out", NDR_OUT);
   58686             : }
   58687             : 
   58688             : static PyMethodDef py_srvsvc_NetServerTransportAddEx_methods[] = {
   58689             :         { "opnum", (PyCFunction)py_srvsvc_NetServerTransportAddEx_ndr_opnum, METH_NOARGS|METH_CLASS,
   58690             :                 "srvsvc.NetServerTransportAddEx.opnum() -> 41 (0x29) " },
   58691             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetServerTransportAddEx_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   58692             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   58693             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetServerTransportAddEx_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   58694             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   58695             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetServerTransportAddEx_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   58696             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   58697             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetServerTransportAddEx_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   58698             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   58699             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetServerTransportAddEx_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   58700             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetServerTransportAddEx_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   58701             :         { NULL, NULL, 0, NULL }
   58702             : };
   58703             : 
   58704             : 
   58705             : static PyTypeObject srvsvc_NetServerTransportAddEx_Type = {
   58706             :         PyVarObject_HEAD_INIT(NULL, 0)
   58707             :         .tp_name = "srvsvc.NetServerTransportAddEx",
   58708             :         .tp_getset = py_srvsvc_NetServerTransportAddEx_getsetters,
   58709             :         .tp_methods = py_srvsvc_NetServerTransportAddEx_methods,
   58710             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   58711             :         .tp_new = py_srvsvc_NetServerTransportAddEx_new,
   58712             : };
   58713             : 
   58714           0 : static bool pack_py_srvsvc_NetServerTransportAddEx_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetServerTransportAddEx *r)
   58715             : {
   58716             :         PyObject *py_server_unc;
   58717             :         PyObject *py_level;
   58718             :         PyObject *py_info;
   58719           0 :         const char *kwnames[] = {
   58720             :                 "server_unc", "level", "info", NULL
   58721             :         };
   58722             : 
   58723           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:srvsvc_NetServerTransportAddEx", discard_const_p(char *, kwnames), &py_server_unc, &py_level, &py_info)) {
   58724           0 :                 return false;
   58725             :         }
   58726             : 
   58727           0 :         if (py_server_unc == NULL) {
   58728           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   58729           0 :                 return false;
   58730             :         }
   58731           0 :         if (py_server_unc == Py_None) {
   58732           0 :                 r->in.server_unc = NULL;
   58733             :         } else {
   58734           0 :                 r->in.server_unc = NULL;
   58735             :                 {
   58736             :                         const char *test_str;
   58737             :                         const char *talloc_str;
   58738           0 :                         PyObject *unicode = NULL;
   58739           0 :                         if (PyUnicode_Check(py_server_unc)) {
   58740           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   58741           0 :                                 if (unicode == NULL) {
   58742           0 :                                         PyErr_NoMemory();
   58743           0 :                                         return false;
   58744             :                                 }
   58745           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   58746           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   58747           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   58748             :                         } else {
   58749           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   58750           0 :                                 return false;
   58751             :                         }
   58752           0 :                         talloc_str = talloc_strdup(r, test_str);
   58753           0 :                         if (unicode != NULL) {
   58754           0 :                                 Py_DECREF(unicode);
   58755             :                         }
   58756           0 :                         if (talloc_str == NULL) {
   58757           0 :                                 PyErr_NoMemory();
   58758           0 :                                 return false;
   58759             :                         }
   58760           0 :                         r->in.server_unc = talloc_str;
   58761             :                 }
   58762             :         }
   58763           0 :         if (py_level == NULL) {
   58764           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   58765           0 :                 return false;
   58766             :         }
   58767             :         {
   58768           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   58769           0 :                 if (PyLong_Check(py_level)) {
   58770             :                         unsigned long long test_var;
   58771           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   58772           0 :                         if (PyErr_Occurred() != NULL) {
   58773           0 :                                 return false;
   58774             :                         }
   58775           0 :                         if (test_var > uint_max) {
   58776           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   58777             :                                   PyLong_Type.tp_name, uint_max, test_var);
   58778           0 :                                 return false;
   58779             :                         }
   58780           0 :                         r->in.level = test_var;
   58781             :                 } else {
   58782           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   58783             :                           PyLong_Type.tp_name);
   58784           0 :                         return false;
   58785             :                 }
   58786             :         }
   58787           0 :         if (py_info == NULL) {
   58788           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.info");
   58789           0 :                 return false;
   58790             :         }
   58791             :         {
   58792             :                 union srvsvc_NetTransportInfo *info_switch_0;
   58793           0 :                 info_switch_0 = (union srvsvc_NetTransportInfo *)pyrpc_export_union(&srvsvc_NetTransportInfo_Type, r, r->in.level, py_info, "union srvsvc_NetTransportInfo");
   58794           0 :                 if (info_switch_0 == NULL) {
   58795           0 :                         return false;
   58796             :                 }
   58797           0 :                 r->in.info = *info_switch_0;
   58798             :         }
   58799           0 :         return true;
   58800             : }
   58801             : 
   58802           0 : static PyObject *unpack_py_srvsvc_NetServerTransportAddEx_args_out(struct srvsvc_NetServerTransportAddEx *r)
   58803             : {
   58804             :         PyObject *result;
   58805           0 :         result = Py_None;
   58806           0 :         Py_INCREF(result);
   58807           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   58808           0 :                 PyErr_SetWERROR(r->out.result);
   58809           0 :                 return NULL;
   58810             :         }
   58811             : 
   58812           0 :         return result;
   58813             : }
   58814             : 
   58815             : 
   58816           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_in_get_server_unc(PyObject *obj, void *closure)
   58817             : {
   58818           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = (struct srvsvc_NetServerSetServiceBitsEx *)pytalloc_get_ptr(obj);
   58819             :         PyObject *py_server_unc;
   58820           0 :         if (object->in.server_unc == NULL) {
   58821           0 :                 Py_RETURN_NONE;
   58822             :         }
   58823           0 :         if (object->in.server_unc == NULL) {
   58824           0 :                 py_server_unc = Py_None;
   58825           0 :                 Py_INCREF(py_server_unc);
   58826             :         } else {
   58827           0 :                 if (object->in.server_unc == NULL) {
   58828           0 :                         py_server_unc = Py_None;
   58829           0 :                         Py_INCREF(py_server_unc);
   58830             :                 } else {
   58831           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   58832             :                 }
   58833             :         }
   58834           0 :         return py_server_unc;
   58835             : }
   58836             : 
   58837           0 : static int py_srvsvc_NetServerSetServiceBitsEx_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   58838             : {
   58839           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = (struct srvsvc_NetServerSetServiceBitsEx *)pytalloc_get_ptr(py_obj);
   58840           0 :         if (value == NULL) {
   58841           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   58842           0 :                 return -1;
   58843             :         }
   58844           0 :         if (value == Py_None) {
   58845           0 :                 object->in.server_unc = NULL;
   58846             :         } else {
   58847           0 :                 object->in.server_unc = NULL;
   58848             :                 {
   58849             :                         const char *test_str;
   58850             :                         const char *talloc_str;
   58851           0 :                         PyObject *unicode = NULL;
   58852           0 :                         if (PyUnicode_Check(value)) {
   58853           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   58854           0 :                                 if (unicode == NULL) {
   58855           0 :                                         PyErr_NoMemory();
   58856           0 :                                         return -1;
   58857             :                                 }
   58858           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   58859           0 :                         } else if (PyBytes_Check(value)) {
   58860           0 :                                 test_str = PyBytes_AS_STRING(value);
   58861             :                         } else {
   58862           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   58863           0 :                                 return -1;
   58864             :                         }
   58865           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   58866           0 :                         if (unicode != NULL) {
   58867           0 :                                 Py_DECREF(unicode);
   58868             :                         }
   58869           0 :                         if (talloc_str == NULL) {
   58870           0 :                                 PyErr_NoMemory();
   58871           0 :                                 return -1;
   58872             :                         }
   58873           0 :                         object->in.server_unc = talloc_str;
   58874             :                 }
   58875             :         }
   58876           0 :         return 0;
   58877             : }
   58878             : 
   58879           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_in_get_emulated_server_unc(PyObject *obj, void *closure)
   58880             : {
   58881           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = (struct srvsvc_NetServerSetServiceBitsEx *)pytalloc_get_ptr(obj);
   58882             :         PyObject *py_emulated_server_unc;
   58883           0 :         if (object->in.emulated_server_unc == NULL) {
   58884           0 :                 Py_RETURN_NONE;
   58885             :         }
   58886           0 :         if (object->in.emulated_server_unc == NULL) {
   58887           0 :                 py_emulated_server_unc = Py_None;
   58888           0 :                 Py_INCREF(py_emulated_server_unc);
   58889             :         } else {
   58890           0 :                 if (object->in.emulated_server_unc == NULL) {
   58891           0 :                         py_emulated_server_unc = Py_None;
   58892           0 :                         Py_INCREF(py_emulated_server_unc);
   58893             :                 } else {
   58894           0 :                         py_emulated_server_unc = PyUnicode_Decode(object->in.emulated_server_unc, strlen(object->in.emulated_server_unc), "utf-8", "ignore");
   58895             :                 }
   58896             :         }
   58897           0 :         return py_emulated_server_unc;
   58898             : }
   58899             : 
   58900           0 : static int py_srvsvc_NetServerSetServiceBitsEx_in_set_emulated_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   58901             : {
   58902           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = (struct srvsvc_NetServerSetServiceBitsEx *)pytalloc_get_ptr(py_obj);
   58903           0 :         if (value == NULL) {
   58904           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.emulated_server_unc");
   58905           0 :                 return -1;
   58906             :         }
   58907           0 :         if (value == Py_None) {
   58908           0 :                 object->in.emulated_server_unc = NULL;
   58909             :         } else {
   58910           0 :                 object->in.emulated_server_unc = NULL;
   58911             :                 {
   58912             :                         const char *test_str;
   58913             :                         const char *talloc_str;
   58914           0 :                         PyObject *unicode = NULL;
   58915           0 :                         if (PyUnicode_Check(value)) {
   58916           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   58917           0 :                                 if (unicode == NULL) {
   58918           0 :                                         PyErr_NoMemory();
   58919           0 :                                         return -1;
   58920             :                                 }
   58921           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   58922           0 :                         } else if (PyBytes_Check(value)) {
   58923           0 :                                 test_str = PyBytes_AS_STRING(value);
   58924             :                         } else {
   58925           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   58926           0 :                                 return -1;
   58927             :                         }
   58928           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   58929           0 :                         if (unicode != NULL) {
   58930           0 :                                 Py_DECREF(unicode);
   58931             :                         }
   58932           0 :                         if (talloc_str == NULL) {
   58933           0 :                                 PyErr_NoMemory();
   58934           0 :                                 return -1;
   58935             :                         }
   58936           0 :                         object->in.emulated_server_unc = talloc_str;
   58937             :                 }
   58938             :         }
   58939           0 :         return 0;
   58940             : }
   58941             : 
   58942           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_in_get_transport(PyObject *obj, void *closure)
   58943             : {
   58944           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = (struct srvsvc_NetServerSetServiceBitsEx *)pytalloc_get_ptr(obj);
   58945             :         PyObject *py_transport;
   58946           0 :         if (object->in.transport == NULL) {
   58947           0 :                 Py_RETURN_NONE;
   58948             :         }
   58949           0 :         if (object->in.transport == NULL) {
   58950           0 :                 py_transport = Py_None;
   58951           0 :                 Py_INCREF(py_transport);
   58952             :         } else {
   58953           0 :                 if (object->in.transport == NULL) {
   58954           0 :                         py_transport = Py_None;
   58955           0 :                         Py_INCREF(py_transport);
   58956             :                 } else {
   58957           0 :                         py_transport = PyUnicode_Decode(object->in.transport, strlen(object->in.transport), "utf-8", "ignore");
   58958             :                 }
   58959             :         }
   58960           0 :         return py_transport;
   58961             : }
   58962             : 
   58963           0 : static int py_srvsvc_NetServerSetServiceBitsEx_in_set_transport(PyObject *py_obj, PyObject *value, void *closure)
   58964             : {
   58965           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = (struct srvsvc_NetServerSetServiceBitsEx *)pytalloc_get_ptr(py_obj);
   58966           0 :         if (value == NULL) {
   58967           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.transport");
   58968           0 :                 return -1;
   58969             :         }
   58970           0 :         if (value == Py_None) {
   58971           0 :                 object->in.transport = NULL;
   58972             :         } else {
   58973           0 :                 object->in.transport = NULL;
   58974             :                 {
   58975             :                         const char *test_str;
   58976             :                         const char *talloc_str;
   58977           0 :                         PyObject *unicode = NULL;
   58978           0 :                         if (PyUnicode_Check(value)) {
   58979           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   58980           0 :                                 if (unicode == NULL) {
   58981           0 :                                         PyErr_NoMemory();
   58982           0 :                                         return -1;
   58983             :                                 }
   58984           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   58985           0 :                         } else if (PyBytes_Check(value)) {
   58986           0 :                                 test_str = PyBytes_AS_STRING(value);
   58987             :                         } else {
   58988           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   58989           0 :                                 return -1;
   58990             :                         }
   58991           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   58992           0 :                         if (unicode != NULL) {
   58993           0 :                                 Py_DECREF(unicode);
   58994             :                         }
   58995           0 :                         if (talloc_str == NULL) {
   58996           0 :                                 PyErr_NoMemory();
   58997           0 :                                 return -1;
   58998             :                         }
   58999           0 :                         object->in.transport = talloc_str;
   59000             :                 }
   59001             :         }
   59002           0 :         return 0;
   59003             : }
   59004             : 
   59005           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_in_get_servicebitsofinterest(PyObject *obj, void *closure)
   59006             : {
   59007           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = (struct srvsvc_NetServerSetServiceBitsEx *)pytalloc_get_ptr(obj);
   59008             :         PyObject *py_servicebitsofinterest;
   59009           0 :         py_servicebitsofinterest = PyLong_FromUnsignedLongLong((uint32_t)object->in.servicebitsofinterest);
   59010           0 :         return py_servicebitsofinterest;
   59011             : }
   59012             : 
   59013           0 : static int py_srvsvc_NetServerSetServiceBitsEx_in_set_servicebitsofinterest(PyObject *py_obj, PyObject *value, void *closure)
   59014             : {
   59015           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = (struct srvsvc_NetServerSetServiceBitsEx *)pytalloc_get_ptr(py_obj);
   59016           0 :         if (value == NULL) {
   59017           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.servicebitsofinterest");
   59018           0 :                 return -1;
   59019             :         }
   59020             :         {
   59021           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.servicebitsofinterest));
   59022           0 :                 if (PyLong_Check(value)) {
   59023             :                         unsigned long long test_var;
   59024           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   59025           0 :                         if (PyErr_Occurred() != NULL) {
   59026           0 :                                 return -1;
   59027             :                         }
   59028           0 :                         if (test_var > uint_max) {
   59029           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   59030             :                                   PyLong_Type.tp_name, uint_max, test_var);
   59031           0 :                                 return -1;
   59032             :                         }
   59033           0 :                         object->in.servicebitsofinterest = test_var;
   59034             :                 } else {
   59035           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   59036             :                           PyLong_Type.tp_name);
   59037           0 :                         return -1;
   59038             :                 }
   59039             :         }
   59040           0 :         return 0;
   59041             : }
   59042             : 
   59043           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_in_get_servicebits(PyObject *obj, void *closure)
   59044             : {
   59045           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = (struct srvsvc_NetServerSetServiceBitsEx *)pytalloc_get_ptr(obj);
   59046             :         PyObject *py_servicebits;
   59047           0 :         py_servicebits = PyLong_FromUnsignedLongLong((uint32_t)object->in.servicebits);
   59048           0 :         return py_servicebits;
   59049             : }
   59050             : 
   59051           0 : static int py_srvsvc_NetServerSetServiceBitsEx_in_set_servicebits(PyObject *py_obj, PyObject *value, void *closure)
   59052             : {
   59053           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = (struct srvsvc_NetServerSetServiceBitsEx *)pytalloc_get_ptr(py_obj);
   59054           0 :         if (value == NULL) {
   59055           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.servicebits");
   59056           0 :                 return -1;
   59057             :         }
   59058             :         {
   59059           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.servicebits));
   59060           0 :                 if (PyLong_Check(value)) {
   59061             :                         unsigned long long test_var;
   59062           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   59063           0 :                         if (PyErr_Occurred() != NULL) {
   59064           0 :                                 return -1;
   59065             :                         }
   59066           0 :                         if (test_var > uint_max) {
   59067           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   59068             :                                   PyLong_Type.tp_name, uint_max, test_var);
   59069           0 :                                 return -1;
   59070             :                         }
   59071           0 :                         object->in.servicebits = test_var;
   59072             :                 } else {
   59073           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   59074             :                           PyLong_Type.tp_name);
   59075           0 :                         return -1;
   59076             :                 }
   59077             :         }
   59078           0 :         return 0;
   59079             : }
   59080             : 
   59081           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_in_get_updateimmediately(PyObject *obj, void *closure)
   59082             : {
   59083           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = (struct srvsvc_NetServerSetServiceBitsEx *)pytalloc_get_ptr(obj);
   59084             :         PyObject *py_updateimmediately;
   59085           0 :         py_updateimmediately = PyLong_FromUnsignedLongLong((uint32_t)object->in.updateimmediately);
   59086           0 :         return py_updateimmediately;
   59087             : }
   59088             : 
   59089           0 : static int py_srvsvc_NetServerSetServiceBitsEx_in_set_updateimmediately(PyObject *py_obj, PyObject *value, void *closure)
   59090             : {
   59091           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = (struct srvsvc_NetServerSetServiceBitsEx *)pytalloc_get_ptr(py_obj);
   59092           0 :         if (value == NULL) {
   59093           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.updateimmediately");
   59094           0 :                 return -1;
   59095             :         }
   59096             :         {
   59097           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.updateimmediately));
   59098           0 :                 if (PyLong_Check(value)) {
   59099             :                         unsigned long long test_var;
   59100           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   59101           0 :                         if (PyErr_Occurred() != NULL) {
   59102           0 :                                 return -1;
   59103             :                         }
   59104           0 :                         if (test_var > uint_max) {
   59105           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   59106             :                                   PyLong_Type.tp_name, uint_max, test_var);
   59107           0 :                                 return -1;
   59108             :                         }
   59109           0 :                         object->in.updateimmediately = test_var;
   59110             :                 } else {
   59111           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   59112             :                           PyLong_Type.tp_name);
   59113           0 :                         return -1;
   59114             :                 }
   59115             :         }
   59116           0 :         return 0;
   59117             : }
   59118             : 
   59119           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_get_result(PyObject *obj, void *closure)
   59120             : {
   59121           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = (struct srvsvc_NetServerSetServiceBitsEx *)pytalloc_get_ptr(obj);
   59122             :         PyObject *py_result;
   59123           0 :         py_result = PyErr_FromWERROR(object->out.result);
   59124           0 :         return py_result;
   59125             : }
   59126             : 
   59127           0 : static int py_srvsvc_NetServerSetServiceBitsEx_set_result(PyObject *py_obj, PyObject *value, void *closure)
   59128             : {
   59129           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = (struct srvsvc_NetServerSetServiceBitsEx *)pytalloc_get_ptr(py_obj);
   59130           0 :         if (value == NULL) {
   59131           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   59132           0 :                 return -1;
   59133             :         }
   59134           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   59135           0 :         return 0;
   59136             : }
   59137             : 
   59138             : static PyGetSetDef py_srvsvc_NetServerSetServiceBitsEx_getsetters[] = {
   59139             :         {
   59140             :                 .name = discard_const_p(char, "in_server_unc"),
   59141             :                 .get = py_srvsvc_NetServerSetServiceBitsEx_in_get_server_unc,
   59142             :                 .set = py_srvsvc_NetServerSetServiceBitsEx_in_set_server_unc,
   59143             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   59144             :         },
   59145             :         {
   59146             :                 .name = discard_const_p(char, "in_emulated_server_unc"),
   59147             :                 .get = py_srvsvc_NetServerSetServiceBitsEx_in_get_emulated_server_unc,
   59148             :                 .set = py_srvsvc_NetServerSetServiceBitsEx_in_set_emulated_server_unc,
   59149             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   59150             :         },
   59151             :         {
   59152             :                 .name = discard_const_p(char, "in_transport"),
   59153             :                 .get = py_srvsvc_NetServerSetServiceBitsEx_in_get_transport,
   59154             :                 .set = py_srvsvc_NetServerSetServiceBitsEx_in_set_transport,
   59155             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   59156             :         },
   59157             :         {
   59158             :                 .name = discard_const_p(char, "in_servicebitsofinterest"),
   59159             :                 .get = py_srvsvc_NetServerSetServiceBitsEx_in_get_servicebitsofinterest,
   59160             :                 .set = py_srvsvc_NetServerSetServiceBitsEx_in_set_servicebitsofinterest,
   59161             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   59162             :         },
   59163             :         {
   59164             :                 .name = discard_const_p(char, "in_servicebits"),
   59165             :                 .get = py_srvsvc_NetServerSetServiceBitsEx_in_get_servicebits,
   59166             :                 .set = py_srvsvc_NetServerSetServiceBitsEx_in_set_servicebits,
   59167             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   59168             :         },
   59169             :         {
   59170             :                 .name = discard_const_p(char, "in_updateimmediately"),
   59171             :                 .get = py_srvsvc_NetServerSetServiceBitsEx_in_get_updateimmediately,
   59172             :                 .set = py_srvsvc_NetServerSetServiceBitsEx_in_set_updateimmediately,
   59173             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   59174             :         },
   59175             :         {
   59176             :                 .name = discard_const_p(char, "result"),
   59177             :                 .get = py_srvsvc_NetServerSetServiceBitsEx_get_result,
   59178             :                 .set = py_srvsvc_NetServerSetServiceBitsEx_set_result,
   59179             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   59180             :         },
   59181             :         { .name = NULL }
   59182             : };
   59183             : 
   59184           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   59185             : {
   59186           0 :         PyObject *self = pytalloc_new(struct srvsvc_NetServerSetServiceBitsEx, type);
   59187           0 :         return self;
   59188             : }
   59189             : 
   59190           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   59191             : {
   59192             : 
   59193             : 
   59194           0 :         return PyLong_FromLong(42);
   59195             : }
   59196             : 
   59197           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   59198             : {
   59199           0 :         const struct ndr_interface_call *call = NULL;
   59200           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = (struct srvsvc_NetServerSetServiceBitsEx *)pytalloc_get_ptr(py_obj);
   59201           0 :         PyObject *ret = NULL;
   59202           0 :         struct ndr_push *push = NULL;
   59203             :         DATA_BLOB blob;
   59204             :         enum ndr_err_code err;
   59205             : 
   59206           0 :         if (ndr_table_srvsvc.num_calls < 43) {
   59207           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetServerSetServiceBitsEx_ndr_pack");
   59208           0 :                 return NULL;
   59209             :         }
   59210           0 :         call = &ndr_table_srvsvc.calls[42];
   59211             : 
   59212           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   59213           0 :         if (push == NULL) {
   59214           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   59215           0 :                 return NULL;
   59216             :         }
   59217             : 
   59218           0 :         push->flags |= ndr_push_flags;
   59219             : 
   59220           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   59221           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   59222           0 :                 TALLOC_FREE(push);
   59223           0 :                 PyErr_SetNdrError(err);
   59224           0 :                 return NULL;
   59225             :         }
   59226           0 :         blob = ndr_push_blob(push);
   59227           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   59228           0 :         TALLOC_FREE(push);
   59229           0 :         return ret;
   59230             : }
   59231             : 
   59232           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   59233             : {
   59234           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   59235           0 :         PyObject *bigendian_obj = NULL;
   59236           0 :         PyObject *ndr64_obj = NULL;
   59237           0 :         uint32_t ndr_push_flags = 0;
   59238             : 
   59239           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   59240             :                 discard_const_p(char *, kwnames),
   59241             :                 &bigendian_obj,
   59242             :                 &ndr64_obj)) {
   59243           0 :                 return NULL;
   59244             :         }
   59245             : 
   59246           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   59247           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   59248             :         }
   59249           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   59250           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   59251             :         }
   59252             : 
   59253           0 :         return py_srvsvc_NetServerSetServiceBitsEx_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   59254             : }
   59255             : 
   59256           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   59257             : {
   59258           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   59259           0 :         PyObject *bigendian_obj = NULL;
   59260           0 :         PyObject *ndr64_obj = NULL;
   59261           0 :         uint32_t ndr_push_flags = 0;
   59262             : 
   59263           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   59264             :                 discard_const_p(char *, kwnames),
   59265             :                 &bigendian_obj,
   59266             :                 &ndr64_obj)) {
   59267           0 :                 return NULL;
   59268             :         }
   59269             : 
   59270           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   59271           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   59272             :         }
   59273           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   59274           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   59275             :         }
   59276             : 
   59277           0 :         return py_srvsvc_NetServerSetServiceBitsEx_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   59278             : }
   59279             : 
   59280           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   59281             : {
   59282           0 :         const struct ndr_interface_call *call = NULL;
   59283           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = (struct srvsvc_NetServerSetServiceBitsEx *)pytalloc_get_ptr(py_obj);
   59284           0 :         struct ndr_pull *pull = NULL;
   59285             :         enum ndr_err_code err;
   59286             : 
   59287           0 :         if (ndr_table_srvsvc.num_calls < 43) {
   59288           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetServerSetServiceBitsEx_ndr_unpack");
   59289           0 :                 return NULL;
   59290             :         }
   59291           0 :         call = &ndr_table_srvsvc.calls[42];
   59292             : 
   59293           0 :         pull = ndr_pull_init_blob(blob, object);
   59294           0 :         if (pull == NULL) {
   59295           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   59296           0 :                 return NULL;
   59297             :         }
   59298             : 
   59299           0 :         pull->flags |= ndr_pull_flags;
   59300             : 
   59301           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   59302           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   59303           0 :                 TALLOC_FREE(pull);
   59304           0 :                 PyErr_SetNdrError(err);
   59305           0 :                 return NULL;
   59306             :         }
   59307           0 :         if (!allow_remaining) {
   59308             :                 uint32_t highest_ofs;
   59309             : 
   59310           0 :                 if (pull->offset > pull->relative_highest_offset) {
   59311           0 :                         highest_ofs = pull->offset;
   59312             :                 } else {
   59313           0 :                         highest_ofs = pull->relative_highest_offset;
   59314             :                 }
   59315           0 :                 if (highest_ofs < pull->data_size) {
   59316           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   59317             :                                 "not all bytes consumed ofs[%u] size[%u]",
   59318             :                                 highest_ofs, pull->data_size);
   59319           0 :                         TALLOC_FREE(pull);
   59320           0 :                         PyErr_SetNdrError(err);
   59321           0 :                         return NULL;
   59322             :                 }
   59323             :         }
   59324             : 
   59325           0 :         TALLOC_FREE(pull);
   59326           0 :         Py_RETURN_NONE;
   59327             : }
   59328             : 
   59329           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   59330             : {
   59331             :         DATA_BLOB blob;
   59332           0 :         Py_ssize_t blob_length = 0;
   59333           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   59334           0 :         PyObject *bigendian_obj = NULL;
   59335           0 :         PyObject *ndr64_obj = NULL;
   59336           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   59337           0 :         PyObject *allow_remaining_obj = NULL;
   59338           0 :         bool allow_remaining = false;
   59339             : 
   59340           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   59341             :                 discard_const_p(char *, kwnames),
   59342             :                 &blob.data, &blob_length,
   59343             :                 &bigendian_obj,
   59344             :                 &ndr64_obj,
   59345             :                 &allow_remaining_obj)) {
   59346           0 :                 return NULL;
   59347             :         }
   59348           0 :         blob.length = blob_length;
   59349             : 
   59350           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   59351           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   59352             :         }
   59353           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   59354           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   59355             :         }
   59356             : 
   59357           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   59358           0 :                 allow_remaining = true;
   59359             :         }
   59360             : 
   59361           0 :         return py_srvsvc_NetServerSetServiceBitsEx_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   59362             : }
   59363             : 
   59364           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   59365             : {
   59366             :         DATA_BLOB blob;
   59367           0 :         Py_ssize_t blob_length = 0;
   59368           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   59369           0 :         PyObject *bigendian_obj = NULL;
   59370           0 :         PyObject *ndr64_obj = NULL;
   59371           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   59372           0 :         PyObject *allow_remaining_obj = NULL;
   59373           0 :         bool allow_remaining = false;
   59374             : 
   59375           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   59376             :                 discard_const_p(char *, kwnames),
   59377             :                 &blob.data, &blob_length,
   59378             :                 &bigendian_obj,
   59379             :                 &ndr64_obj,
   59380             :                 &allow_remaining_obj)) {
   59381           0 :                 return NULL;
   59382             :         }
   59383           0 :         blob.length = blob_length;
   59384             : 
   59385           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   59386           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   59387             :         }
   59388           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   59389           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   59390             :         }
   59391             : 
   59392           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   59393           0 :                 allow_remaining = true;
   59394             :         }
   59395             : 
   59396           0 :         return py_srvsvc_NetServerSetServiceBitsEx_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   59397             : }
   59398             : 
   59399           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   59400             : {
   59401           0 :         const struct ndr_interface_call *call = NULL;
   59402           0 :         struct srvsvc_NetServerSetServiceBitsEx *object = (struct srvsvc_NetServerSetServiceBitsEx *)pytalloc_get_ptr(py_obj);
   59403             :         PyObject *ret;
   59404             :         char *retstr;
   59405             : 
   59406           0 :         if (ndr_table_srvsvc.num_calls < 43) {
   59407           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_srvsvc_NetServerSetServiceBitsEx_ndr_print");
   59408           0 :                 return NULL;
   59409             :         }
   59410           0 :         call = &ndr_table_srvsvc.calls[42];
   59411             : 
   59412           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   59413           0 :         ret = PyUnicode_FromString(retstr);
   59414           0 :         TALLOC_FREE(retstr);
   59415             : 
   59416           0 :         return ret;
   59417             : }
   59418             : 
   59419           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   59420             : {
   59421           0 :         return py_srvsvc_NetServerSetServiceBitsEx_ndr_print(py_obj, "srvsvc_NetServerSetServiceBitsEx_in", NDR_IN);
   59422             : }
   59423             : 
   59424           0 : static PyObject *py_srvsvc_NetServerSetServiceBitsEx_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   59425             : {
   59426           0 :         return py_srvsvc_NetServerSetServiceBitsEx_ndr_print(py_obj, "srvsvc_NetServerSetServiceBitsEx_out", NDR_OUT);
   59427             : }
   59428             : 
   59429             : static PyMethodDef py_srvsvc_NetServerSetServiceBitsEx_methods[] = {
   59430             :         { "opnum", (PyCFunction)py_srvsvc_NetServerSetServiceBitsEx_ndr_opnum, METH_NOARGS|METH_CLASS,
   59431             :                 "srvsvc.NetServerSetServiceBitsEx.opnum() -> 42 (0x2a) " },
   59432             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetServerSetServiceBitsEx_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   59433             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   59434             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetServerSetServiceBitsEx_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   59435             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   59436             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetServerSetServiceBitsEx_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   59437             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   59438             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_srvsvc_NetServerSetServiceBitsEx_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   59439             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   59440             :         { "__ndr_print_in__", (PyCFunction)py_srvsvc_NetServerSetServiceBitsEx_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   59441             :         { "__ndr_print_out__", (PyCFunction)py_srvsvc_NetServerSetServiceBitsEx_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   59442             :         { NULL, NULL, 0, NULL }
   59443             : };
   59444             : 
   59445             : 
   59446             : static PyTypeObject srvsvc_NetServerSetServiceBitsEx_Type = {
   59447             :         PyVarObject_HEAD_INIT(NULL, 0)
   59448             :         .tp_name = "srvsvc.NetServerSetServiceBitsEx",
   59449             :         .tp_getset = py_srvsvc_NetServerSetServiceBitsEx_getsetters,
   59450             :         .tp_methods = py_srvsvc_NetServerSetServiceBitsEx_methods,
   59451             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   59452             :         .tp_new = py_srvsvc_NetServerSetServiceBitsEx_new,
   59453             : };
   59454             : 
   59455           0 : static bool pack_py_srvsvc_NetServerSetServiceBitsEx_args_in(PyObject *args, PyObject *kwargs, struct srvsvc_NetServerSetServiceBitsEx *r)
   59456             : {
   59457             :         PyObject *py_server_unc;
   59458             :         PyObject *py_emulated_server_unc;
   59459             :         PyObject *py_transport;
   59460             :         PyObject *py_servicebitsofinterest;
   59461             :         PyObject *py_servicebits;
   59462             :         PyObject *py_updateimmediately;
   59463           0 :         const char *kwnames[] = {
   59464             :                 "server_unc", "emulated_server_unc", "transport", "servicebitsofinterest", "servicebits", "updateimmediately", NULL
   59465             :         };
   59466             : 
   59467           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:srvsvc_NetServerSetServiceBitsEx", discard_const_p(char *, kwnames), &py_server_unc, &py_emulated_server_unc, &py_transport, &py_servicebitsofinterest, &py_servicebits, &py_updateimmediately)) {
   59468           0 :                 return false;
   59469             :         }
   59470             : 
   59471           0 :         if (py_server_unc == NULL) {
   59472           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   59473           0 :                 return false;
   59474             :         }
   59475           0 :         if (py_server_unc == Py_None) {
   59476           0 :                 r->in.server_unc = NULL;
   59477             :         } else {
   59478           0 :                 r->in.server_unc = NULL;
   59479             :                 {
   59480             :                         const char *test_str;
   59481             :                         const char *talloc_str;
   59482           0 :                         PyObject *unicode = NULL;
   59483           0 :                         if (PyUnicode_Check(py_server_unc)) {
   59484           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   59485           0 :                                 if (unicode == NULL) {
   59486           0 :                                         PyErr_NoMemory();
   59487           0 :                                         return false;
   59488             :                                 }
   59489           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   59490           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   59491           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   59492             :                         } else {
   59493           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   59494           0 :                                 return false;
   59495             :                         }
   59496           0 :                         talloc_str = talloc_strdup(r, test_str);
   59497           0 :                         if (unicode != NULL) {
   59498           0 :                                 Py_DECREF(unicode);
   59499             :                         }
   59500           0 :                         if (talloc_str == NULL) {
   59501           0 :                                 PyErr_NoMemory();
   59502           0 :                                 return false;
   59503             :                         }
   59504           0 :                         r->in.server_unc = talloc_str;
   59505             :                 }
   59506             :         }
   59507           0 :         if (py_emulated_server_unc == NULL) {
   59508           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.emulated_server_unc");
   59509           0 :                 return false;
   59510             :         }
   59511           0 :         if (py_emulated_server_unc == Py_None) {
   59512           0 :                 r->in.emulated_server_unc = NULL;
   59513             :         } else {
   59514           0 :                 r->in.emulated_server_unc = NULL;
   59515             :                 {
   59516             :                         const char *test_str;
   59517             :                         const char *talloc_str;
   59518           0 :                         PyObject *unicode = NULL;
   59519           0 :                         if (PyUnicode_Check(py_emulated_server_unc)) {
   59520           0 :                                 unicode = PyUnicode_AsEncodedString(py_emulated_server_unc, "utf-8", "ignore");
   59521           0 :                                 if (unicode == NULL) {
   59522           0 :                                         PyErr_NoMemory();
   59523           0 :                                         return false;
   59524             :                                 }
   59525           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   59526           0 :                         } else if (PyBytes_Check(py_emulated_server_unc)) {
   59527           0 :                                 test_str = PyBytes_AS_STRING(py_emulated_server_unc);
   59528             :                         } else {
   59529           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_emulated_server_unc)->tp_name);
   59530           0 :                                 return false;
   59531             :                         }
   59532           0 :                         talloc_str = talloc_strdup(r, test_str);
   59533           0 :                         if (unicode != NULL) {
   59534           0 :                                 Py_DECREF(unicode);
   59535             :                         }
   59536           0 :                         if (talloc_str == NULL) {
   59537           0 :                                 PyErr_NoMemory();
   59538           0 :                                 return false;
   59539             :                         }
   59540           0 :                         r->in.emulated_server_unc = talloc_str;
   59541             :                 }
   59542             :         }
   59543           0 :         if (py_transport == NULL) {
   59544           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.transport");
   59545           0 :                 return false;
   59546             :         }
   59547           0 :         if (py_transport == Py_None) {
   59548           0 :                 r->in.transport = NULL;
   59549             :         } else {
   59550           0 :                 r->in.transport = NULL;
   59551             :                 {
   59552             :                         const char *test_str;
   59553             :                         const char *talloc_str;
   59554           0 :                         PyObject *unicode = NULL;
   59555           0 :                         if (PyUnicode_Check(py_transport)) {
   59556           0 :                                 unicode = PyUnicode_AsEncodedString(py_transport, "utf-8", "ignore");
   59557           0 :                                 if (unicode == NULL) {
   59558           0 :                                         PyErr_NoMemory();
   59559           0 :                                         return false;
   59560             :                                 }
   59561           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   59562           0 :                         } else if (PyBytes_Check(py_transport)) {
   59563           0 :                                 test_str = PyBytes_AS_STRING(py_transport);
   59564             :                         } else {
   59565           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_transport)->tp_name);
   59566           0 :                                 return false;
   59567             :                         }
   59568           0 :                         talloc_str = talloc_strdup(r, test_str);
   59569           0 :                         if (unicode != NULL) {
   59570           0 :                                 Py_DECREF(unicode);
   59571             :                         }
   59572           0 :                         if (talloc_str == NULL) {
   59573           0 :                                 PyErr_NoMemory();
   59574           0 :                                 return false;
   59575             :                         }
   59576           0 :                         r->in.transport = talloc_str;
   59577             :                 }
   59578             :         }
   59579           0 :         if (py_servicebitsofinterest == NULL) {
   59580           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.servicebitsofinterest");
   59581           0 :                 return false;
   59582             :         }
   59583             :         {
   59584           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.servicebitsofinterest));
   59585           0 :                 if (PyLong_Check(py_servicebitsofinterest)) {
   59586             :                         unsigned long long test_var;
   59587           0 :                         test_var = PyLong_AsUnsignedLongLong(py_servicebitsofinterest);
   59588           0 :                         if (PyErr_Occurred() != NULL) {
   59589           0 :                                 return false;
   59590             :                         }
   59591           0 :                         if (test_var > uint_max) {
   59592           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   59593             :                                   PyLong_Type.tp_name, uint_max, test_var);
   59594           0 :                                 return false;
   59595             :                         }
   59596           0 :                         r->in.servicebitsofinterest = test_var;
   59597             :                 } else {
   59598           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   59599             :                           PyLong_Type.tp_name);
   59600           0 :                         return false;
   59601             :                 }
   59602             :         }
   59603           0 :         if (py_servicebits == NULL) {
   59604           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.servicebits");
   59605           0 :                 return false;
   59606             :         }
   59607             :         {
   59608           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.servicebits));
   59609           0 :                 if (PyLong_Check(py_servicebits)) {
   59610             :                         unsigned long long test_var;
   59611           0 :                         test_var = PyLong_AsUnsignedLongLong(py_servicebits);
   59612           0 :                         if (PyErr_Occurred() != NULL) {
   59613           0 :                                 return false;
   59614             :                         }
   59615           0 :                         if (test_var > uint_max) {
   59616           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   59617             :                                   PyLong_Type.tp_name, uint_max, test_var);
   59618           0 :                                 return false;
   59619             :                         }
   59620           0 :                         r->in.servicebits = test_var;
   59621             :                 } else {
   59622           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   59623             :                           PyLong_Type.tp_name);
   59624           0 :                         return false;
   59625             :                 }
   59626             :         }
   59627           0 :         if (py_updateimmediately == NULL) {
   59628           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.updateimmediately");
   59629           0 :                 return false;
   59630             :         }
   59631             :         {
   59632           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.updateimmediately));
   59633           0 :                 if (PyLong_Check(py_updateimmediately)) {
   59634             :                         unsigned long long test_var;
   59635           0 :                         test_var = PyLong_AsUnsignedLongLong(py_updateimmediately);
   59636           0 :                         if (PyErr_Occurred() != NULL) {
   59637           0 :                                 return false;
   59638             :                         }
   59639           0 :                         if (test_var > uint_max) {
   59640           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   59641             :                                   PyLong_Type.tp_name, uint_max, test_var);
   59642           0 :                                 return false;
   59643             :                         }
   59644           0 :                         r->in.updateimmediately = test_var;
   59645             :                 } else {
   59646           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   59647             :                           PyLong_Type.tp_name);
   59648           0 :                         return false;
   59649             :                 }
   59650             :         }
   59651           0 :         return true;
   59652             : }
   59653             : 
   59654           0 : static PyObject *unpack_py_srvsvc_NetServerSetServiceBitsEx_args_out(struct srvsvc_NetServerSetServiceBitsEx *r)
   59655             : {
   59656             :         PyObject *result;
   59657           0 :         result = Py_None;
   59658           0 :         Py_INCREF(result);
   59659           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   59660           0 :                 PyErr_SetWERROR(r->out.result);
   59661           0 :                 return NULL;
   59662             :         }
   59663             : 
   59664           0 :         return result;
   59665             : }
   59666             : 
   59667             : const struct PyNdrRpcMethodDef py_ndr_srvsvc_methods[] = {
   59668             :         { "NetCharDevEnum", "S.NetCharDevEnum(server_unc, info_ctr, max_buffer, resume_handle) -> (info_ctr, totalentries, resume_handle)", (py_dcerpc_call_fn)dcerpc_srvsvc_NetCharDevEnum_r, (py_data_pack_fn)pack_py_srvsvc_NetCharDevEnum_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetCharDevEnum_args_out, 0, &ndr_table_srvsvc },
   59669             :         { "NetCharDevGetInfo", "S.NetCharDevGetInfo(server_unc, device_name, level) -> info", (py_dcerpc_call_fn)dcerpc_srvsvc_NetCharDevGetInfo_r, (py_data_pack_fn)pack_py_srvsvc_NetCharDevGetInfo_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetCharDevGetInfo_args_out, 1, &ndr_table_srvsvc },
   59670             :         { "NetCharDevControl", "S.NetCharDevControl(server_unc, device_name, opcode) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetCharDevControl_r, (py_data_pack_fn)pack_py_srvsvc_NetCharDevControl_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetCharDevControl_args_out, 2, &ndr_table_srvsvc },
   59671             :         { "NetCharDevQEnum", "S.NetCharDevQEnum(server_unc, user, info_ctr, max_buffer, resume_handle) -> (info_ctr, totalentries, resume_handle)", (py_dcerpc_call_fn)dcerpc_srvsvc_NetCharDevQEnum_r, (py_data_pack_fn)pack_py_srvsvc_NetCharDevQEnum_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetCharDevQEnum_args_out, 3, &ndr_table_srvsvc },
   59672             :         { "NetCharDevQGetInfo", "S.NetCharDevQGetInfo(server_unc, queue_name, user, level) -> info", (py_dcerpc_call_fn)dcerpc_srvsvc_NetCharDevQGetInfo_r, (py_data_pack_fn)pack_py_srvsvc_NetCharDevQGetInfo_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetCharDevQGetInfo_args_out, 4, &ndr_table_srvsvc },
   59673             :         { "NetCharDevQSetInfo", "S.NetCharDevQSetInfo(server_unc, queue_name, level, info, parm_error) -> parm_error", (py_dcerpc_call_fn)dcerpc_srvsvc_NetCharDevQSetInfo_r, (py_data_pack_fn)pack_py_srvsvc_NetCharDevQSetInfo_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetCharDevQSetInfo_args_out, 5, &ndr_table_srvsvc },
   59674             :         { "NetCharDevQPurge", "S.NetCharDevQPurge(server_unc, queue_name) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetCharDevQPurge_r, (py_data_pack_fn)pack_py_srvsvc_NetCharDevQPurge_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetCharDevQPurge_args_out, 6, &ndr_table_srvsvc },
   59675             :         { "NetCharDevQPurgeSelf", "S.NetCharDevQPurgeSelf(server_unc, queue_name, computer_name) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetCharDevQPurgeSelf_r, (py_data_pack_fn)pack_py_srvsvc_NetCharDevQPurgeSelf_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetCharDevQPurgeSelf_args_out, 7, &ndr_table_srvsvc },
   59676             :         { "NetConnEnum", "S.NetConnEnum(server_unc, path, info_ctr, max_buffer, resume_handle) -> (info_ctr, totalentries, resume_handle)", (py_dcerpc_call_fn)dcerpc_srvsvc_NetConnEnum_r, (py_data_pack_fn)pack_py_srvsvc_NetConnEnum_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetConnEnum_args_out, 8, &ndr_table_srvsvc },
   59677             :         { "NetFileEnum", "S.NetFileEnum(server_unc, path, user, info_ctr, max_buffer, resume_handle) -> (info_ctr, totalentries, resume_handle)", (py_dcerpc_call_fn)dcerpc_srvsvc_NetFileEnum_r, (py_data_pack_fn)pack_py_srvsvc_NetFileEnum_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetFileEnum_args_out, 9, &ndr_table_srvsvc },
   59678             :         { "NetFileGetInfo", "S.NetFileGetInfo(server_unc, fid, level) -> info", (py_dcerpc_call_fn)dcerpc_srvsvc_NetFileGetInfo_r, (py_data_pack_fn)pack_py_srvsvc_NetFileGetInfo_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetFileGetInfo_args_out, 10, &ndr_table_srvsvc },
   59679             :         { "NetFileClose", "S.NetFileClose(server_unc, fid) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetFileClose_r, (py_data_pack_fn)pack_py_srvsvc_NetFileClose_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetFileClose_args_out, 11, &ndr_table_srvsvc },
   59680             :         { "NetSessEnum", "S.NetSessEnum(server_unc, client, user, info_ctr, max_buffer, resume_handle) -> (info_ctr, totalentries, resume_handle)", (py_dcerpc_call_fn)dcerpc_srvsvc_NetSessEnum_r, (py_data_pack_fn)pack_py_srvsvc_NetSessEnum_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetSessEnum_args_out, 12, &ndr_table_srvsvc },
   59681             :         { "NetSessDel", "S.NetSessDel(server_unc, client, user) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetSessDel_r, (py_data_pack_fn)pack_py_srvsvc_NetSessDel_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetSessDel_args_out, 13, &ndr_table_srvsvc },
   59682             :         { "NetShareAdd", "S.NetShareAdd(server_unc, level, info, parm_error) -> parm_error", (py_dcerpc_call_fn)dcerpc_srvsvc_NetShareAdd_r, (py_data_pack_fn)pack_py_srvsvc_NetShareAdd_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetShareAdd_args_out, 14, &ndr_table_srvsvc },
   59683             :         { "NetShareEnumAll", "S.NetShareEnumAll(server_unc, info_ctr, max_buffer, resume_handle) -> (info_ctr, totalentries, resume_handle)", (py_dcerpc_call_fn)dcerpc_srvsvc_NetShareEnumAll_r, (py_data_pack_fn)pack_py_srvsvc_NetShareEnumAll_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetShareEnumAll_args_out, 15, &ndr_table_srvsvc },
   59684             :         { "NetShareGetInfo", "S.NetShareGetInfo(server_unc, share_name, level) -> info", (py_dcerpc_call_fn)dcerpc_srvsvc_NetShareGetInfo_r, (py_data_pack_fn)pack_py_srvsvc_NetShareGetInfo_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetShareGetInfo_args_out, 16, &ndr_table_srvsvc },
   59685             :         { "NetShareSetInfo", "S.NetShareSetInfo(server_unc, share_name, level, info, parm_error) -> parm_error", (py_dcerpc_call_fn)dcerpc_srvsvc_NetShareSetInfo_r, (py_data_pack_fn)pack_py_srvsvc_NetShareSetInfo_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetShareSetInfo_args_out, 17, &ndr_table_srvsvc },
   59686             :         { "NetShareDel", "S.NetShareDel(server_unc, share_name, reserved) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetShareDel_r, (py_data_pack_fn)pack_py_srvsvc_NetShareDel_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetShareDel_args_out, 18, &ndr_table_srvsvc },
   59687             :         { "NetShareDelSticky", "S.NetShareDelSticky(server_unc, share_name, reserved) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetShareDelSticky_r, (py_data_pack_fn)pack_py_srvsvc_NetShareDelSticky_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetShareDelSticky_args_out, 19, &ndr_table_srvsvc },
   59688             :         { "NetShareCheck", "S.NetShareCheck(server_unc, device_name) -> type", (py_dcerpc_call_fn)dcerpc_srvsvc_NetShareCheck_r, (py_data_pack_fn)pack_py_srvsvc_NetShareCheck_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetShareCheck_args_out, 20, &ndr_table_srvsvc },
   59689             :         { "NetSrvGetInfo", "S.NetSrvGetInfo(server_unc, level) -> info", (py_dcerpc_call_fn)dcerpc_srvsvc_NetSrvGetInfo_r, (py_data_pack_fn)pack_py_srvsvc_NetSrvGetInfo_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetSrvGetInfo_args_out, 21, &ndr_table_srvsvc },
   59690             :         { "NetSrvSetInfo", "S.NetSrvSetInfo(server_unc, level, info, parm_error) -> parm_error", (py_dcerpc_call_fn)dcerpc_srvsvc_NetSrvSetInfo_r, (py_data_pack_fn)pack_py_srvsvc_NetSrvSetInfo_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetSrvSetInfo_args_out, 22, &ndr_table_srvsvc },
   59691             :         { "NetDiskEnum", "S.NetDiskEnum(server_unc, level, info, maxlen, resume_handle) -> (info, totalentries, resume_handle)", (py_dcerpc_call_fn)dcerpc_srvsvc_NetDiskEnum_r, (py_data_pack_fn)pack_py_srvsvc_NetDiskEnum_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetDiskEnum_args_out, 23, &ndr_table_srvsvc },
   59692             :         { "NetServerStatisticsGet", "S.NetServerStatisticsGet(server_unc, service, level, options) -> stats", (py_dcerpc_call_fn)dcerpc_srvsvc_NetServerStatisticsGet_r, (py_data_pack_fn)pack_py_srvsvc_NetServerStatisticsGet_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetServerStatisticsGet_args_out, 24, &ndr_table_srvsvc },
   59693             :         { "NetTransportAdd", "S.NetTransportAdd(server_unc, level, info) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetTransportAdd_r, (py_data_pack_fn)pack_py_srvsvc_NetTransportAdd_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetTransportAdd_args_out, 25, &ndr_table_srvsvc },
   59694             :         { "NetTransportEnum", "S.NetTransportEnum(server_unc, transports, max_buffer, resume_handle) -> (transports, totalentries, resume_handle)", (py_dcerpc_call_fn)dcerpc_srvsvc_NetTransportEnum_r, (py_data_pack_fn)pack_py_srvsvc_NetTransportEnum_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetTransportEnum_args_out, 26, &ndr_table_srvsvc },
   59695             :         { "NetTransportDel", "S.NetTransportDel(server_unc, level, info0) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetTransportDel_r, (py_data_pack_fn)pack_py_srvsvc_NetTransportDel_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetTransportDel_args_out, 27, &ndr_table_srvsvc },
   59696             :         { "NetRemoteTOD", "S.NetRemoteTOD(server_unc) -> info", (py_dcerpc_call_fn)dcerpc_srvsvc_NetRemoteTOD_r, (py_data_pack_fn)pack_py_srvsvc_NetRemoteTOD_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetRemoteTOD_args_out, 28, &ndr_table_srvsvc },
   59697             :         { "NetSetServiceBits", "S.NetSetServiceBits(server_unc, transport, servicebits, updateimmediately) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetSetServiceBits_r, (py_data_pack_fn)pack_py_srvsvc_NetSetServiceBits_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetSetServiceBits_args_out, 29, &ndr_table_srvsvc },
   59698             :         { "NetPathType", "S.NetPathType(server_unc, path, pathflags) -> pathtype", (py_dcerpc_call_fn)dcerpc_srvsvc_NetPathType_r, (py_data_pack_fn)pack_py_srvsvc_NetPathType_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetPathType_args_out, 30, &ndr_table_srvsvc },
   59699             :         { "NetPathCanonicalize", "S.NetPathCanonicalize(server_unc, path, maxbuf, prefix, pathtype, pathflags) -> (can_path, pathtype)", (py_dcerpc_call_fn)dcerpc_srvsvc_NetPathCanonicalize_r, (py_data_pack_fn)pack_py_srvsvc_NetPathCanonicalize_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetPathCanonicalize_args_out, 31, &ndr_table_srvsvc },
   59700             :         { "NetPathCompare", "S.NetPathCompare(server_unc, path1, path2, pathtype, pathflags) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetPathCompare_r, (py_data_pack_fn)pack_py_srvsvc_NetPathCompare_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetPathCompare_args_out, 32, &ndr_table_srvsvc },
   59701             :         { "NetNameValidate", "S.NetNameValidate(server_unc, name, name_type, flags) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetNameValidate_r, (py_data_pack_fn)pack_py_srvsvc_NetNameValidate_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetNameValidate_args_out, 33, &ndr_table_srvsvc },
   59702             :         { "NetPRNameCompare", "S.NetPRNameCompare(server_unc, name1, name2, name_type, flags) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetPRNameCompare_r, (py_data_pack_fn)pack_py_srvsvc_NetPRNameCompare_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetPRNameCompare_args_out, 35, &ndr_table_srvsvc },
   59703             :         { "NetShareEnum", "S.NetShareEnum(server_unc, info_ctr, max_buffer, resume_handle) -> (info_ctr, totalentries, resume_handle)", (py_dcerpc_call_fn)dcerpc_srvsvc_NetShareEnum_r, (py_data_pack_fn)pack_py_srvsvc_NetShareEnum_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetShareEnum_args_out, 36, &ndr_table_srvsvc },
   59704             :         { "NetShareDelStart", "S.NetShareDelStart(server_unc, share, reserved) -> hnd", (py_dcerpc_call_fn)dcerpc_srvsvc_NetShareDelStart_r, (py_data_pack_fn)pack_py_srvsvc_NetShareDelStart_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetShareDelStart_args_out, 37, &ndr_table_srvsvc },
   59705             :         { "NetShareDelCommit", "S.NetShareDelCommit(hnd) -> hnd", (py_dcerpc_call_fn)dcerpc_srvsvc_NetShareDelCommit_r, (py_data_pack_fn)pack_py_srvsvc_NetShareDelCommit_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetShareDelCommit_args_out, 38, &ndr_table_srvsvc },
   59706             :         { "NetGetFileSecurity", "S.NetGetFileSecurity(server_unc, share, file, securityinformation) -> sd_buf", (py_dcerpc_call_fn)dcerpc_srvsvc_NetGetFileSecurity_r, (py_data_pack_fn)pack_py_srvsvc_NetGetFileSecurity_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetGetFileSecurity_args_out, 39, &ndr_table_srvsvc },
   59707             :         { "NetSetFileSecurity", "S.NetSetFileSecurity(server_unc, share, file, securityinformation, sd_buf) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetSetFileSecurity_r, (py_data_pack_fn)pack_py_srvsvc_NetSetFileSecurity_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetSetFileSecurity_args_out, 40, &ndr_table_srvsvc },
   59708             :         { "NetServerTransportAddEx", "S.NetServerTransportAddEx(server_unc, level, info) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetServerTransportAddEx_r, (py_data_pack_fn)pack_py_srvsvc_NetServerTransportAddEx_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetServerTransportAddEx_args_out, 41, &ndr_table_srvsvc },
   59709             :         { "NetServerSetServiceBitsEx", "S.NetServerSetServiceBitsEx(server_unc, emulated_server_unc, transport, servicebitsofinterest, servicebits, updateimmediately) -> None", (py_dcerpc_call_fn)dcerpc_srvsvc_NetServerSetServiceBitsEx_r, (py_data_pack_fn)pack_py_srvsvc_NetServerSetServiceBitsEx_args_in, (py_data_unpack_fn)unpack_py_srvsvc_NetServerSetServiceBitsEx_args_out, 42, &ndr_table_srvsvc },
   59710             :         {0}
   59711             : };
   59712             : 
   59713          16 : static PyObject *interface_srvsvc_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   59714             : {
   59715          16 :         return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_srvsvc);
   59716             : }
   59717             : 
   59718             : #define PY_DOC_SRVSVC "Server Service"
   59719             : static PyTypeObject srvsvc_InterfaceType = {
   59720             :         PyVarObject_HEAD_INIT(NULL, 0)
   59721             :         .tp_name = "srvsvc.srvsvc",
   59722             :         .tp_basicsize = sizeof(dcerpc_InterfaceObject),
   59723             :         .tp_doc = "srvsvc(binding, lp_ctx=None, credentials=None) -> connection\n"
   59724             : "\n"
   59725             : "binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
   59726             : "lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
   59727             : "credentials should be a credentials.Credentials object.\n\n"PY_DOC_SRVSVC,
   59728             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   59729             :         .tp_new = interface_srvsvc_new,
   59730             : };
   59731             : 
   59732           0 : static PyObject *syntax_srvsvc_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   59733             : {
   59734           0 :         return py_dcerpc_syntax_init_helper(type, args, kwargs, &ndr_table_srvsvc.syntax_id);
   59735             : }
   59736             : 
   59737             : #define PY_DOC_SRVSVC_SYNTAX "Server Service"
   59738             : static PyTypeObject srvsvc_SyntaxType = {
   59739             :         PyVarObject_HEAD_INIT(NULL, 0)
   59740             :         .tp_name = "srvsvc.srvsvc_abstract_syntax",
   59741             :         .tp_doc = "srvsvc_abstract_syntax()\n"PY_DOC_SRVSVC_SYNTAX,
   59742             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   59743             :         .tp_new = syntax_srvsvc_new,
   59744             : };
   59745             : 
   59746             : static PyMethodDef srvsvc_methods[] = {
   59747             :         { NULL, NULL, 0, NULL }
   59748             : };
   59749             : 
   59750             : static struct PyModuleDef moduledef = {
   59751             :         PyModuleDef_HEAD_INIT,
   59752             :         .m_name = "srvsvc",
   59753             :         .m_doc = "srvsvc DCE/RPC",
   59754             :         .m_size = -1,
   59755             :         .m_methods = srvsvc_methods,
   59756             : };
   59757          35 : MODULE_INIT_FUNC(srvsvc)
   59758             : {
   59759          35 :         PyObject *m = NULL;
   59760          35 :         PyObject *dep_samba_dcerpc_misc = NULL;
   59761          35 :         PyObject *dep_samba_dcerpc_security = NULL;
   59762          35 :         PyObject *dep_samba_dcerpc_svcctl = NULL;
   59763          35 :         PyObject *dep_talloc = NULL;
   59764          35 :         PyObject *dep_samba_dcerpc_base = NULL;
   59765             : 
   59766          35 :         dep_samba_dcerpc_misc = PyImport_ImportModule("samba.dcerpc.misc");
   59767          35 :         if (dep_samba_dcerpc_misc == NULL)
   59768           0 :                 goto out;
   59769             : 
   59770          35 :         dep_samba_dcerpc_security = PyImport_ImportModule("samba.dcerpc.security");
   59771          35 :         if (dep_samba_dcerpc_security == NULL)
   59772           0 :                 goto out;
   59773             : 
   59774          35 :         dep_samba_dcerpc_svcctl = PyImport_ImportModule("samba.dcerpc.svcctl");
   59775          35 :         if (dep_samba_dcerpc_svcctl == NULL)
   59776           0 :                 goto out;
   59777             : 
   59778          35 :         dep_talloc = PyImport_ImportModule("talloc");
   59779          35 :         if (dep_talloc == NULL)
   59780           0 :                 goto out;
   59781             : 
   59782          35 :         dep_samba_dcerpc_base = PyImport_ImportModule("samba.dcerpc.base");
   59783          35 :         if (dep_samba_dcerpc_base == NULL)
   59784           0 :                 goto out;
   59785             : 
   59786          35 :         BaseObject_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "BaseObject");
   59787          35 :         if (BaseObject_Type == NULL)
   59788           0 :                 goto out;
   59789             : 
   59790          35 :         sec_desc_buf_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_security, "sec_desc_buf");
   59791          35 :         if (sec_desc_buf_Type == NULL)
   59792           0 :                 goto out;
   59793             : 
   59794          35 :         policy_handle_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "policy_handle");
   59795          35 :         if (policy_handle_Type == NULL)
   59796           0 :                 goto out;
   59797             : 
   59798          35 :         ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
   59799          35 :         if (ClientConnection_Type == NULL)
   59800           0 :                 goto out;
   59801             : 
   59802          35 :         ndr_syntax_id_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "ndr_syntax_id");
   59803          35 :         if (ndr_syntax_id_Type == NULL)
   59804           0 :                 goto out;
   59805             : 
   59806          35 :         srvsvc_NetCharDevInfo0_Type.tp_base = BaseObject_Type;
   59807          35 :         srvsvc_NetCharDevInfo0_Type.tp_basicsize = pytalloc_BaseObject_size();
   59808             : 
   59809          35 :         srvsvc_NetCharDevCtr0_Type.tp_base = BaseObject_Type;
   59810          35 :         srvsvc_NetCharDevCtr0_Type.tp_basicsize = pytalloc_BaseObject_size();
   59811             : 
   59812          35 :         srvsvc_NetCharDevInfo1_Type.tp_base = BaseObject_Type;
   59813          35 :         srvsvc_NetCharDevInfo1_Type.tp_basicsize = pytalloc_BaseObject_size();
   59814             : 
   59815          35 :         srvsvc_NetCharDevCtr1_Type.tp_base = BaseObject_Type;
   59816          35 :         srvsvc_NetCharDevCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
   59817             : 
   59818          35 :         srvsvc_NetCharDevInfo_Type.tp_base = BaseObject_Type;
   59819          35 :         srvsvc_NetCharDevInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   59820             : 
   59821          35 :         srvsvc_NetCharDevCtr_Type.tp_base = BaseObject_Type;
   59822          35 :         srvsvc_NetCharDevCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   59823             : 
   59824          35 :         srvsvc_NetCharDevInfoCtr_Type.tp_base = BaseObject_Type;
   59825          35 :         srvsvc_NetCharDevInfoCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   59826             : 
   59827          35 :         srvsvc_NetCharDevQInfo0_Type.tp_base = BaseObject_Type;
   59828          35 :         srvsvc_NetCharDevQInfo0_Type.tp_basicsize = pytalloc_BaseObject_size();
   59829             : 
   59830          35 :         srvsvc_NetCharDevQCtr0_Type.tp_base = BaseObject_Type;
   59831          35 :         srvsvc_NetCharDevQCtr0_Type.tp_basicsize = pytalloc_BaseObject_size();
   59832             : 
   59833          35 :         srvsvc_NetCharDevQInfo1_Type.tp_base = BaseObject_Type;
   59834          35 :         srvsvc_NetCharDevQInfo1_Type.tp_basicsize = pytalloc_BaseObject_size();
   59835             : 
   59836          35 :         srvsvc_NetCharDevQCtr1_Type.tp_base = BaseObject_Type;
   59837          35 :         srvsvc_NetCharDevQCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
   59838             : 
   59839          35 :         srvsvc_NetCharDevQInfo_Type.tp_base = BaseObject_Type;
   59840          35 :         srvsvc_NetCharDevQInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   59841             : 
   59842          35 :         srvsvc_NetCharDevQCtr_Type.tp_base = BaseObject_Type;
   59843          35 :         srvsvc_NetCharDevQCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   59844             : 
   59845          35 :         srvsvc_NetCharDevQInfoCtr_Type.tp_base = BaseObject_Type;
   59846          35 :         srvsvc_NetCharDevQInfoCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   59847             : 
   59848          35 :         srvsvc_NetConnInfo0_Type.tp_base = BaseObject_Type;
   59849          35 :         srvsvc_NetConnInfo0_Type.tp_basicsize = pytalloc_BaseObject_size();
   59850             : 
   59851          35 :         srvsvc_NetConnCtr0_Type.tp_base = BaseObject_Type;
   59852          35 :         srvsvc_NetConnCtr0_Type.tp_basicsize = pytalloc_BaseObject_size();
   59853             : 
   59854          35 :         srvsvc_NetConnInfo1_Type.tp_base = BaseObject_Type;
   59855          35 :         srvsvc_NetConnInfo1_Type.tp_basicsize = pytalloc_BaseObject_size();
   59856             : 
   59857          35 :         srvsvc_NetConnCtr1_Type.tp_base = BaseObject_Type;
   59858          35 :         srvsvc_NetConnCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
   59859             : 
   59860          35 :         srvsvc_NetConnCtr_Type.tp_base = BaseObject_Type;
   59861          35 :         srvsvc_NetConnCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   59862             : 
   59863          35 :         srvsvc_NetConnInfoCtr_Type.tp_base = BaseObject_Type;
   59864          35 :         srvsvc_NetConnInfoCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   59865             : 
   59866          35 :         srvsvc_NetFileInfo2_Type.tp_base = BaseObject_Type;
   59867          35 :         srvsvc_NetFileInfo2_Type.tp_basicsize = pytalloc_BaseObject_size();
   59868             : 
   59869          35 :         srvsvc_NetFileCtr2_Type.tp_base = BaseObject_Type;
   59870          35 :         srvsvc_NetFileCtr2_Type.tp_basicsize = pytalloc_BaseObject_size();
   59871             : 
   59872          35 :         srvsvc_NetFileInfo3_Type.tp_base = BaseObject_Type;
   59873          35 :         srvsvc_NetFileInfo3_Type.tp_basicsize = pytalloc_BaseObject_size();
   59874             : 
   59875          35 :         srvsvc_NetFileCtr3_Type.tp_base = BaseObject_Type;
   59876          35 :         srvsvc_NetFileCtr3_Type.tp_basicsize = pytalloc_BaseObject_size();
   59877             : 
   59878          35 :         srvsvc_NetFileInfo_Type.tp_base = BaseObject_Type;
   59879          35 :         srvsvc_NetFileInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   59880             : 
   59881          35 :         srvsvc_NetFileCtr_Type.tp_base = BaseObject_Type;
   59882          35 :         srvsvc_NetFileCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   59883             : 
   59884          35 :         srvsvc_NetFileInfoCtr_Type.tp_base = BaseObject_Type;
   59885          35 :         srvsvc_NetFileInfoCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   59886             : 
   59887          35 :         srvsvc_NetSessInfo0_Type.tp_base = BaseObject_Type;
   59888          35 :         srvsvc_NetSessInfo0_Type.tp_basicsize = pytalloc_BaseObject_size();
   59889             : 
   59890          35 :         srvsvc_NetSessCtr0_Type.tp_base = BaseObject_Type;
   59891          35 :         srvsvc_NetSessCtr0_Type.tp_basicsize = pytalloc_BaseObject_size();
   59892             : 
   59893          35 :         srvsvc_NetSessInfo1_Type.tp_base = BaseObject_Type;
   59894          35 :         srvsvc_NetSessInfo1_Type.tp_basicsize = pytalloc_BaseObject_size();
   59895             : 
   59896          35 :         srvsvc_NetSessCtr1_Type.tp_base = BaseObject_Type;
   59897          35 :         srvsvc_NetSessCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
   59898             : 
   59899          35 :         srvsvc_NetSessInfo2_Type.tp_base = BaseObject_Type;
   59900          35 :         srvsvc_NetSessInfo2_Type.tp_basicsize = pytalloc_BaseObject_size();
   59901             : 
   59902          35 :         srvsvc_NetSessCtr2_Type.tp_base = BaseObject_Type;
   59903          35 :         srvsvc_NetSessCtr2_Type.tp_basicsize = pytalloc_BaseObject_size();
   59904             : 
   59905          35 :         srvsvc_NetSessInfo10_Type.tp_base = BaseObject_Type;
   59906          35 :         srvsvc_NetSessInfo10_Type.tp_basicsize = pytalloc_BaseObject_size();
   59907             : 
   59908          35 :         srvsvc_NetSessCtr10_Type.tp_base = BaseObject_Type;
   59909          35 :         srvsvc_NetSessCtr10_Type.tp_basicsize = pytalloc_BaseObject_size();
   59910             : 
   59911          35 :         srvsvc_NetSessInfo502_Type.tp_base = BaseObject_Type;
   59912          35 :         srvsvc_NetSessInfo502_Type.tp_basicsize = pytalloc_BaseObject_size();
   59913             : 
   59914          35 :         srvsvc_NetSessCtr502_Type.tp_base = BaseObject_Type;
   59915          35 :         srvsvc_NetSessCtr502_Type.tp_basicsize = pytalloc_BaseObject_size();
   59916             : 
   59917          35 :         srvsvc_NetSessCtr_Type.tp_base = BaseObject_Type;
   59918          35 :         srvsvc_NetSessCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   59919             : 
   59920          35 :         srvsvc_NetSessInfoCtr_Type.tp_base = BaseObject_Type;
   59921          35 :         srvsvc_NetSessInfoCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   59922             : 
   59923          35 :         srvsvc_NetShareInfo0_Type.tp_base = BaseObject_Type;
   59924          35 :         srvsvc_NetShareInfo0_Type.tp_basicsize = pytalloc_BaseObject_size();
   59925             : 
   59926          35 :         srvsvc_NetShareCtr0_Type.tp_base = BaseObject_Type;
   59927          35 :         srvsvc_NetShareCtr0_Type.tp_basicsize = pytalloc_BaseObject_size();
   59928             : 
   59929          35 :         srvsvc_NetShareInfo1_Type.tp_base = BaseObject_Type;
   59930          35 :         srvsvc_NetShareInfo1_Type.tp_basicsize = pytalloc_BaseObject_size();
   59931             : 
   59932          35 :         srvsvc_NetShareCtr1_Type.tp_base = BaseObject_Type;
   59933          35 :         srvsvc_NetShareCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
   59934             : 
   59935          35 :         srvsvc_NetShareInfo2_Type.tp_base = BaseObject_Type;
   59936          35 :         srvsvc_NetShareInfo2_Type.tp_basicsize = pytalloc_BaseObject_size();
   59937             : 
   59938          35 :         srvsvc_NetShareCtr2_Type.tp_base = BaseObject_Type;
   59939          35 :         srvsvc_NetShareCtr2_Type.tp_basicsize = pytalloc_BaseObject_size();
   59940             : 
   59941          35 :         srvsvc_NetShareInfo501_Type.tp_base = BaseObject_Type;
   59942          35 :         srvsvc_NetShareInfo501_Type.tp_basicsize = pytalloc_BaseObject_size();
   59943             : 
   59944          35 :         srvsvc_NetShareCtr501_Type.tp_base = BaseObject_Type;
   59945          35 :         srvsvc_NetShareCtr501_Type.tp_basicsize = pytalloc_BaseObject_size();
   59946             : 
   59947          35 :         srvsvc_NetShareInfo502_Type.tp_base = BaseObject_Type;
   59948          35 :         srvsvc_NetShareInfo502_Type.tp_basicsize = pytalloc_BaseObject_size();
   59949             : 
   59950          35 :         srvsvc_NetShareCtr502_Type.tp_base = BaseObject_Type;
   59951          35 :         srvsvc_NetShareCtr502_Type.tp_basicsize = pytalloc_BaseObject_size();
   59952             : 
   59953          35 :         srvsvc_NetShareInfo1004_Type.tp_base = BaseObject_Type;
   59954          35 :         srvsvc_NetShareInfo1004_Type.tp_basicsize = pytalloc_BaseObject_size();
   59955             : 
   59956          35 :         srvsvc_NetShareCtr1004_Type.tp_base = BaseObject_Type;
   59957          35 :         srvsvc_NetShareCtr1004_Type.tp_basicsize = pytalloc_BaseObject_size();
   59958             : 
   59959          35 :         srvsvc_NetShareInfo1005_Type.tp_base = BaseObject_Type;
   59960          35 :         srvsvc_NetShareInfo1005_Type.tp_basicsize = pytalloc_BaseObject_size();
   59961             : 
   59962          35 :         srvsvc_NetShareCtr1005_Type.tp_base = BaseObject_Type;
   59963          35 :         srvsvc_NetShareCtr1005_Type.tp_basicsize = pytalloc_BaseObject_size();
   59964             : 
   59965          35 :         srvsvc_NetShareInfo1006_Type.tp_base = BaseObject_Type;
   59966          35 :         srvsvc_NetShareInfo1006_Type.tp_basicsize = pytalloc_BaseObject_size();
   59967             : 
   59968          35 :         srvsvc_NetShareCtr1006_Type.tp_base = BaseObject_Type;
   59969          35 :         srvsvc_NetShareCtr1006_Type.tp_basicsize = pytalloc_BaseObject_size();
   59970             : 
   59971          35 :         srvsvc_NetShareInfo1007_Type.tp_base = BaseObject_Type;
   59972          35 :         srvsvc_NetShareInfo1007_Type.tp_basicsize = pytalloc_BaseObject_size();
   59973             : 
   59974          35 :         srvsvc_NetShareCtr1007_Type.tp_base = BaseObject_Type;
   59975          35 :         srvsvc_NetShareCtr1007_Type.tp_basicsize = pytalloc_BaseObject_size();
   59976             : 
   59977          35 :         srvsvc_NetShareCtr1501_Type.tp_base = BaseObject_Type;
   59978          35 :         srvsvc_NetShareCtr1501_Type.tp_basicsize = pytalloc_BaseObject_size();
   59979             : 
   59980          35 :         srvsvc_NetShareInfo_Type.tp_base = BaseObject_Type;
   59981          35 :         srvsvc_NetShareInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   59982             : 
   59983          35 :         srvsvc_NetShareCtr_Type.tp_base = BaseObject_Type;
   59984          35 :         srvsvc_NetShareCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   59985             : 
   59986          35 :         srvsvc_NetShareInfoCtr_Type.tp_base = BaseObject_Type;
   59987          35 :         srvsvc_NetShareInfoCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   59988             : 
   59989          35 :         srvsvc_NetSrvInfo100_Type.tp_base = BaseObject_Type;
   59990          35 :         srvsvc_NetSrvInfo100_Type.tp_basicsize = pytalloc_BaseObject_size();
   59991             : 
   59992          35 :         srvsvc_NetSrvInfo101_Type.tp_base = BaseObject_Type;
   59993          35 :         srvsvc_NetSrvInfo101_Type.tp_basicsize = pytalloc_BaseObject_size();
   59994             : 
   59995          35 :         srvsvc_NetSrvInfo102_Type.tp_base = BaseObject_Type;
   59996          35 :         srvsvc_NetSrvInfo102_Type.tp_basicsize = pytalloc_BaseObject_size();
   59997             : 
   59998          35 :         srvsvc_NetSrvInfo402_Type.tp_base = BaseObject_Type;
   59999          35 :         srvsvc_NetSrvInfo402_Type.tp_basicsize = pytalloc_BaseObject_size();
   60000             : 
   60001          35 :         srvsvc_NetSrvInfo403_Type.tp_base = BaseObject_Type;
   60002          35 :         srvsvc_NetSrvInfo403_Type.tp_basicsize = pytalloc_BaseObject_size();
   60003             : 
   60004          35 :         srvsvc_NetSrvInfo502_Type.tp_base = BaseObject_Type;
   60005          35 :         srvsvc_NetSrvInfo502_Type.tp_basicsize = pytalloc_BaseObject_size();
   60006             : 
   60007          35 :         srvsvc_NetSrvInfo503_Type.tp_base = BaseObject_Type;
   60008          35 :         srvsvc_NetSrvInfo503_Type.tp_basicsize = pytalloc_BaseObject_size();
   60009             : 
   60010          35 :         srvsvc_NetSrvInfo599_Type.tp_base = BaseObject_Type;
   60011          35 :         srvsvc_NetSrvInfo599_Type.tp_basicsize = pytalloc_BaseObject_size();
   60012             : 
   60013          35 :         srvsvc_NetSrvInfo1005_Type.tp_base = BaseObject_Type;
   60014          35 :         srvsvc_NetSrvInfo1005_Type.tp_basicsize = pytalloc_BaseObject_size();
   60015             : 
   60016          35 :         srvsvc_NetSrvInfo1010_Type.tp_base = BaseObject_Type;
   60017          35 :         srvsvc_NetSrvInfo1010_Type.tp_basicsize = pytalloc_BaseObject_size();
   60018             : 
   60019          35 :         srvsvc_NetSrvInfo1016_Type.tp_base = BaseObject_Type;
   60020          35 :         srvsvc_NetSrvInfo1016_Type.tp_basicsize = pytalloc_BaseObject_size();
   60021             : 
   60022          35 :         srvsvc_NetSrvInfo1017_Type.tp_base = BaseObject_Type;
   60023          35 :         srvsvc_NetSrvInfo1017_Type.tp_basicsize = pytalloc_BaseObject_size();
   60024             : 
   60025          35 :         srvsvc_NetSrvInfo1018_Type.tp_base = BaseObject_Type;
   60026          35 :         srvsvc_NetSrvInfo1018_Type.tp_basicsize = pytalloc_BaseObject_size();
   60027             : 
   60028          35 :         srvsvc_NetSrvInfo1107_Type.tp_base = BaseObject_Type;
   60029          35 :         srvsvc_NetSrvInfo1107_Type.tp_basicsize = pytalloc_BaseObject_size();
   60030             : 
   60031          35 :         srvsvc_NetSrvInfo1501_Type.tp_base = BaseObject_Type;
   60032          35 :         srvsvc_NetSrvInfo1501_Type.tp_basicsize = pytalloc_BaseObject_size();
   60033             : 
   60034          35 :         srvsvc_NetSrvInfo1502_Type.tp_base = BaseObject_Type;
   60035          35 :         srvsvc_NetSrvInfo1502_Type.tp_basicsize = pytalloc_BaseObject_size();
   60036             : 
   60037          35 :         srvsvc_NetSrvInfo1503_Type.tp_base = BaseObject_Type;
   60038          35 :         srvsvc_NetSrvInfo1503_Type.tp_basicsize = pytalloc_BaseObject_size();
   60039             : 
   60040          35 :         srvsvc_NetSrvInfo1506_Type.tp_base = BaseObject_Type;
   60041          35 :         srvsvc_NetSrvInfo1506_Type.tp_basicsize = pytalloc_BaseObject_size();
   60042             : 
   60043          35 :         srvsvc_NetSrvInfo1509_Type.tp_base = BaseObject_Type;
   60044          35 :         srvsvc_NetSrvInfo1509_Type.tp_basicsize = pytalloc_BaseObject_size();
   60045             : 
   60046          35 :         srvsvc_NetSrvInfo1510_Type.tp_base = BaseObject_Type;
   60047          35 :         srvsvc_NetSrvInfo1510_Type.tp_basicsize = pytalloc_BaseObject_size();
   60048             : 
   60049          35 :         srvsvc_NetSrvInfo1511_Type.tp_base = BaseObject_Type;
   60050          35 :         srvsvc_NetSrvInfo1511_Type.tp_basicsize = pytalloc_BaseObject_size();
   60051             : 
   60052          35 :         srvsvc_NetSrvInfo1512_Type.tp_base = BaseObject_Type;
   60053          35 :         srvsvc_NetSrvInfo1512_Type.tp_basicsize = pytalloc_BaseObject_size();
   60054             : 
   60055          35 :         srvsvc_NetSrvInfo1513_Type.tp_base = BaseObject_Type;
   60056          35 :         srvsvc_NetSrvInfo1513_Type.tp_basicsize = pytalloc_BaseObject_size();
   60057             : 
   60058          35 :         srvsvc_NetSrvInfo1514_Type.tp_base = BaseObject_Type;
   60059          35 :         srvsvc_NetSrvInfo1514_Type.tp_basicsize = pytalloc_BaseObject_size();
   60060             : 
   60061          35 :         srvsvc_NetSrvInfo1515_Type.tp_base = BaseObject_Type;
   60062          35 :         srvsvc_NetSrvInfo1515_Type.tp_basicsize = pytalloc_BaseObject_size();
   60063             : 
   60064          35 :         srvsvc_NetSrvInfo1516_Type.tp_base = BaseObject_Type;
   60065          35 :         srvsvc_NetSrvInfo1516_Type.tp_basicsize = pytalloc_BaseObject_size();
   60066             : 
   60067          35 :         srvsvc_NetSrvInfo1518_Type.tp_base = BaseObject_Type;
   60068          35 :         srvsvc_NetSrvInfo1518_Type.tp_basicsize = pytalloc_BaseObject_size();
   60069             : 
   60070          35 :         srvsvc_NetSrvInfo1520_Type.tp_base = BaseObject_Type;
   60071          35 :         srvsvc_NetSrvInfo1520_Type.tp_basicsize = pytalloc_BaseObject_size();
   60072             : 
   60073          35 :         srvsvc_NetSrvInfo1521_Type.tp_base = BaseObject_Type;
   60074          35 :         srvsvc_NetSrvInfo1521_Type.tp_basicsize = pytalloc_BaseObject_size();
   60075             : 
   60076          35 :         srvsvc_NetSrvInfo1522_Type.tp_base = BaseObject_Type;
   60077          35 :         srvsvc_NetSrvInfo1522_Type.tp_basicsize = pytalloc_BaseObject_size();
   60078             : 
   60079          35 :         srvsvc_NetSrvInfo1523_Type.tp_base = BaseObject_Type;
   60080          35 :         srvsvc_NetSrvInfo1523_Type.tp_basicsize = pytalloc_BaseObject_size();
   60081             : 
   60082          35 :         srvsvc_NetSrvInfo1524_Type.tp_base = BaseObject_Type;
   60083          35 :         srvsvc_NetSrvInfo1524_Type.tp_basicsize = pytalloc_BaseObject_size();
   60084             : 
   60085          35 :         srvsvc_NetSrvInfo1525_Type.tp_base = BaseObject_Type;
   60086          35 :         srvsvc_NetSrvInfo1525_Type.tp_basicsize = pytalloc_BaseObject_size();
   60087             : 
   60088          35 :         srvsvc_NetSrvInfo1528_Type.tp_base = BaseObject_Type;
   60089          35 :         srvsvc_NetSrvInfo1528_Type.tp_basicsize = pytalloc_BaseObject_size();
   60090             : 
   60091          35 :         srvsvc_NetSrvInfo1529_Type.tp_base = BaseObject_Type;
   60092          35 :         srvsvc_NetSrvInfo1529_Type.tp_basicsize = pytalloc_BaseObject_size();
   60093             : 
   60094          35 :         srvsvc_NetSrvInfo1530_Type.tp_base = BaseObject_Type;
   60095          35 :         srvsvc_NetSrvInfo1530_Type.tp_basicsize = pytalloc_BaseObject_size();
   60096             : 
   60097          35 :         srvsvc_NetSrvInfo1533_Type.tp_base = BaseObject_Type;
   60098          35 :         srvsvc_NetSrvInfo1533_Type.tp_basicsize = pytalloc_BaseObject_size();
   60099             : 
   60100          35 :         srvsvc_NetSrvInfo1534_Type.tp_base = BaseObject_Type;
   60101          35 :         srvsvc_NetSrvInfo1534_Type.tp_basicsize = pytalloc_BaseObject_size();
   60102             : 
   60103          35 :         srvsvc_NetSrvInfo1535_Type.tp_base = BaseObject_Type;
   60104          35 :         srvsvc_NetSrvInfo1535_Type.tp_basicsize = pytalloc_BaseObject_size();
   60105             : 
   60106          35 :         srvsvc_NetSrvInfo1536_Type.tp_base = BaseObject_Type;
   60107          35 :         srvsvc_NetSrvInfo1536_Type.tp_basicsize = pytalloc_BaseObject_size();
   60108             : 
   60109          35 :         srvsvc_NetSrvInfo1537_Type.tp_base = BaseObject_Type;
   60110          35 :         srvsvc_NetSrvInfo1537_Type.tp_basicsize = pytalloc_BaseObject_size();
   60111             : 
   60112          35 :         srvsvc_NetSrvInfo1538_Type.tp_base = BaseObject_Type;
   60113          35 :         srvsvc_NetSrvInfo1538_Type.tp_basicsize = pytalloc_BaseObject_size();
   60114             : 
   60115          35 :         srvsvc_NetSrvInfo1539_Type.tp_base = BaseObject_Type;
   60116          35 :         srvsvc_NetSrvInfo1539_Type.tp_basicsize = pytalloc_BaseObject_size();
   60117             : 
   60118          35 :         srvsvc_NetSrvInfo1540_Type.tp_base = BaseObject_Type;
   60119          35 :         srvsvc_NetSrvInfo1540_Type.tp_basicsize = pytalloc_BaseObject_size();
   60120             : 
   60121          35 :         srvsvc_NetSrvInfo1541_Type.tp_base = BaseObject_Type;
   60122          35 :         srvsvc_NetSrvInfo1541_Type.tp_basicsize = pytalloc_BaseObject_size();
   60123             : 
   60124          35 :         srvsvc_NetSrvInfo1542_Type.tp_base = BaseObject_Type;
   60125          35 :         srvsvc_NetSrvInfo1542_Type.tp_basicsize = pytalloc_BaseObject_size();
   60126             : 
   60127          35 :         srvsvc_NetSrvInfo1543_Type.tp_base = BaseObject_Type;
   60128          35 :         srvsvc_NetSrvInfo1543_Type.tp_basicsize = pytalloc_BaseObject_size();
   60129             : 
   60130          35 :         srvsvc_NetSrvInfo1544_Type.tp_base = BaseObject_Type;
   60131          35 :         srvsvc_NetSrvInfo1544_Type.tp_basicsize = pytalloc_BaseObject_size();
   60132             : 
   60133          35 :         srvsvc_NetSrvInfo1545_Type.tp_base = BaseObject_Type;
   60134          35 :         srvsvc_NetSrvInfo1545_Type.tp_basicsize = pytalloc_BaseObject_size();
   60135             : 
   60136          35 :         srvsvc_NetSrvInfo1546_Type.tp_base = BaseObject_Type;
   60137          35 :         srvsvc_NetSrvInfo1546_Type.tp_basicsize = pytalloc_BaseObject_size();
   60138             : 
   60139          35 :         srvsvc_NetSrvInfo1547_Type.tp_base = BaseObject_Type;
   60140          35 :         srvsvc_NetSrvInfo1547_Type.tp_basicsize = pytalloc_BaseObject_size();
   60141             : 
   60142          35 :         srvsvc_NetSrvInfo1548_Type.tp_base = BaseObject_Type;
   60143          35 :         srvsvc_NetSrvInfo1548_Type.tp_basicsize = pytalloc_BaseObject_size();
   60144             : 
   60145          35 :         srvsvc_NetSrvInfo1549_Type.tp_base = BaseObject_Type;
   60146          35 :         srvsvc_NetSrvInfo1549_Type.tp_basicsize = pytalloc_BaseObject_size();
   60147             : 
   60148          35 :         srvsvc_NetSrvInfo1550_Type.tp_base = BaseObject_Type;
   60149          35 :         srvsvc_NetSrvInfo1550_Type.tp_basicsize = pytalloc_BaseObject_size();
   60150             : 
   60151          35 :         srvsvc_NetSrvInfo1552_Type.tp_base = BaseObject_Type;
   60152          35 :         srvsvc_NetSrvInfo1552_Type.tp_basicsize = pytalloc_BaseObject_size();
   60153             : 
   60154          35 :         srvsvc_NetSrvInfo1553_Type.tp_base = BaseObject_Type;
   60155          35 :         srvsvc_NetSrvInfo1553_Type.tp_basicsize = pytalloc_BaseObject_size();
   60156             : 
   60157          35 :         srvsvc_NetSrvInfo1554_Type.tp_base = BaseObject_Type;
   60158          35 :         srvsvc_NetSrvInfo1554_Type.tp_basicsize = pytalloc_BaseObject_size();
   60159             : 
   60160          35 :         srvsvc_NetSrvInfo1555_Type.tp_base = BaseObject_Type;
   60161          35 :         srvsvc_NetSrvInfo1555_Type.tp_basicsize = pytalloc_BaseObject_size();
   60162             : 
   60163          35 :         srvsvc_NetSrvInfo1556_Type.tp_base = BaseObject_Type;
   60164          35 :         srvsvc_NetSrvInfo1556_Type.tp_basicsize = pytalloc_BaseObject_size();
   60165             : 
   60166          35 :         srvsvc_NetSrvInfo_Type.tp_base = BaseObject_Type;
   60167          35 :         srvsvc_NetSrvInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   60168             : 
   60169          35 :         srvsvc_NetDiskInfo0_Type.tp_base = BaseObject_Type;
   60170          35 :         srvsvc_NetDiskInfo0_Type.tp_basicsize = pytalloc_BaseObject_size();
   60171             : 
   60172          35 :         srvsvc_NetDiskInfo_Type.tp_base = BaseObject_Type;
   60173          35 :         srvsvc_NetDiskInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   60174             : 
   60175          35 :         srvsvc_Statistics_Type.tp_base = BaseObject_Type;
   60176          35 :         srvsvc_Statistics_Type.tp_basicsize = pytalloc_BaseObject_size();
   60177             : 
   60178          35 :         srvsvc_NetTransportInfo0_Type.tp_base = BaseObject_Type;
   60179          35 :         srvsvc_NetTransportInfo0_Type.tp_basicsize = pytalloc_BaseObject_size();
   60180             : 
   60181          35 :         srvsvc_NetTransportCtr0_Type.tp_base = BaseObject_Type;
   60182          35 :         srvsvc_NetTransportCtr0_Type.tp_basicsize = pytalloc_BaseObject_size();
   60183             : 
   60184          35 :         srvsvc_NetTransportInfo1_Type.tp_base = BaseObject_Type;
   60185          35 :         srvsvc_NetTransportInfo1_Type.tp_basicsize = pytalloc_BaseObject_size();
   60186             : 
   60187          35 :         srvsvc_NetTransportCtr1_Type.tp_base = BaseObject_Type;
   60188          35 :         srvsvc_NetTransportCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
   60189             : 
   60190          35 :         srvsvc_NetTransportInfo2_Type.tp_base = BaseObject_Type;
   60191          35 :         srvsvc_NetTransportInfo2_Type.tp_basicsize = pytalloc_BaseObject_size();
   60192             : 
   60193          35 :         srvsvc_NetTransportCtr2_Type.tp_base = BaseObject_Type;
   60194          35 :         srvsvc_NetTransportCtr2_Type.tp_basicsize = pytalloc_BaseObject_size();
   60195             : 
   60196          35 :         srvsvc_NetTransportInfo3_Type.tp_base = BaseObject_Type;
   60197          35 :         srvsvc_NetTransportInfo3_Type.tp_basicsize = pytalloc_BaseObject_size();
   60198             : 
   60199          35 :         srvsvc_NetTransportCtr3_Type.tp_base = BaseObject_Type;
   60200          35 :         srvsvc_NetTransportCtr3_Type.tp_basicsize = pytalloc_BaseObject_size();
   60201             : 
   60202          35 :         srvsvc_NetTransportCtr_Type.tp_base = BaseObject_Type;
   60203          35 :         srvsvc_NetTransportCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   60204             : 
   60205          35 :         srvsvc_NetTransportInfoCtr_Type.tp_base = BaseObject_Type;
   60206          35 :         srvsvc_NetTransportInfoCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   60207             : 
   60208          35 :         srvsvc_NetRemoteTODInfo_Type.tp_base = BaseObject_Type;
   60209          35 :         srvsvc_NetRemoteTODInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   60210             : 
   60211          35 :         srvsvc_NetTransportInfo_Type.tp_base = BaseObject_Type;
   60212          35 :         srvsvc_NetTransportInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   60213             : 
   60214          35 :         srvsvc_NetCharDevEnum_Type.tp_base = BaseObject_Type;
   60215          35 :         srvsvc_NetCharDevEnum_Type.tp_basicsize = pytalloc_BaseObject_size();
   60216             : 
   60217          35 :         srvsvc_NetCharDevGetInfo_Type.tp_base = BaseObject_Type;
   60218          35 :         srvsvc_NetCharDevGetInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   60219             : 
   60220          35 :         srvsvc_NetCharDevControl_Type.tp_base = BaseObject_Type;
   60221          35 :         srvsvc_NetCharDevControl_Type.tp_basicsize = pytalloc_BaseObject_size();
   60222             : 
   60223          35 :         srvsvc_NetCharDevQEnum_Type.tp_base = BaseObject_Type;
   60224          35 :         srvsvc_NetCharDevQEnum_Type.tp_basicsize = pytalloc_BaseObject_size();
   60225             : 
   60226          35 :         srvsvc_NetCharDevQGetInfo_Type.tp_base = BaseObject_Type;
   60227          35 :         srvsvc_NetCharDevQGetInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   60228             : 
   60229          35 :         srvsvc_NetCharDevQSetInfo_Type.tp_base = BaseObject_Type;
   60230          35 :         srvsvc_NetCharDevQSetInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   60231             : 
   60232          35 :         srvsvc_NetCharDevQPurge_Type.tp_base = BaseObject_Type;
   60233          35 :         srvsvc_NetCharDevQPurge_Type.tp_basicsize = pytalloc_BaseObject_size();
   60234             : 
   60235          35 :         srvsvc_NetCharDevQPurgeSelf_Type.tp_base = BaseObject_Type;
   60236          35 :         srvsvc_NetCharDevQPurgeSelf_Type.tp_basicsize = pytalloc_BaseObject_size();
   60237             : 
   60238          35 :         srvsvc_NetConnEnum_Type.tp_base = BaseObject_Type;
   60239          35 :         srvsvc_NetConnEnum_Type.tp_basicsize = pytalloc_BaseObject_size();
   60240             : 
   60241          35 :         srvsvc_NetFileEnum_Type.tp_base = BaseObject_Type;
   60242          35 :         srvsvc_NetFileEnum_Type.tp_basicsize = pytalloc_BaseObject_size();
   60243             : 
   60244          35 :         srvsvc_NetFileGetInfo_Type.tp_base = BaseObject_Type;
   60245          35 :         srvsvc_NetFileGetInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   60246             : 
   60247          35 :         srvsvc_NetFileClose_Type.tp_base = BaseObject_Type;
   60248          35 :         srvsvc_NetFileClose_Type.tp_basicsize = pytalloc_BaseObject_size();
   60249             : 
   60250          35 :         srvsvc_NetSessEnum_Type.tp_base = BaseObject_Type;
   60251          35 :         srvsvc_NetSessEnum_Type.tp_basicsize = pytalloc_BaseObject_size();
   60252             : 
   60253          35 :         srvsvc_NetSessDel_Type.tp_base = BaseObject_Type;
   60254          35 :         srvsvc_NetSessDel_Type.tp_basicsize = pytalloc_BaseObject_size();
   60255             : 
   60256          35 :         srvsvc_NetShareAdd_Type.tp_base = BaseObject_Type;
   60257          35 :         srvsvc_NetShareAdd_Type.tp_basicsize = pytalloc_BaseObject_size();
   60258             : 
   60259          35 :         srvsvc_NetShareEnumAll_Type.tp_base = BaseObject_Type;
   60260          35 :         srvsvc_NetShareEnumAll_Type.tp_basicsize = pytalloc_BaseObject_size();
   60261             : 
   60262          35 :         srvsvc_NetShareGetInfo_Type.tp_base = BaseObject_Type;
   60263          35 :         srvsvc_NetShareGetInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   60264             : 
   60265          35 :         srvsvc_NetShareSetInfo_Type.tp_base = BaseObject_Type;
   60266          35 :         srvsvc_NetShareSetInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   60267             : 
   60268          35 :         srvsvc_NetShareDel_Type.tp_base = BaseObject_Type;
   60269          35 :         srvsvc_NetShareDel_Type.tp_basicsize = pytalloc_BaseObject_size();
   60270             : 
   60271          35 :         srvsvc_NetShareDelSticky_Type.tp_base = BaseObject_Type;
   60272          35 :         srvsvc_NetShareDelSticky_Type.tp_basicsize = pytalloc_BaseObject_size();
   60273             : 
   60274          35 :         srvsvc_NetShareCheck_Type.tp_base = BaseObject_Type;
   60275          35 :         srvsvc_NetShareCheck_Type.tp_basicsize = pytalloc_BaseObject_size();
   60276             : 
   60277          35 :         srvsvc_NetSrvGetInfo_Type.tp_base = BaseObject_Type;
   60278          35 :         srvsvc_NetSrvGetInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   60279             : 
   60280          35 :         srvsvc_NetSrvSetInfo_Type.tp_base = BaseObject_Type;
   60281          35 :         srvsvc_NetSrvSetInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   60282             : 
   60283          35 :         srvsvc_NetDiskEnum_Type.tp_base = BaseObject_Type;
   60284          35 :         srvsvc_NetDiskEnum_Type.tp_basicsize = pytalloc_BaseObject_size();
   60285             : 
   60286          35 :         srvsvc_NetServerStatisticsGet_Type.tp_base = BaseObject_Type;
   60287          35 :         srvsvc_NetServerStatisticsGet_Type.tp_basicsize = pytalloc_BaseObject_size();
   60288             : 
   60289          35 :         srvsvc_NetTransportAdd_Type.tp_base = BaseObject_Type;
   60290          35 :         srvsvc_NetTransportAdd_Type.tp_basicsize = pytalloc_BaseObject_size();
   60291             : 
   60292          35 :         srvsvc_NetTransportEnum_Type.tp_base = BaseObject_Type;
   60293          35 :         srvsvc_NetTransportEnum_Type.tp_basicsize = pytalloc_BaseObject_size();
   60294             : 
   60295          35 :         srvsvc_NetTransportDel_Type.tp_base = BaseObject_Type;
   60296          35 :         srvsvc_NetTransportDel_Type.tp_basicsize = pytalloc_BaseObject_size();
   60297             : 
   60298          35 :         srvsvc_NetRemoteTOD_Type.tp_base = BaseObject_Type;
   60299          35 :         srvsvc_NetRemoteTOD_Type.tp_basicsize = pytalloc_BaseObject_size();
   60300             : 
   60301          35 :         srvsvc_NetSetServiceBits_Type.tp_base = BaseObject_Type;
   60302          35 :         srvsvc_NetSetServiceBits_Type.tp_basicsize = pytalloc_BaseObject_size();
   60303             : 
   60304          35 :         srvsvc_NetPathType_Type.tp_base = BaseObject_Type;
   60305          35 :         srvsvc_NetPathType_Type.tp_basicsize = pytalloc_BaseObject_size();
   60306             : 
   60307          35 :         srvsvc_NetPathCanonicalize_Type.tp_base = BaseObject_Type;
   60308          35 :         srvsvc_NetPathCanonicalize_Type.tp_basicsize = pytalloc_BaseObject_size();
   60309             : 
   60310          35 :         srvsvc_NetPathCompare_Type.tp_base = BaseObject_Type;
   60311          35 :         srvsvc_NetPathCompare_Type.tp_basicsize = pytalloc_BaseObject_size();
   60312             : 
   60313          35 :         srvsvc_NetNameValidate_Type.tp_base = BaseObject_Type;
   60314          35 :         srvsvc_NetNameValidate_Type.tp_basicsize = pytalloc_BaseObject_size();
   60315             : 
   60316          35 :         srvsvc_NetPRNameCompare_Type.tp_base = BaseObject_Type;
   60317          35 :         srvsvc_NetPRNameCompare_Type.tp_basicsize = pytalloc_BaseObject_size();
   60318             : 
   60319          35 :         srvsvc_NetShareEnum_Type.tp_base = BaseObject_Type;
   60320          35 :         srvsvc_NetShareEnum_Type.tp_basicsize = pytalloc_BaseObject_size();
   60321             : 
   60322          35 :         srvsvc_NetShareDelStart_Type.tp_base = BaseObject_Type;
   60323          35 :         srvsvc_NetShareDelStart_Type.tp_basicsize = pytalloc_BaseObject_size();
   60324             : 
   60325          35 :         srvsvc_NetShareDelCommit_Type.tp_base = BaseObject_Type;
   60326          35 :         srvsvc_NetShareDelCommit_Type.tp_basicsize = pytalloc_BaseObject_size();
   60327             : 
   60328          35 :         srvsvc_NetGetFileSecurity_Type.tp_base = BaseObject_Type;
   60329          35 :         srvsvc_NetGetFileSecurity_Type.tp_basicsize = pytalloc_BaseObject_size();
   60330             : 
   60331          35 :         srvsvc_NetSetFileSecurity_Type.tp_base = BaseObject_Type;
   60332          35 :         srvsvc_NetSetFileSecurity_Type.tp_basicsize = pytalloc_BaseObject_size();
   60333             : 
   60334          35 :         srvsvc_NetServerTransportAddEx_Type.tp_base = BaseObject_Type;
   60335          35 :         srvsvc_NetServerTransportAddEx_Type.tp_basicsize = pytalloc_BaseObject_size();
   60336             : 
   60337          35 :         srvsvc_NetServerSetServiceBitsEx_Type.tp_base = BaseObject_Type;
   60338          35 :         srvsvc_NetServerSetServiceBitsEx_Type.tp_basicsize = pytalloc_BaseObject_size();
   60339             : 
   60340          35 :         srvsvc_InterfaceType.tp_base = ClientConnection_Type;
   60341             : 
   60342          35 :         srvsvc_SyntaxType.tp_base = ndr_syntax_id_Type;
   60343          35 :         srvsvc_SyntaxType.tp_basicsize = pytalloc_BaseObject_size();
   60344             : 
   60345          35 :         if (PyType_Ready(&srvsvc_NetCharDevInfo0_Type) < 0)
   60346           0 :                 goto out;
   60347          35 :         if (PyType_Ready(&srvsvc_NetCharDevCtr0_Type) < 0)
   60348           0 :                 goto out;
   60349          35 :         if (PyType_Ready(&srvsvc_NetCharDevInfo1_Type) < 0)
   60350           0 :                 goto out;
   60351          35 :         if (PyType_Ready(&srvsvc_NetCharDevCtr1_Type) < 0)
   60352           0 :                 goto out;
   60353          35 :         if (PyType_Ready(&srvsvc_NetCharDevInfo_Type) < 0)
   60354           0 :                 goto out;
   60355          35 :         if (PyType_Ready(&srvsvc_NetCharDevCtr_Type) < 0)
   60356           0 :                 goto out;
   60357          35 :         if (PyType_Ready(&srvsvc_NetCharDevInfoCtr_Type) < 0)
   60358           0 :                 goto out;
   60359          35 :         if (PyType_Ready(&srvsvc_NetCharDevQInfo0_Type) < 0)
   60360           0 :                 goto out;
   60361          35 :         if (PyType_Ready(&srvsvc_NetCharDevQCtr0_Type) < 0)
   60362           0 :                 goto out;
   60363          35 :         if (PyType_Ready(&srvsvc_NetCharDevQInfo1_Type) < 0)
   60364           0 :                 goto out;
   60365          35 :         if (PyType_Ready(&srvsvc_NetCharDevQCtr1_Type) < 0)
   60366           0 :                 goto out;
   60367          35 :         if (PyType_Ready(&srvsvc_NetCharDevQInfo_Type) < 0)
   60368           0 :                 goto out;
   60369          35 :         if (PyType_Ready(&srvsvc_NetCharDevQCtr_Type) < 0)
   60370           0 :                 goto out;
   60371          35 :         if (PyType_Ready(&srvsvc_NetCharDevQInfoCtr_Type) < 0)
   60372           0 :                 goto out;
   60373          35 :         if (PyType_Ready(&srvsvc_NetConnInfo0_Type) < 0)
   60374           0 :                 goto out;
   60375          35 :         if (PyType_Ready(&srvsvc_NetConnCtr0_Type) < 0)
   60376           0 :                 goto out;
   60377          35 :         if (PyType_Ready(&srvsvc_NetConnInfo1_Type) < 0)
   60378           0 :                 goto out;
   60379          35 :         if (PyType_Ready(&srvsvc_NetConnCtr1_Type) < 0)
   60380           0 :                 goto out;
   60381          35 :         if (PyType_Ready(&srvsvc_NetConnCtr_Type) < 0)
   60382           0 :                 goto out;
   60383          35 :         if (PyType_Ready(&srvsvc_NetConnInfoCtr_Type) < 0)
   60384           0 :                 goto out;
   60385          35 :         if (PyType_Ready(&srvsvc_NetFileInfo2_Type) < 0)
   60386           0 :                 goto out;
   60387          35 :         if (PyType_Ready(&srvsvc_NetFileCtr2_Type) < 0)
   60388           0 :                 goto out;
   60389          35 :         if (PyType_Ready(&srvsvc_NetFileInfo3_Type) < 0)
   60390           0 :                 goto out;
   60391          35 :         if (PyType_Ready(&srvsvc_NetFileCtr3_Type) < 0)
   60392           0 :                 goto out;
   60393          35 :         if (PyType_Ready(&srvsvc_NetFileInfo_Type) < 0)
   60394           0 :                 goto out;
   60395          35 :         if (PyType_Ready(&srvsvc_NetFileCtr_Type) < 0)
   60396           0 :                 goto out;
   60397          35 :         if (PyType_Ready(&srvsvc_NetFileInfoCtr_Type) < 0)
   60398           0 :                 goto out;
   60399          35 :         if (PyType_Ready(&srvsvc_NetSessInfo0_Type) < 0)
   60400           0 :                 goto out;
   60401          35 :         if (PyType_Ready(&srvsvc_NetSessCtr0_Type) < 0)
   60402           0 :                 goto out;
   60403          35 :         if (PyType_Ready(&srvsvc_NetSessInfo1_Type) < 0)
   60404           0 :                 goto out;
   60405          35 :         if (PyType_Ready(&srvsvc_NetSessCtr1_Type) < 0)
   60406           0 :                 goto out;
   60407          35 :         if (PyType_Ready(&srvsvc_NetSessInfo2_Type) < 0)
   60408           0 :                 goto out;
   60409          35 :         if (PyType_Ready(&srvsvc_NetSessCtr2_Type) < 0)
   60410           0 :                 goto out;
   60411          35 :         if (PyType_Ready(&srvsvc_NetSessInfo10_Type) < 0)
   60412           0 :                 goto out;
   60413          35 :         if (PyType_Ready(&srvsvc_NetSessCtr10_Type) < 0)
   60414           0 :                 goto out;
   60415          35 :         if (PyType_Ready(&srvsvc_NetSessInfo502_Type) < 0)
   60416           0 :                 goto out;
   60417          35 :         if (PyType_Ready(&srvsvc_NetSessCtr502_Type) < 0)
   60418           0 :                 goto out;
   60419          35 :         if (PyType_Ready(&srvsvc_NetSessCtr_Type) < 0)
   60420           0 :                 goto out;
   60421          35 :         if (PyType_Ready(&srvsvc_NetSessInfoCtr_Type) < 0)
   60422           0 :                 goto out;
   60423          35 :         if (PyType_Ready(&srvsvc_NetShareInfo0_Type) < 0)
   60424           0 :                 goto out;
   60425          35 :         if (PyType_Ready(&srvsvc_NetShareCtr0_Type) < 0)
   60426           0 :                 goto out;
   60427          35 :         if (PyType_Ready(&srvsvc_NetShareInfo1_Type) < 0)
   60428           0 :                 goto out;
   60429          35 :         if (PyType_Ready(&srvsvc_NetShareCtr1_Type) < 0)
   60430           0 :                 goto out;
   60431          35 :         if (PyType_Ready(&srvsvc_NetShareInfo2_Type) < 0)
   60432           0 :                 goto out;
   60433          35 :         if (PyType_Ready(&srvsvc_NetShareCtr2_Type) < 0)
   60434           0 :                 goto out;
   60435          35 :         if (PyType_Ready(&srvsvc_NetShareInfo501_Type) < 0)
   60436           0 :                 goto out;
   60437          35 :         if (PyType_Ready(&srvsvc_NetShareCtr501_Type) < 0)
   60438           0 :                 goto out;
   60439          35 :         if (PyType_Ready(&srvsvc_NetShareInfo502_Type) < 0)
   60440           0 :                 goto out;
   60441          35 :         if (PyType_Ready(&srvsvc_NetShareCtr502_Type) < 0)
   60442           0 :                 goto out;
   60443          35 :         if (PyType_Ready(&srvsvc_NetShareInfo1004_Type) < 0)
   60444           0 :                 goto out;
   60445          35 :         if (PyType_Ready(&srvsvc_NetShareCtr1004_Type) < 0)
   60446           0 :                 goto out;
   60447          35 :         if (PyType_Ready(&srvsvc_NetShareInfo1005_Type) < 0)
   60448           0 :                 goto out;
   60449          35 :         if (PyType_Ready(&srvsvc_NetShareCtr1005_Type) < 0)
   60450           0 :                 goto out;
   60451          35 :         if (PyType_Ready(&srvsvc_NetShareInfo1006_Type) < 0)
   60452           0 :                 goto out;
   60453          35 :         if (PyType_Ready(&srvsvc_NetShareCtr1006_Type) < 0)
   60454           0 :                 goto out;
   60455          35 :         if (PyType_Ready(&srvsvc_NetShareInfo1007_Type) < 0)
   60456           0 :                 goto out;
   60457          35 :         if (PyType_Ready(&srvsvc_NetShareCtr1007_Type) < 0)
   60458           0 :                 goto out;
   60459          35 :         if (PyType_Ready(&srvsvc_NetShareCtr1501_Type) < 0)
   60460           0 :                 goto out;
   60461          35 :         if (PyType_Ready(&srvsvc_NetShareInfo_Type) < 0)
   60462           0 :                 goto out;
   60463          35 :         if (PyType_Ready(&srvsvc_NetShareCtr_Type) < 0)
   60464           0 :                 goto out;
   60465          35 :         if (PyType_Ready(&srvsvc_NetShareInfoCtr_Type) < 0)
   60466           0 :                 goto out;
   60467          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo100_Type) < 0)
   60468           0 :                 goto out;
   60469          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo101_Type) < 0)
   60470           0 :                 goto out;
   60471          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo102_Type) < 0)
   60472           0 :                 goto out;
   60473          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo402_Type) < 0)
   60474           0 :                 goto out;
   60475          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo403_Type) < 0)
   60476           0 :                 goto out;
   60477          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo502_Type) < 0)
   60478           0 :                 goto out;
   60479          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo503_Type) < 0)
   60480           0 :                 goto out;
   60481          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo599_Type) < 0)
   60482           0 :                 goto out;
   60483          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1005_Type) < 0)
   60484           0 :                 goto out;
   60485          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1010_Type) < 0)
   60486           0 :                 goto out;
   60487          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1016_Type) < 0)
   60488           0 :                 goto out;
   60489          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1017_Type) < 0)
   60490           0 :                 goto out;
   60491          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1018_Type) < 0)
   60492           0 :                 goto out;
   60493          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1107_Type) < 0)
   60494           0 :                 goto out;
   60495          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1501_Type) < 0)
   60496           0 :                 goto out;
   60497          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1502_Type) < 0)
   60498           0 :                 goto out;
   60499          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1503_Type) < 0)
   60500           0 :                 goto out;
   60501          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1506_Type) < 0)
   60502           0 :                 goto out;
   60503          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1509_Type) < 0)
   60504           0 :                 goto out;
   60505          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1510_Type) < 0)
   60506           0 :                 goto out;
   60507          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1511_Type) < 0)
   60508           0 :                 goto out;
   60509          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1512_Type) < 0)
   60510           0 :                 goto out;
   60511          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1513_Type) < 0)
   60512           0 :                 goto out;
   60513          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1514_Type) < 0)
   60514           0 :                 goto out;
   60515          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1515_Type) < 0)
   60516           0 :                 goto out;
   60517          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1516_Type) < 0)
   60518           0 :                 goto out;
   60519          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1518_Type) < 0)
   60520           0 :                 goto out;
   60521          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1520_Type) < 0)
   60522           0 :                 goto out;
   60523          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1521_Type) < 0)
   60524           0 :                 goto out;
   60525          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1522_Type) < 0)
   60526           0 :                 goto out;
   60527          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1523_Type) < 0)
   60528           0 :                 goto out;
   60529          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1524_Type) < 0)
   60530           0 :                 goto out;
   60531          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1525_Type) < 0)
   60532           0 :                 goto out;
   60533          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1528_Type) < 0)
   60534           0 :                 goto out;
   60535          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1529_Type) < 0)
   60536           0 :                 goto out;
   60537          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1530_Type) < 0)
   60538           0 :                 goto out;
   60539          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1533_Type) < 0)
   60540           0 :                 goto out;
   60541          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1534_Type) < 0)
   60542           0 :                 goto out;
   60543          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1535_Type) < 0)
   60544           0 :                 goto out;
   60545          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1536_Type) < 0)
   60546           0 :                 goto out;
   60547          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1537_Type) < 0)
   60548           0 :                 goto out;
   60549          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1538_Type) < 0)
   60550           0 :                 goto out;
   60551          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1539_Type) < 0)
   60552           0 :                 goto out;
   60553          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1540_Type) < 0)
   60554           0 :                 goto out;
   60555          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1541_Type) < 0)
   60556           0 :                 goto out;
   60557          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1542_Type) < 0)
   60558           0 :                 goto out;
   60559          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1543_Type) < 0)
   60560           0 :                 goto out;
   60561          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1544_Type) < 0)
   60562           0 :                 goto out;
   60563          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1545_Type) < 0)
   60564           0 :                 goto out;
   60565          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1546_Type) < 0)
   60566           0 :                 goto out;
   60567          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1547_Type) < 0)
   60568           0 :                 goto out;
   60569          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1548_Type) < 0)
   60570           0 :                 goto out;
   60571          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1549_Type) < 0)
   60572           0 :                 goto out;
   60573          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1550_Type) < 0)
   60574           0 :                 goto out;
   60575          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1552_Type) < 0)
   60576           0 :                 goto out;
   60577          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1553_Type) < 0)
   60578           0 :                 goto out;
   60579          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1554_Type) < 0)
   60580           0 :                 goto out;
   60581          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1555_Type) < 0)
   60582           0 :                 goto out;
   60583          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo1556_Type) < 0)
   60584           0 :                 goto out;
   60585          35 :         if (PyType_Ready(&srvsvc_NetSrvInfo_Type) < 0)
   60586           0 :                 goto out;
   60587          35 :         if (PyType_Ready(&srvsvc_NetDiskInfo0_Type) < 0)
   60588           0 :                 goto out;
   60589          35 :         if (PyType_Ready(&srvsvc_NetDiskInfo_Type) < 0)
   60590           0 :                 goto out;
   60591          35 :         if (PyType_Ready(&srvsvc_Statistics_Type) < 0)
   60592           0 :                 goto out;
   60593          35 :         if (PyType_Ready(&srvsvc_NetTransportInfo0_Type) < 0)
   60594           0 :                 goto out;
   60595          35 :         if (PyType_Ready(&srvsvc_NetTransportCtr0_Type) < 0)
   60596           0 :                 goto out;
   60597          35 :         if (PyType_Ready(&srvsvc_NetTransportInfo1_Type) < 0)
   60598           0 :                 goto out;
   60599          35 :         if (PyType_Ready(&srvsvc_NetTransportCtr1_Type) < 0)
   60600           0 :                 goto out;
   60601          35 :         if (PyType_Ready(&srvsvc_NetTransportInfo2_Type) < 0)
   60602           0 :                 goto out;
   60603          35 :         if (PyType_Ready(&srvsvc_NetTransportCtr2_Type) < 0)
   60604           0 :                 goto out;
   60605          35 :         if (PyType_Ready(&srvsvc_NetTransportInfo3_Type) < 0)
   60606           0 :                 goto out;
   60607          35 :         if (PyType_Ready(&srvsvc_NetTransportCtr3_Type) < 0)
   60608           0 :                 goto out;
   60609          35 :         if (PyType_Ready(&srvsvc_NetTransportCtr_Type) < 0)
   60610           0 :                 goto out;
   60611          35 :         if (PyType_Ready(&srvsvc_NetTransportInfoCtr_Type) < 0)
   60612           0 :                 goto out;
   60613          35 :         if (PyType_Ready(&srvsvc_NetRemoteTODInfo_Type) < 0)
   60614           0 :                 goto out;
   60615          35 :         if (PyType_Ready(&srvsvc_NetTransportInfo_Type) < 0)
   60616           0 :                 goto out;
   60617          35 :         if (PyType_Ready(&srvsvc_NetCharDevEnum_Type) < 0)
   60618           0 :                 goto out;
   60619          35 :         if (PyType_Ready(&srvsvc_NetCharDevGetInfo_Type) < 0)
   60620           0 :                 goto out;
   60621          35 :         if (PyType_Ready(&srvsvc_NetCharDevControl_Type) < 0)
   60622           0 :                 goto out;
   60623          35 :         if (PyType_Ready(&srvsvc_NetCharDevQEnum_Type) < 0)
   60624           0 :                 goto out;
   60625          35 :         if (PyType_Ready(&srvsvc_NetCharDevQGetInfo_Type) < 0)
   60626           0 :                 goto out;
   60627          35 :         if (PyType_Ready(&srvsvc_NetCharDevQSetInfo_Type) < 0)
   60628           0 :                 goto out;
   60629          35 :         if (PyType_Ready(&srvsvc_NetCharDevQPurge_Type) < 0)
   60630           0 :                 goto out;
   60631          35 :         if (PyType_Ready(&srvsvc_NetCharDevQPurgeSelf_Type) < 0)
   60632           0 :                 goto out;
   60633          35 :         if (PyType_Ready(&srvsvc_NetConnEnum_Type) < 0)
   60634           0 :                 goto out;
   60635          35 :         if (PyType_Ready(&srvsvc_NetFileEnum_Type) < 0)
   60636           0 :                 goto out;
   60637          35 :         if (PyType_Ready(&srvsvc_NetFileGetInfo_Type) < 0)
   60638           0 :                 goto out;
   60639          35 :         if (PyType_Ready(&srvsvc_NetFileClose_Type) < 0)
   60640           0 :                 goto out;
   60641          35 :         if (PyType_Ready(&srvsvc_NetSessEnum_Type) < 0)
   60642           0 :                 goto out;
   60643          35 :         if (PyType_Ready(&srvsvc_NetSessDel_Type) < 0)
   60644           0 :                 goto out;
   60645          35 :         if (PyType_Ready(&srvsvc_NetShareAdd_Type) < 0)
   60646           0 :                 goto out;
   60647          35 :         if (PyType_Ready(&srvsvc_NetShareEnumAll_Type) < 0)
   60648           0 :                 goto out;
   60649          35 :         if (PyType_Ready(&srvsvc_NetShareGetInfo_Type) < 0)
   60650           0 :                 goto out;
   60651          35 :         if (PyType_Ready(&srvsvc_NetShareSetInfo_Type) < 0)
   60652           0 :                 goto out;
   60653          35 :         if (PyType_Ready(&srvsvc_NetShareDel_Type) < 0)
   60654           0 :                 goto out;
   60655          35 :         if (PyType_Ready(&srvsvc_NetShareDelSticky_Type) < 0)
   60656           0 :                 goto out;
   60657          35 :         if (PyType_Ready(&srvsvc_NetShareCheck_Type) < 0)
   60658           0 :                 goto out;
   60659          35 :         if (PyType_Ready(&srvsvc_NetSrvGetInfo_Type) < 0)
   60660           0 :                 goto out;
   60661          35 :         if (PyType_Ready(&srvsvc_NetSrvSetInfo_Type) < 0)
   60662           0 :                 goto out;
   60663          35 :         if (PyType_Ready(&srvsvc_NetDiskEnum_Type) < 0)
   60664           0 :                 goto out;
   60665          35 :         if (PyType_Ready(&srvsvc_NetServerStatisticsGet_Type) < 0)
   60666           0 :                 goto out;
   60667          35 :         if (PyType_Ready(&srvsvc_NetTransportAdd_Type) < 0)
   60668           0 :                 goto out;
   60669          35 :         if (PyType_Ready(&srvsvc_NetTransportEnum_Type) < 0)
   60670           0 :                 goto out;
   60671          35 :         if (PyType_Ready(&srvsvc_NetTransportDel_Type) < 0)
   60672           0 :                 goto out;
   60673          35 :         if (PyType_Ready(&srvsvc_NetRemoteTOD_Type) < 0)
   60674           0 :                 goto out;
   60675          35 :         if (PyType_Ready(&srvsvc_NetSetServiceBits_Type) < 0)
   60676           0 :                 goto out;
   60677          35 :         if (PyType_Ready(&srvsvc_NetPathType_Type) < 0)
   60678           0 :                 goto out;
   60679          35 :         if (PyType_Ready(&srvsvc_NetPathCanonicalize_Type) < 0)
   60680           0 :                 goto out;
   60681          35 :         if (PyType_Ready(&srvsvc_NetPathCompare_Type) < 0)
   60682           0 :                 goto out;
   60683          35 :         if (PyType_Ready(&srvsvc_NetNameValidate_Type) < 0)
   60684           0 :                 goto out;
   60685          35 :         if (PyType_Ready(&srvsvc_NetPRNameCompare_Type) < 0)
   60686           0 :                 goto out;
   60687          35 :         if (PyType_Ready(&srvsvc_NetShareEnum_Type) < 0)
   60688           0 :                 goto out;
   60689          35 :         if (PyType_Ready(&srvsvc_NetShareDelStart_Type) < 0)
   60690           0 :                 goto out;
   60691          35 :         if (PyType_Ready(&srvsvc_NetShareDelCommit_Type) < 0)
   60692           0 :                 goto out;
   60693          35 :         if (PyType_Ready(&srvsvc_NetGetFileSecurity_Type) < 0)
   60694           0 :                 goto out;
   60695          35 :         if (PyType_Ready(&srvsvc_NetSetFileSecurity_Type) < 0)
   60696           0 :                 goto out;
   60697          35 :         if (PyType_Ready(&srvsvc_NetServerTransportAddEx_Type) < 0)
   60698           0 :                 goto out;
   60699          35 :         if (PyType_Ready(&srvsvc_NetServerSetServiceBitsEx_Type) < 0)
   60700           0 :                 goto out;
   60701          35 :         if (PyType_Ready(&srvsvc_InterfaceType) < 0)
   60702           0 :                 goto out;
   60703          35 :         if (PyType_Ready(&srvsvc_SyntaxType) < 0)
   60704           0 :                 goto out;
   60705          35 :         if (!PyInterface_AddNdrRpcMethods(&srvsvc_InterfaceType, py_ndr_srvsvc_methods))
   60706           0 :                 return NULL;
   60707             : 
   60708             : #ifdef PY_NETCHARDEVINFO0_PATCH
   60709             :         PY_NETCHARDEVINFO0_PATCH(&srvsvc_NetCharDevInfo0_Type);
   60710             : #endif
   60711             : #ifdef PY_NETCHARDEVCTR0_PATCH
   60712             :         PY_NETCHARDEVCTR0_PATCH(&srvsvc_NetCharDevCtr0_Type);
   60713             : #endif
   60714             : #ifdef PY_NETCHARDEVINFO1_PATCH
   60715             :         PY_NETCHARDEVINFO1_PATCH(&srvsvc_NetCharDevInfo1_Type);
   60716             : #endif
   60717             : #ifdef PY_NETCHARDEVCTR1_PATCH
   60718             :         PY_NETCHARDEVCTR1_PATCH(&srvsvc_NetCharDevCtr1_Type);
   60719             : #endif
   60720             : #ifdef PY_NETCHARDEVINFO_PATCH
   60721             :         PY_NETCHARDEVINFO_PATCH(&srvsvc_NetCharDevInfo_Type);
   60722             : #endif
   60723             : #ifdef PY_NETCHARDEVCTR_PATCH
   60724             :         PY_NETCHARDEVCTR_PATCH(&srvsvc_NetCharDevCtr_Type);
   60725             : #endif
   60726             : #ifdef PY_NETCHARDEVINFOCTR_PATCH
   60727             :         PY_NETCHARDEVINFOCTR_PATCH(&srvsvc_NetCharDevInfoCtr_Type);
   60728             : #endif
   60729             : #ifdef PY_NETCHARDEVQINFO0_PATCH
   60730             :         PY_NETCHARDEVQINFO0_PATCH(&srvsvc_NetCharDevQInfo0_Type);
   60731             : #endif
   60732             : #ifdef PY_NETCHARDEVQCTR0_PATCH
   60733             :         PY_NETCHARDEVQCTR0_PATCH(&srvsvc_NetCharDevQCtr0_Type);
   60734             : #endif
   60735             : #ifdef PY_NETCHARDEVQINFO1_PATCH
   60736             :         PY_NETCHARDEVQINFO1_PATCH(&srvsvc_NetCharDevQInfo1_Type);
   60737             : #endif
   60738             : #ifdef PY_NETCHARDEVQCTR1_PATCH
   60739             :         PY_NETCHARDEVQCTR1_PATCH(&srvsvc_NetCharDevQCtr1_Type);
   60740             : #endif
   60741             : #ifdef PY_NETCHARDEVQINFO_PATCH
   60742             :         PY_NETCHARDEVQINFO_PATCH(&srvsvc_NetCharDevQInfo_Type);
   60743             : #endif
   60744             : #ifdef PY_NETCHARDEVQCTR_PATCH
   60745             :         PY_NETCHARDEVQCTR_PATCH(&srvsvc_NetCharDevQCtr_Type);
   60746             : #endif
   60747             : #ifdef PY_NETCHARDEVQINFOCTR_PATCH
   60748             :         PY_NETCHARDEVQINFOCTR_PATCH(&srvsvc_NetCharDevQInfoCtr_Type);
   60749             : #endif
   60750             : #ifdef PY_NETCONNINFO0_PATCH
   60751             :         PY_NETCONNINFO0_PATCH(&srvsvc_NetConnInfo0_Type);
   60752             : #endif
   60753             : #ifdef PY_NETCONNCTR0_PATCH
   60754             :         PY_NETCONNCTR0_PATCH(&srvsvc_NetConnCtr0_Type);
   60755             : #endif
   60756             : #ifdef PY_NETCONNINFO1_PATCH
   60757             :         PY_NETCONNINFO1_PATCH(&srvsvc_NetConnInfo1_Type);
   60758             : #endif
   60759             : #ifdef PY_NETCONNCTR1_PATCH
   60760             :         PY_NETCONNCTR1_PATCH(&srvsvc_NetConnCtr1_Type);
   60761             : #endif
   60762             : #ifdef PY_NETCONNCTR_PATCH
   60763             :         PY_NETCONNCTR_PATCH(&srvsvc_NetConnCtr_Type);
   60764             : #endif
   60765             : #ifdef PY_NETCONNINFOCTR_PATCH
   60766             :         PY_NETCONNINFOCTR_PATCH(&srvsvc_NetConnInfoCtr_Type);
   60767             : #endif
   60768             : #ifdef PY_NETFILEINFO2_PATCH
   60769             :         PY_NETFILEINFO2_PATCH(&srvsvc_NetFileInfo2_Type);
   60770             : #endif
   60771             : #ifdef PY_NETFILECTR2_PATCH
   60772             :         PY_NETFILECTR2_PATCH(&srvsvc_NetFileCtr2_Type);
   60773             : #endif
   60774             : #ifdef PY_NETFILEINFO3_PATCH
   60775             :         PY_NETFILEINFO3_PATCH(&srvsvc_NetFileInfo3_Type);
   60776             : #endif
   60777             : #ifdef PY_NETFILECTR3_PATCH
   60778             :         PY_NETFILECTR3_PATCH(&srvsvc_NetFileCtr3_Type);
   60779             : #endif
   60780             : #ifdef PY_NETFILEINFO_PATCH
   60781             :         PY_NETFILEINFO_PATCH(&srvsvc_NetFileInfo_Type);
   60782             : #endif
   60783             : #ifdef PY_NETFILECTR_PATCH
   60784             :         PY_NETFILECTR_PATCH(&srvsvc_NetFileCtr_Type);
   60785             : #endif
   60786             : #ifdef PY_NETFILEINFOCTR_PATCH
   60787             :         PY_NETFILEINFOCTR_PATCH(&srvsvc_NetFileInfoCtr_Type);
   60788             : #endif
   60789             : #ifdef PY_NETSESSINFO0_PATCH
   60790             :         PY_NETSESSINFO0_PATCH(&srvsvc_NetSessInfo0_Type);
   60791             : #endif
   60792             : #ifdef PY_NETSESSCTR0_PATCH
   60793             :         PY_NETSESSCTR0_PATCH(&srvsvc_NetSessCtr0_Type);
   60794             : #endif
   60795             : #ifdef PY_NETSESSINFO1_PATCH
   60796             :         PY_NETSESSINFO1_PATCH(&srvsvc_NetSessInfo1_Type);
   60797             : #endif
   60798             : #ifdef PY_NETSESSCTR1_PATCH
   60799             :         PY_NETSESSCTR1_PATCH(&srvsvc_NetSessCtr1_Type);
   60800             : #endif
   60801             : #ifdef PY_NETSESSINFO2_PATCH
   60802             :         PY_NETSESSINFO2_PATCH(&srvsvc_NetSessInfo2_Type);
   60803             : #endif
   60804             : #ifdef PY_NETSESSCTR2_PATCH
   60805             :         PY_NETSESSCTR2_PATCH(&srvsvc_NetSessCtr2_Type);
   60806             : #endif
   60807             : #ifdef PY_NETSESSINFO10_PATCH
   60808             :         PY_NETSESSINFO10_PATCH(&srvsvc_NetSessInfo10_Type);
   60809             : #endif
   60810             : #ifdef PY_NETSESSCTR10_PATCH
   60811             :         PY_NETSESSCTR10_PATCH(&srvsvc_NetSessCtr10_Type);
   60812             : #endif
   60813             : #ifdef PY_NETSESSINFO502_PATCH
   60814             :         PY_NETSESSINFO502_PATCH(&srvsvc_NetSessInfo502_Type);
   60815             : #endif
   60816             : #ifdef PY_NETSESSCTR502_PATCH
   60817             :         PY_NETSESSCTR502_PATCH(&srvsvc_NetSessCtr502_Type);
   60818             : #endif
   60819             : #ifdef PY_NETSESSCTR_PATCH
   60820             :         PY_NETSESSCTR_PATCH(&srvsvc_NetSessCtr_Type);
   60821             : #endif
   60822             : #ifdef PY_NETSESSINFOCTR_PATCH
   60823             :         PY_NETSESSINFOCTR_PATCH(&srvsvc_NetSessInfoCtr_Type);
   60824             : #endif
   60825             : #ifdef PY_NETSHAREINFO0_PATCH
   60826             :         PY_NETSHAREINFO0_PATCH(&srvsvc_NetShareInfo0_Type);
   60827             : #endif
   60828             : #ifdef PY_NETSHARECTR0_PATCH
   60829             :         PY_NETSHARECTR0_PATCH(&srvsvc_NetShareCtr0_Type);
   60830             : #endif
   60831             : #ifdef PY_NETSHAREINFO1_PATCH
   60832             :         PY_NETSHAREINFO1_PATCH(&srvsvc_NetShareInfo1_Type);
   60833             : #endif
   60834             : #ifdef PY_NETSHARECTR1_PATCH
   60835             :         PY_NETSHARECTR1_PATCH(&srvsvc_NetShareCtr1_Type);
   60836             : #endif
   60837             : #ifdef PY_NETSHAREINFO2_PATCH
   60838             :         PY_NETSHAREINFO2_PATCH(&srvsvc_NetShareInfo2_Type);
   60839             : #endif
   60840             : #ifdef PY_NETSHARECTR2_PATCH
   60841             :         PY_NETSHARECTR2_PATCH(&srvsvc_NetShareCtr2_Type);
   60842             : #endif
   60843             : #ifdef PY_NETSHAREINFO501_PATCH
   60844             :         PY_NETSHAREINFO501_PATCH(&srvsvc_NetShareInfo501_Type);
   60845             : #endif
   60846             : #ifdef PY_NETSHARECTR501_PATCH
   60847             :         PY_NETSHARECTR501_PATCH(&srvsvc_NetShareCtr501_Type);
   60848             : #endif
   60849             : #ifdef PY_NETSHAREINFO502_PATCH
   60850             :         PY_NETSHAREINFO502_PATCH(&srvsvc_NetShareInfo502_Type);
   60851             : #endif
   60852             : #ifdef PY_NETSHARECTR502_PATCH
   60853             :         PY_NETSHARECTR502_PATCH(&srvsvc_NetShareCtr502_Type);
   60854             : #endif
   60855             : #ifdef PY_NETSHAREINFO1004_PATCH
   60856             :         PY_NETSHAREINFO1004_PATCH(&srvsvc_NetShareInfo1004_Type);
   60857             : #endif
   60858             : #ifdef PY_NETSHARECTR1004_PATCH
   60859             :         PY_NETSHARECTR1004_PATCH(&srvsvc_NetShareCtr1004_Type);
   60860             : #endif
   60861             : #ifdef PY_NETSHAREINFO1005_PATCH
   60862             :         PY_NETSHAREINFO1005_PATCH(&srvsvc_NetShareInfo1005_Type);
   60863             : #endif
   60864             : #ifdef PY_NETSHARECTR1005_PATCH
   60865             :         PY_NETSHARECTR1005_PATCH(&srvsvc_NetShareCtr1005_Type);
   60866             : #endif
   60867             : #ifdef PY_NETSHAREINFO1006_PATCH
   60868             :         PY_NETSHAREINFO1006_PATCH(&srvsvc_NetShareInfo1006_Type);
   60869             : #endif
   60870             : #ifdef PY_NETSHARECTR1006_PATCH
   60871             :         PY_NETSHARECTR1006_PATCH(&srvsvc_NetShareCtr1006_Type);
   60872             : #endif
   60873             : #ifdef PY_NETSHAREINFO1007_PATCH
   60874             :         PY_NETSHAREINFO1007_PATCH(&srvsvc_NetShareInfo1007_Type);
   60875             : #endif
   60876             : #ifdef PY_NETSHARECTR1007_PATCH
   60877             :         PY_NETSHARECTR1007_PATCH(&srvsvc_NetShareCtr1007_Type);
   60878             : #endif
   60879             : #ifdef PY_NETSHARECTR1501_PATCH
   60880             :         PY_NETSHARECTR1501_PATCH(&srvsvc_NetShareCtr1501_Type);
   60881             : #endif
   60882             : #ifdef PY_NETSHAREINFO_PATCH
   60883             :         PY_NETSHAREINFO_PATCH(&srvsvc_NetShareInfo_Type);
   60884             : #endif
   60885             : #ifdef PY_NETSHARECTR_PATCH
   60886             :         PY_NETSHARECTR_PATCH(&srvsvc_NetShareCtr_Type);
   60887             : #endif
   60888             : #ifdef PY_NETSHAREINFOCTR_PATCH
   60889             :         PY_NETSHAREINFOCTR_PATCH(&srvsvc_NetShareInfoCtr_Type);
   60890             : #endif
   60891             : #ifdef PY_NETSRVINFO100_PATCH
   60892             :         PY_NETSRVINFO100_PATCH(&srvsvc_NetSrvInfo100_Type);
   60893             : #endif
   60894             : #ifdef PY_NETSRVINFO101_PATCH
   60895             :         PY_NETSRVINFO101_PATCH(&srvsvc_NetSrvInfo101_Type);
   60896             : #endif
   60897             : #ifdef PY_NETSRVINFO102_PATCH
   60898             :         PY_NETSRVINFO102_PATCH(&srvsvc_NetSrvInfo102_Type);
   60899             : #endif
   60900             : #ifdef PY_NETSRVINFO402_PATCH
   60901             :         PY_NETSRVINFO402_PATCH(&srvsvc_NetSrvInfo402_Type);
   60902             : #endif
   60903             : #ifdef PY_NETSRVINFO403_PATCH
   60904             :         PY_NETSRVINFO403_PATCH(&srvsvc_NetSrvInfo403_Type);
   60905             : #endif
   60906             : #ifdef PY_NETSRVINFO502_PATCH
   60907             :         PY_NETSRVINFO502_PATCH(&srvsvc_NetSrvInfo502_Type);
   60908             : #endif
   60909             : #ifdef PY_NETSRVINFO503_PATCH
   60910             :         PY_NETSRVINFO503_PATCH(&srvsvc_NetSrvInfo503_Type);
   60911             : #endif
   60912             : #ifdef PY_NETSRVINFO599_PATCH
   60913             :         PY_NETSRVINFO599_PATCH(&srvsvc_NetSrvInfo599_Type);
   60914             : #endif
   60915             : #ifdef PY_NETSRVINFO1005_PATCH
   60916             :         PY_NETSRVINFO1005_PATCH(&srvsvc_NetSrvInfo1005_Type);
   60917             : #endif
   60918             : #ifdef PY_NETSRVINFO1010_PATCH
   60919             :         PY_NETSRVINFO1010_PATCH(&srvsvc_NetSrvInfo1010_Type);
   60920             : #endif
   60921             : #ifdef PY_NETSRVINFO1016_PATCH
   60922             :         PY_NETSRVINFO1016_PATCH(&srvsvc_NetSrvInfo1016_Type);
   60923             : #endif
   60924             : #ifdef PY_NETSRVINFO1017_PATCH
   60925             :         PY_NETSRVINFO1017_PATCH(&srvsvc_NetSrvInfo1017_Type);
   60926             : #endif
   60927             : #ifdef PY_NETSRVINFO1018_PATCH
   60928             :         PY_NETSRVINFO1018_PATCH(&srvsvc_NetSrvInfo1018_Type);
   60929             : #endif
   60930             : #ifdef PY_NETSRVINFO1107_PATCH
   60931             :         PY_NETSRVINFO1107_PATCH(&srvsvc_NetSrvInfo1107_Type);
   60932             : #endif
   60933             : #ifdef PY_NETSRVINFO1501_PATCH
   60934             :         PY_NETSRVINFO1501_PATCH(&srvsvc_NetSrvInfo1501_Type);
   60935             : #endif
   60936             : #ifdef PY_NETSRVINFO1502_PATCH
   60937             :         PY_NETSRVINFO1502_PATCH(&srvsvc_NetSrvInfo1502_Type);
   60938             : #endif
   60939             : #ifdef PY_NETSRVINFO1503_PATCH
   60940             :         PY_NETSRVINFO1503_PATCH(&srvsvc_NetSrvInfo1503_Type);
   60941             : #endif
   60942             : #ifdef PY_NETSRVINFO1506_PATCH
   60943             :         PY_NETSRVINFO1506_PATCH(&srvsvc_NetSrvInfo1506_Type);
   60944             : #endif
   60945             : #ifdef PY_NETSRVINFO1509_PATCH
   60946             :         PY_NETSRVINFO1509_PATCH(&srvsvc_NetSrvInfo1509_Type);
   60947             : #endif
   60948             : #ifdef PY_NETSRVINFO1510_PATCH
   60949             :         PY_NETSRVINFO1510_PATCH(&srvsvc_NetSrvInfo1510_Type);
   60950             : #endif
   60951             : #ifdef PY_NETSRVINFO1511_PATCH
   60952             :         PY_NETSRVINFO1511_PATCH(&srvsvc_NetSrvInfo1511_Type);
   60953             : #endif
   60954             : #ifdef PY_NETSRVINFO1512_PATCH
   60955             :         PY_NETSRVINFO1512_PATCH(&srvsvc_NetSrvInfo1512_Type);
   60956             : #endif
   60957             : #ifdef PY_NETSRVINFO1513_PATCH
   60958             :         PY_NETSRVINFO1513_PATCH(&srvsvc_NetSrvInfo1513_Type);
   60959             : #endif
   60960             : #ifdef PY_NETSRVINFO1514_PATCH
   60961             :         PY_NETSRVINFO1514_PATCH(&srvsvc_NetSrvInfo1514_Type);
   60962             : #endif
   60963             : #ifdef PY_NETSRVINFO1515_PATCH
   60964             :         PY_NETSRVINFO1515_PATCH(&srvsvc_NetSrvInfo1515_Type);
   60965             : #endif
   60966             : #ifdef PY_NETSRVINFO1516_PATCH
   60967             :         PY_NETSRVINFO1516_PATCH(&srvsvc_NetSrvInfo1516_Type);
   60968             : #endif
   60969             : #ifdef PY_NETSRVINFO1518_PATCH
   60970             :         PY_NETSRVINFO1518_PATCH(&srvsvc_NetSrvInfo1518_Type);
   60971             : #endif
   60972             : #ifdef PY_NETSRVINFO1520_PATCH
   60973             :         PY_NETSRVINFO1520_PATCH(&srvsvc_NetSrvInfo1520_Type);
   60974             : #endif
   60975             : #ifdef PY_NETSRVINFO1521_PATCH
   60976             :         PY_NETSRVINFO1521_PATCH(&srvsvc_NetSrvInfo1521_Type);
   60977             : #endif
   60978             : #ifdef PY_NETSRVINFO1522_PATCH
   60979             :         PY_NETSRVINFO1522_PATCH(&srvsvc_NetSrvInfo1522_Type);
   60980             : #endif
   60981             : #ifdef PY_NETSRVINFO1523_PATCH
   60982             :         PY_NETSRVINFO1523_PATCH(&srvsvc_NetSrvInfo1523_Type);
   60983             : #endif
   60984             : #ifdef PY_NETSRVINFO1524_PATCH
   60985             :         PY_NETSRVINFO1524_PATCH(&srvsvc_NetSrvInfo1524_Type);
   60986             : #endif
   60987             : #ifdef PY_NETSRVINFO1525_PATCH
   60988             :         PY_NETSRVINFO1525_PATCH(&srvsvc_NetSrvInfo1525_Type);
   60989             : #endif
   60990             : #ifdef PY_NETSRVINFO1528_PATCH
   60991             :         PY_NETSRVINFO1528_PATCH(&srvsvc_NetSrvInfo1528_Type);
   60992             : #endif
   60993             : #ifdef PY_NETSRVINFO1529_PATCH
   60994             :         PY_NETSRVINFO1529_PATCH(&srvsvc_NetSrvInfo1529_Type);
   60995             : #endif
   60996             : #ifdef PY_NETSRVINFO1530_PATCH
   60997             :         PY_NETSRVINFO1530_PATCH(&srvsvc_NetSrvInfo1530_Type);
   60998             : #endif
   60999             : #ifdef PY_NETSRVINFO1533_PATCH
   61000             :         PY_NETSRVINFO1533_PATCH(&srvsvc_NetSrvInfo1533_Type);
   61001             : #endif
   61002             : #ifdef PY_NETSRVINFO1534_PATCH
   61003             :         PY_NETSRVINFO1534_PATCH(&srvsvc_NetSrvInfo1534_Type);
   61004             : #endif
   61005             : #ifdef PY_NETSRVINFO1535_PATCH
   61006             :         PY_NETSRVINFO1535_PATCH(&srvsvc_NetSrvInfo1535_Type);
   61007             : #endif
   61008             : #ifdef PY_NETSRVINFO1536_PATCH
   61009             :         PY_NETSRVINFO1536_PATCH(&srvsvc_NetSrvInfo1536_Type);
   61010             : #endif
   61011             : #ifdef PY_NETSRVINFO1537_PATCH
   61012             :         PY_NETSRVINFO1537_PATCH(&srvsvc_NetSrvInfo1537_Type);
   61013             : #endif
   61014             : #ifdef PY_NETSRVINFO1538_PATCH
   61015             :         PY_NETSRVINFO1538_PATCH(&srvsvc_NetSrvInfo1538_Type);
   61016             : #endif
   61017             : #ifdef PY_NETSRVINFO1539_PATCH
   61018             :         PY_NETSRVINFO1539_PATCH(&srvsvc_NetSrvInfo1539_Type);
   61019             : #endif
   61020             : #ifdef PY_NETSRVINFO1540_PATCH
   61021             :         PY_NETSRVINFO1540_PATCH(&srvsvc_NetSrvInfo1540_Type);
   61022             : #endif
   61023             : #ifdef PY_NETSRVINFO1541_PATCH
   61024             :         PY_NETSRVINFO1541_PATCH(&srvsvc_NetSrvInfo1541_Type);
   61025             : #endif
   61026             : #ifdef PY_NETSRVINFO1542_PATCH
   61027             :         PY_NETSRVINFO1542_PATCH(&srvsvc_NetSrvInfo1542_Type);
   61028             : #endif
   61029             : #ifdef PY_NETSRVINFO1543_PATCH
   61030             :         PY_NETSRVINFO1543_PATCH(&srvsvc_NetSrvInfo1543_Type);
   61031             : #endif
   61032             : #ifdef PY_NETSRVINFO1544_PATCH
   61033             :         PY_NETSRVINFO1544_PATCH(&srvsvc_NetSrvInfo1544_Type);
   61034             : #endif
   61035             : #ifdef PY_NETSRVINFO1545_PATCH
   61036             :         PY_NETSRVINFO1545_PATCH(&srvsvc_NetSrvInfo1545_Type);
   61037             : #endif
   61038             : #ifdef PY_NETSRVINFO1546_PATCH
   61039             :         PY_NETSRVINFO1546_PATCH(&srvsvc_NetSrvInfo1546_Type);
   61040             : #endif
   61041             : #ifdef PY_NETSRVINFO1547_PATCH
   61042             :         PY_NETSRVINFO1547_PATCH(&srvsvc_NetSrvInfo1547_Type);
   61043             : #endif
   61044             : #ifdef PY_NETSRVINFO1548_PATCH
   61045             :         PY_NETSRVINFO1548_PATCH(&srvsvc_NetSrvInfo1548_Type);
   61046             : #endif
   61047             : #ifdef PY_NETSRVINFO1549_PATCH
   61048             :         PY_NETSRVINFO1549_PATCH(&srvsvc_NetSrvInfo1549_Type);
   61049             : #endif
   61050             : #ifdef PY_NETSRVINFO1550_PATCH
   61051             :         PY_NETSRVINFO1550_PATCH(&srvsvc_NetSrvInfo1550_Type);
   61052             : #endif
   61053             : #ifdef PY_NETSRVINFO1552_PATCH
   61054             :         PY_NETSRVINFO1552_PATCH(&srvsvc_NetSrvInfo1552_Type);
   61055             : #endif
   61056             : #ifdef PY_NETSRVINFO1553_PATCH
   61057             :         PY_NETSRVINFO1553_PATCH(&srvsvc_NetSrvInfo1553_Type);
   61058             : #endif
   61059             : #ifdef PY_NETSRVINFO1554_PATCH
   61060             :         PY_NETSRVINFO1554_PATCH(&srvsvc_NetSrvInfo1554_Type);
   61061             : #endif
   61062             : #ifdef PY_NETSRVINFO1555_PATCH
   61063             :         PY_NETSRVINFO1555_PATCH(&srvsvc_NetSrvInfo1555_Type);
   61064             : #endif
   61065             : #ifdef PY_NETSRVINFO1556_PATCH
   61066             :         PY_NETSRVINFO1556_PATCH(&srvsvc_NetSrvInfo1556_Type);
   61067             : #endif
   61068             : #ifdef PY_NETSRVINFO_PATCH
   61069             :         PY_NETSRVINFO_PATCH(&srvsvc_NetSrvInfo_Type);
   61070             : #endif
   61071             : #ifdef PY_NETDISKINFO0_PATCH
   61072             :         PY_NETDISKINFO0_PATCH(&srvsvc_NetDiskInfo0_Type);
   61073             : #endif
   61074             : #ifdef PY_NETDISKINFO_PATCH
   61075             :         PY_NETDISKINFO_PATCH(&srvsvc_NetDiskInfo_Type);
   61076             : #endif
   61077             : #ifdef PY_STATISTICS_PATCH
   61078             :         PY_STATISTICS_PATCH(&srvsvc_Statistics_Type);
   61079             : #endif
   61080             : #ifdef PY_NETTRANSPORTINFO0_PATCH
   61081             :         PY_NETTRANSPORTINFO0_PATCH(&srvsvc_NetTransportInfo0_Type);
   61082             : #endif
   61083             : #ifdef PY_NETTRANSPORTCTR0_PATCH
   61084             :         PY_NETTRANSPORTCTR0_PATCH(&srvsvc_NetTransportCtr0_Type);
   61085             : #endif
   61086             : #ifdef PY_NETTRANSPORTINFO1_PATCH
   61087             :         PY_NETTRANSPORTINFO1_PATCH(&srvsvc_NetTransportInfo1_Type);
   61088             : #endif
   61089             : #ifdef PY_NETTRANSPORTCTR1_PATCH
   61090             :         PY_NETTRANSPORTCTR1_PATCH(&srvsvc_NetTransportCtr1_Type);
   61091             : #endif
   61092             : #ifdef PY_NETTRANSPORTINFO2_PATCH
   61093             :         PY_NETTRANSPORTINFO2_PATCH(&srvsvc_NetTransportInfo2_Type);
   61094             : #endif
   61095             : #ifdef PY_NETTRANSPORTCTR2_PATCH
   61096             :         PY_NETTRANSPORTCTR2_PATCH(&srvsvc_NetTransportCtr2_Type);
   61097             : #endif
   61098             : #ifdef PY_NETTRANSPORTINFO3_PATCH
   61099             :         PY_NETTRANSPORTINFO3_PATCH(&srvsvc_NetTransportInfo3_Type);
   61100             : #endif
   61101             : #ifdef PY_NETTRANSPORTCTR3_PATCH
   61102             :         PY_NETTRANSPORTCTR3_PATCH(&srvsvc_NetTransportCtr3_Type);
   61103             : #endif
   61104             : #ifdef PY_NETTRANSPORTCTR_PATCH
   61105             :         PY_NETTRANSPORTCTR_PATCH(&srvsvc_NetTransportCtr_Type);
   61106             : #endif
   61107             : #ifdef PY_NETTRANSPORTINFOCTR_PATCH
   61108             :         PY_NETTRANSPORTINFOCTR_PATCH(&srvsvc_NetTransportInfoCtr_Type);
   61109             : #endif
   61110             : #ifdef PY_NETREMOTETODINFO_PATCH
   61111             :         PY_NETREMOTETODINFO_PATCH(&srvsvc_NetRemoteTODInfo_Type);
   61112             : #endif
   61113             : #ifdef PY_NETTRANSPORTINFO_PATCH
   61114             :         PY_NETTRANSPORTINFO_PATCH(&srvsvc_NetTransportInfo_Type);
   61115             : #endif
   61116             : #ifdef PY_NETCHARDEVENUM_PATCH
   61117             :         PY_NETCHARDEVENUM_PATCH(&srvsvc_NetCharDevEnum_Type);
   61118             : #endif
   61119             : #ifdef PY_NETCHARDEVGETINFO_PATCH
   61120             :         PY_NETCHARDEVGETINFO_PATCH(&srvsvc_NetCharDevGetInfo_Type);
   61121             : #endif
   61122             : #ifdef PY_NETCHARDEVCONTROL_PATCH
   61123             :         PY_NETCHARDEVCONTROL_PATCH(&srvsvc_NetCharDevControl_Type);
   61124             : #endif
   61125             : #ifdef PY_NETCHARDEVQENUM_PATCH
   61126             :         PY_NETCHARDEVQENUM_PATCH(&srvsvc_NetCharDevQEnum_Type);
   61127             : #endif
   61128             : #ifdef PY_NETCHARDEVQGETINFO_PATCH
   61129             :         PY_NETCHARDEVQGETINFO_PATCH(&srvsvc_NetCharDevQGetInfo_Type);
   61130             : #endif
   61131             : #ifdef PY_NETCHARDEVQSETINFO_PATCH
   61132             :         PY_NETCHARDEVQSETINFO_PATCH(&srvsvc_NetCharDevQSetInfo_Type);
   61133             : #endif
   61134             : #ifdef PY_NETCHARDEVQPURGE_PATCH
   61135             :         PY_NETCHARDEVQPURGE_PATCH(&srvsvc_NetCharDevQPurge_Type);
   61136             : #endif
   61137             : #ifdef PY_NETCHARDEVQPURGESELF_PATCH
   61138             :         PY_NETCHARDEVQPURGESELF_PATCH(&srvsvc_NetCharDevQPurgeSelf_Type);
   61139             : #endif
   61140             : #ifdef PY_NETCONNENUM_PATCH
   61141             :         PY_NETCONNENUM_PATCH(&srvsvc_NetConnEnum_Type);
   61142             : #endif
   61143             : #ifdef PY_NETFILEENUM_PATCH
   61144             :         PY_NETFILEENUM_PATCH(&srvsvc_NetFileEnum_Type);
   61145             : #endif
   61146             : #ifdef PY_NETFILEGETINFO_PATCH
   61147             :         PY_NETFILEGETINFO_PATCH(&srvsvc_NetFileGetInfo_Type);
   61148             : #endif
   61149             : #ifdef PY_NETFILECLOSE_PATCH
   61150             :         PY_NETFILECLOSE_PATCH(&srvsvc_NetFileClose_Type);
   61151             : #endif
   61152             : #ifdef PY_NETSESSENUM_PATCH
   61153             :         PY_NETSESSENUM_PATCH(&srvsvc_NetSessEnum_Type);
   61154             : #endif
   61155             : #ifdef PY_NETSESSDEL_PATCH
   61156             :         PY_NETSESSDEL_PATCH(&srvsvc_NetSessDel_Type);
   61157             : #endif
   61158             : #ifdef PY_NETSHAREADD_PATCH
   61159             :         PY_NETSHAREADD_PATCH(&srvsvc_NetShareAdd_Type);
   61160             : #endif
   61161             : #ifdef PY_NETSHAREENUMALL_PATCH
   61162             :         PY_NETSHAREENUMALL_PATCH(&srvsvc_NetShareEnumAll_Type);
   61163             : #endif
   61164             : #ifdef PY_NETSHAREGETINFO_PATCH
   61165             :         PY_NETSHAREGETINFO_PATCH(&srvsvc_NetShareGetInfo_Type);
   61166             : #endif
   61167             : #ifdef PY_NETSHARESETINFO_PATCH
   61168             :         PY_NETSHARESETINFO_PATCH(&srvsvc_NetShareSetInfo_Type);
   61169             : #endif
   61170             : #ifdef PY_NETSHAREDEL_PATCH
   61171             :         PY_NETSHAREDEL_PATCH(&srvsvc_NetShareDel_Type);
   61172             : #endif
   61173             : #ifdef PY_NETSHAREDELSTICKY_PATCH
   61174             :         PY_NETSHAREDELSTICKY_PATCH(&srvsvc_NetShareDelSticky_Type);
   61175             : #endif
   61176             : #ifdef PY_NETSHARECHECK_PATCH
   61177             :         PY_NETSHARECHECK_PATCH(&srvsvc_NetShareCheck_Type);
   61178             : #endif
   61179             : #ifdef PY_NETSRVGETINFO_PATCH
   61180             :         PY_NETSRVGETINFO_PATCH(&srvsvc_NetSrvGetInfo_Type);
   61181             : #endif
   61182             : #ifdef PY_NETSRVSETINFO_PATCH
   61183             :         PY_NETSRVSETINFO_PATCH(&srvsvc_NetSrvSetInfo_Type);
   61184             : #endif
   61185             : #ifdef PY_NETDISKENUM_PATCH
   61186             :         PY_NETDISKENUM_PATCH(&srvsvc_NetDiskEnum_Type);
   61187             : #endif
   61188             : #ifdef PY_NETSERVERSTATISTICSGET_PATCH
   61189             :         PY_NETSERVERSTATISTICSGET_PATCH(&srvsvc_NetServerStatisticsGet_Type);
   61190             : #endif
   61191             : #ifdef PY_NETTRANSPORTADD_PATCH
   61192             :         PY_NETTRANSPORTADD_PATCH(&srvsvc_NetTransportAdd_Type);
   61193             : #endif
   61194             : #ifdef PY_NETTRANSPORTENUM_PATCH
   61195             :         PY_NETTRANSPORTENUM_PATCH(&srvsvc_NetTransportEnum_Type);
   61196             : #endif
   61197             : #ifdef PY_NETTRANSPORTDEL_PATCH
   61198             :         PY_NETTRANSPORTDEL_PATCH(&srvsvc_NetTransportDel_Type);
   61199             : #endif
   61200             : #ifdef PY_NETREMOTETOD_PATCH
   61201             :         PY_NETREMOTETOD_PATCH(&srvsvc_NetRemoteTOD_Type);
   61202             : #endif
   61203             : #ifdef PY_NETSETSERVICEBITS_PATCH
   61204             :         PY_NETSETSERVICEBITS_PATCH(&srvsvc_NetSetServiceBits_Type);
   61205             : #endif
   61206             : #ifdef PY_NETPATHTYPE_PATCH
   61207             :         PY_NETPATHTYPE_PATCH(&srvsvc_NetPathType_Type);
   61208             : #endif
   61209             : #ifdef PY_NETPATHCANONICALIZE_PATCH
   61210             :         PY_NETPATHCANONICALIZE_PATCH(&srvsvc_NetPathCanonicalize_Type);
   61211             : #endif
   61212             : #ifdef PY_NETPATHCOMPARE_PATCH
   61213             :         PY_NETPATHCOMPARE_PATCH(&srvsvc_NetPathCompare_Type);
   61214             : #endif
   61215             : #ifdef PY_NETNAMEVALIDATE_PATCH
   61216             :         PY_NETNAMEVALIDATE_PATCH(&srvsvc_NetNameValidate_Type);
   61217             : #endif
   61218             : #ifdef PY_NETPRNAMECOMPARE_PATCH
   61219             :         PY_NETPRNAMECOMPARE_PATCH(&srvsvc_NetPRNameCompare_Type);
   61220             : #endif
   61221             : #ifdef PY_NETSHAREENUM_PATCH
   61222             :         PY_NETSHAREENUM_PATCH(&srvsvc_NetShareEnum_Type);
   61223             : #endif
   61224             : #ifdef PY_NETSHAREDELSTART_PATCH
   61225             :         PY_NETSHAREDELSTART_PATCH(&srvsvc_NetShareDelStart_Type);
   61226             : #endif
   61227             : #ifdef PY_NETSHAREDELCOMMIT_PATCH
   61228             :         PY_NETSHAREDELCOMMIT_PATCH(&srvsvc_NetShareDelCommit_Type);
   61229             : #endif
   61230             : #ifdef PY_NETGETFILESECURITY_PATCH
   61231             :         PY_NETGETFILESECURITY_PATCH(&srvsvc_NetGetFileSecurity_Type);
   61232             : #endif
   61233             : #ifdef PY_NETSETFILESECURITY_PATCH
   61234             :         PY_NETSETFILESECURITY_PATCH(&srvsvc_NetSetFileSecurity_Type);
   61235             : #endif
   61236             : #ifdef PY_NETSERVERTRANSPORTADDEX_PATCH
   61237             :         PY_NETSERVERTRANSPORTADDEX_PATCH(&srvsvc_NetServerTransportAddEx_Type);
   61238             : #endif
   61239             : #ifdef PY_NETSERVERSETSERVICEBITSEX_PATCH
   61240             :         PY_NETSERVERSETSERVICEBITSEX_PATCH(&srvsvc_NetServerSetServiceBitsEx_Type);
   61241             : #endif
   61242             : #ifdef PY_SRVSVC_PATCH
   61243             :         PY_SRVSVC_PATCH(&srvsvc_InterfaceType);
   61244             : #endif
   61245             : #ifdef PY_SRVSVC_ABSTRACT_SYNTAX_PATCH
   61246             :         PY_SRVSVC_ABSTRACT_SYNTAX_PATCH(&srvsvc_SyntaxType);
   61247             : #endif
   61248             : #ifdef PY_ABSTRACT_SYNTAX_PATCH
   61249             :         PY_ABSTRACT_SYNTAX_PATCH(&srvsvc_SyntaxType);
   61250             : #endif
   61251             : 
   61252          35 :         m = PyModule_Create(&moduledef);
   61253          35 :         if (m == NULL)
   61254           0 :                 goto out;
   61255             : 
   61256          35 :         PyModule_AddObject(m, "STYPE_TEMPORARY", PyLong_FromUnsignedLongLong(0x40000000));
   61257          35 :         PyModule_AddObject(m, "STYPE_HIDDEN", PyLong_FromUnsignedLongLong(0x80000000));
   61258          35 :         PyModule_AddObject(m, "SHARE_1005_CSC_CACHE_MANUAL_REINT", PyLong_FromUnsignedLongLong(0x00000000));
   61259          35 :         PyModule_AddObject(m, "SHARE_1005_CSC_POLICY_MASK", PyLong_FromUnsignedLongLong(0x00000030));
   61260          35 :         PyModule_AddObject(m, "SHARE_1005_CSC_POLICY_SHIFT", PyLong_FromUnsignedLongLong(4));
   61261          35 :         PyModule_AddObject(m, "STYPE_DISKTREE", PyLong_FromUnsignedLongLong((uint32_t)STYPE_DISKTREE));
   61262          35 :         PyModule_AddObject(m, "STYPE_DISKTREE_TEMPORARY", PyLong_FromUnsignedLongLong((uint32_t)STYPE_DISKTREE_TEMPORARY));
   61263          35 :         PyModule_AddObject(m, "STYPE_DISKTREE_HIDDEN", PyLong_FromUnsignedLongLong((uint32_t)STYPE_DISKTREE_HIDDEN));
   61264          35 :         PyModule_AddObject(m, "STYPE_PRINTQ", PyLong_FromUnsignedLongLong((uint32_t)STYPE_PRINTQ));
   61265          35 :         PyModule_AddObject(m, "STYPE_PRINTQ_TEMPORARY", PyLong_FromUnsignedLongLong((uint32_t)STYPE_PRINTQ_TEMPORARY));
   61266          35 :         PyModule_AddObject(m, "STYPE_PRINTQ_HIDDEN", PyLong_FromUnsignedLongLong((uint32_t)STYPE_PRINTQ_HIDDEN));
   61267          35 :         PyModule_AddObject(m, "STYPE_DEVICE", PyLong_FromUnsignedLongLong((uint32_t)STYPE_DEVICE));
   61268          35 :         PyModule_AddObject(m, "STYPE_DEVICE_TEMPORARY", PyLong_FromUnsignedLongLong((uint32_t)STYPE_DEVICE_TEMPORARY));
   61269          35 :         PyModule_AddObject(m, "STYPE_DEVICE_HIDDEN", PyLong_FromUnsignedLongLong((uint32_t)STYPE_DEVICE_HIDDEN));
   61270          35 :         PyModule_AddObject(m, "STYPE_IPC", PyLong_FromUnsignedLongLong((uint32_t)STYPE_IPC));
   61271          35 :         PyModule_AddObject(m, "STYPE_IPC_TEMPORARY", PyLong_FromUnsignedLongLong((uint32_t)STYPE_IPC_TEMPORARY));
   61272          35 :         PyModule_AddObject(m, "STYPE_IPC_HIDDEN", PyLong_FromUnsignedLongLong((uint32_t)STYPE_IPC_HIDDEN));
   61273          35 :         PyModule_AddObject(m, "STYPE_CLUSTER_FS", PyLong_FromUnsignedLongLong((uint32_t)STYPE_CLUSTER_FS));
   61274          35 :         PyModule_AddObject(m, "STYPE_CLUSTER_FS_TEMPORARY", PyLong_FromUnsignedLongLong((uint32_t)STYPE_CLUSTER_FS_TEMPORARY));
   61275          35 :         PyModule_AddObject(m, "STYPE_CLUSTER_FS_HIDDEN", PyLong_FromUnsignedLongLong((uint32_t)STYPE_CLUSTER_FS_HIDDEN));
   61276          35 :         PyModule_AddObject(m, "STYPE_CLUSTER_SOFS", PyLong_FromUnsignedLongLong((uint32_t)STYPE_CLUSTER_SOFS));
   61277          35 :         PyModule_AddObject(m, "STYPE_CLUSTER_SOFS_TEMPORARY", PyLong_FromUnsignedLongLong((uint32_t)STYPE_CLUSTER_SOFS_TEMPORARY));
   61278          35 :         PyModule_AddObject(m, "STYPE_CLUSTER_SOFS_HIDDEN", PyLong_FromUnsignedLongLong((uint32_t)STYPE_CLUSTER_SOFS_HIDDEN));
   61279          35 :         PyModule_AddObject(m, "STYPE_CLUSTER_DFS", PyLong_FromUnsignedLongLong((uint32_t)STYPE_CLUSTER_DFS));
   61280          35 :         PyModule_AddObject(m, "STYPE_CLUSTER_DFS_TEMPORARY", PyLong_FromUnsignedLongLong((uint32_t)STYPE_CLUSTER_DFS_TEMPORARY));
   61281          35 :         PyModule_AddObject(m, "STYPE_CLUSTER_DFS_HIDDEN", PyLong_FromUnsignedLongLong((uint32_t)STYPE_CLUSTER_DFS_HIDDEN));
   61282          35 :         PyModule_AddObject(m, "SHARE_1005_IN_DFS", PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_IN_DFS));
   61283          35 :         PyModule_AddObject(m, "SHARE_1005_DFS_ROOT", PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_DFS_ROOT));
   61284          35 :         PyModule_AddObject(m, "SHARE_1005_CSC_CACHE_AUTO_REINT", PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_CSC_CACHE_AUTO_REINT));
   61285          35 :         PyModule_AddObject(m, "SHARE_1005_CSC_CACHE_VDO", PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_CSC_CACHE_VDO));
   61286          35 :         PyModule_AddObject(m, "SHARE_1005_CSC_CACHE_NONE", PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_CSC_CACHE_NONE));
   61287          35 :         PyModule_AddObject(m, "SHARE_1005_RESTRICT_EXCLUSIVE_OPENS", PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_RESTRICT_EXCLUSIVE_OPENS));
   61288          35 :         PyModule_AddObject(m, "SHARE_1005_FORCE_SHARED_DELETE", PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_FORCE_SHARED_DELETE));
   61289          35 :         PyModule_AddObject(m, "SHARE_1005_ALLOW_NAMESPACE_CACHING", PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_ALLOW_NAMESPACE_CACHING));
   61290          35 :         PyModule_AddObject(m, "SHARE_1005_ACCESS_BASED_DIRECTORY_ENUM", PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_ACCESS_BASED_DIRECTORY_ENUM));
   61291          35 :         PyModule_AddObject(m, "SHARE_1005_FORCE_LEVELII_OPLOCK", PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_FORCE_LEVELII_OPLOCK));
   61292          35 :         PyModule_AddObject(m, "SHARE_1005_ENABLE_HASH", PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_ENABLE_HASH));
   61293          35 :         PyModule_AddObject(m, "SHARE_1005_ENABLE_CA", PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_ENABLE_CA));
   61294          35 :         PyModule_AddObject(m, "SHARE_1005_ENCRYPT_DATA", PyLong_FromUnsignedLongLong((uint32_t)SHARE_1005_ENCRYPT_DATA));
   61295          35 :         PyModule_AddObject(m, "PLATFORM_ID_DOS", PyLong_FromUnsignedLongLong((uint32_t)PLATFORM_ID_DOS));
   61296          35 :         PyModule_AddObject(m, "PLATFORM_ID_OS2", PyLong_FromUnsignedLongLong((uint32_t)PLATFORM_ID_OS2));
   61297          35 :         PyModule_AddObject(m, "PLATFORM_ID_NT", PyLong_FromUnsignedLongLong((uint32_t)PLATFORM_ID_NT));
   61298          35 :         PyModule_AddObject(m, "PLATFORM_ID_OSF", PyLong_FromUnsignedLongLong((uint32_t)PLATFORM_ID_OSF));
   61299          35 :         PyModule_AddObject(m, "PLATFORM_ID_VMS", PyLong_FromUnsignedLongLong((uint32_t)PLATFORM_ID_VMS));
   61300          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevInfo0_Type);
   61301          35 :         PyModule_AddObject(m, "NetCharDevInfo0", (PyObject *)(void *)&srvsvc_NetCharDevInfo0_Type);
   61302          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevCtr0_Type);
   61303          35 :         PyModule_AddObject(m, "NetCharDevCtr0", (PyObject *)(void *)&srvsvc_NetCharDevCtr0_Type);
   61304          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevInfo1_Type);
   61305          35 :         PyModule_AddObject(m, "NetCharDevInfo1", (PyObject *)(void *)&srvsvc_NetCharDevInfo1_Type);
   61306          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevCtr1_Type);
   61307          35 :         PyModule_AddObject(m, "NetCharDevCtr1", (PyObject *)(void *)&srvsvc_NetCharDevCtr1_Type);
   61308          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevInfo_Type);
   61309          35 :         PyModule_AddObject(m, "NetCharDevInfo", (PyObject *)(void *)&srvsvc_NetCharDevInfo_Type);
   61310          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevCtr_Type);
   61311          35 :         PyModule_AddObject(m, "NetCharDevCtr", (PyObject *)(void *)&srvsvc_NetCharDevCtr_Type);
   61312          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevInfoCtr_Type);
   61313          35 :         PyModule_AddObject(m, "NetCharDevInfoCtr", (PyObject *)(void *)&srvsvc_NetCharDevInfoCtr_Type);
   61314          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQInfo0_Type);
   61315          35 :         PyModule_AddObject(m, "NetCharDevQInfo0", (PyObject *)(void *)&srvsvc_NetCharDevQInfo0_Type);
   61316          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQCtr0_Type);
   61317          35 :         PyModule_AddObject(m, "NetCharDevQCtr0", (PyObject *)(void *)&srvsvc_NetCharDevQCtr0_Type);
   61318          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQInfo1_Type);
   61319          35 :         PyModule_AddObject(m, "NetCharDevQInfo1", (PyObject *)(void *)&srvsvc_NetCharDevQInfo1_Type);
   61320          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQCtr1_Type);
   61321          35 :         PyModule_AddObject(m, "NetCharDevQCtr1", (PyObject *)(void *)&srvsvc_NetCharDevQCtr1_Type);
   61322          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQInfo_Type);
   61323          35 :         PyModule_AddObject(m, "NetCharDevQInfo", (PyObject *)(void *)&srvsvc_NetCharDevQInfo_Type);
   61324          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQCtr_Type);
   61325          35 :         PyModule_AddObject(m, "NetCharDevQCtr", (PyObject *)(void *)&srvsvc_NetCharDevQCtr_Type);
   61326          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQInfoCtr_Type);
   61327          35 :         PyModule_AddObject(m, "NetCharDevQInfoCtr", (PyObject *)(void *)&srvsvc_NetCharDevQInfoCtr_Type);
   61328          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetConnInfo0_Type);
   61329          35 :         PyModule_AddObject(m, "NetConnInfo0", (PyObject *)(void *)&srvsvc_NetConnInfo0_Type);
   61330          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetConnCtr0_Type);
   61331          35 :         PyModule_AddObject(m, "NetConnCtr0", (PyObject *)(void *)&srvsvc_NetConnCtr0_Type);
   61332          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetConnInfo1_Type);
   61333          35 :         PyModule_AddObject(m, "NetConnInfo1", (PyObject *)(void *)&srvsvc_NetConnInfo1_Type);
   61334          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetConnCtr1_Type);
   61335          35 :         PyModule_AddObject(m, "NetConnCtr1", (PyObject *)(void *)&srvsvc_NetConnCtr1_Type);
   61336          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetConnCtr_Type);
   61337          35 :         PyModule_AddObject(m, "NetConnCtr", (PyObject *)(void *)&srvsvc_NetConnCtr_Type);
   61338          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetConnInfoCtr_Type);
   61339          35 :         PyModule_AddObject(m, "NetConnInfoCtr", (PyObject *)(void *)&srvsvc_NetConnInfoCtr_Type);
   61340          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetFileInfo2_Type);
   61341          35 :         PyModule_AddObject(m, "NetFileInfo2", (PyObject *)(void *)&srvsvc_NetFileInfo2_Type);
   61342          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetFileCtr2_Type);
   61343          35 :         PyModule_AddObject(m, "NetFileCtr2", (PyObject *)(void *)&srvsvc_NetFileCtr2_Type);
   61344          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetFileInfo3_Type);
   61345          35 :         PyModule_AddObject(m, "NetFileInfo3", (PyObject *)(void *)&srvsvc_NetFileInfo3_Type);
   61346          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetFileCtr3_Type);
   61347          35 :         PyModule_AddObject(m, "NetFileCtr3", (PyObject *)(void *)&srvsvc_NetFileCtr3_Type);
   61348          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetFileInfo_Type);
   61349          35 :         PyModule_AddObject(m, "NetFileInfo", (PyObject *)(void *)&srvsvc_NetFileInfo_Type);
   61350          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetFileCtr_Type);
   61351          35 :         PyModule_AddObject(m, "NetFileCtr", (PyObject *)(void *)&srvsvc_NetFileCtr_Type);
   61352          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetFileInfoCtr_Type);
   61353          35 :         PyModule_AddObject(m, "NetFileInfoCtr", (PyObject *)(void *)&srvsvc_NetFileInfoCtr_Type);
   61354          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessInfo0_Type);
   61355          35 :         PyModule_AddObject(m, "NetSessInfo0", (PyObject *)(void *)&srvsvc_NetSessInfo0_Type);
   61356          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessCtr0_Type);
   61357          35 :         PyModule_AddObject(m, "NetSessCtr0", (PyObject *)(void *)&srvsvc_NetSessCtr0_Type);
   61358          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessInfo1_Type);
   61359          35 :         PyModule_AddObject(m, "NetSessInfo1", (PyObject *)(void *)&srvsvc_NetSessInfo1_Type);
   61360          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessCtr1_Type);
   61361          35 :         PyModule_AddObject(m, "NetSessCtr1", (PyObject *)(void *)&srvsvc_NetSessCtr1_Type);
   61362          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessInfo2_Type);
   61363          35 :         PyModule_AddObject(m, "NetSessInfo2", (PyObject *)(void *)&srvsvc_NetSessInfo2_Type);
   61364          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessCtr2_Type);
   61365          35 :         PyModule_AddObject(m, "NetSessCtr2", (PyObject *)(void *)&srvsvc_NetSessCtr2_Type);
   61366          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessInfo10_Type);
   61367          35 :         PyModule_AddObject(m, "NetSessInfo10", (PyObject *)(void *)&srvsvc_NetSessInfo10_Type);
   61368          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessCtr10_Type);
   61369          35 :         PyModule_AddObject(m, "NetSessCtr10", (PyObject *)(void *)&srvsvc_NetSessCtr10_Type);
   61370          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessInfo502_Type);
   61371          35 :         PyModule_AddObject(m, "NetSessInfo502", (PyObject *)(void *)&srvsvc_NetSessInfo502_Type);
   61372          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessCtr502_Type);
   61373          35 :         PyModule_AddObject(m, "NetSessCtr502", (PyObject *)(void *)&srvsvc_NetSessCtr502_Type);
   61374          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessCtr_Type);
   61375          35 :         PyModule_AddObject(m, "NetSessCtr", (PyObject *)(void *)&srvsvc_NetSessCtr_Type);
   61376          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessInfoCtr_Type);
   61377          35 :         PyModule_AddObject(m, "NetSessInfoCtr", (PyObject *)(void *)&srvsvc_NetSessInfoCtr_Type);
   61378          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo0_Type);
   61379          35 :         PyModule_AddObject(m, "NetShareInfo0", (PyObject *)(void *)&srvsvc_NetShareInfo0_Type);
   61380          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr0_Type);
   61381          35 :         PyModule_AddObject(m, "NetShareCtr0", (PyObject *)(void *)&srvsvc_NetShareCtr0_Type);
   61382          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo1_Type);
   61383          35 :         PyModule_AddObject(m, "NetShareInfo1", (PyObject *)(void *)&srvsvc_NetShareInfo1_Type);
   61384          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr1_Type);
   61385          35 :         PyModule_AddObject(m, "NetShareCtr1", (PyObject *)(void *)&srvsvc_NetShareCtr1_Type);
   61386          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo2_Type);
   61387          35 :         PyModule_AddObject(m, "NetShareInfo2", (PyObject *)(void *)&srvsvc_NetShareInfo2_Type);
   61388          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr2_Type);
   61389          35 :         PyModule_AddObject(m, "NetShareCtr2", (PyObject *)(void *)&srvsvc_NetShareCtr2_Type);
   61390          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo501_Type);
   61391          35 :         PyModule_AddObject(m, "NetShareInfo501", (PyObject *)(void *)&srvsvc_NetShareInfo501_Type);
   61392          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr501_Type);
   61393          35 :         PyModule_AddObject(m, "NetShareCtr501", (PyObject *)(void *)&srvsvc_NetShareCtr501_Type);
   61394          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo502_Type);
   61395          35 :         PyModule_AddObject(m, "NetShareInfo502", (PyObject *)(void *)&srvsvc_NetShareInfo502_Type);
   61396          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr502_Type);
   61397          35 :         PyModule_AddObject(m, "NetShareCtr502", (PyObject *)(void *)&srvsvc_NetShareCtr502_Type);
   61398          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo1004_Type);
   61399          35 :         PyModule_AddObject(m, "NetShareInfo1004", (PyObject *)(void *)&srvsvc_NetShareInfo1004_Type);
   61400          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr1004_Type);
   61401          35 :         PyModule_AddObject(m, "NetShareCtr1004", (PyObject *)(void *)&srvsvc_NetShareCtr1004_Type);
   61402          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo1005_Type);
   61403          35 :         PyModule_AddObject(m, "NetShareInfo1005", (PyObject *)(void *)&srvsvc_NetShareInfo1005_Type);
   61404          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr1005_Type);
   61405          35 :         PyModule_AddObject(m, "NetShareCtr1005", (PyObject *)(void *)&srvsvc_NetShareCtr1005_Type);
   61406          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo1006_Type);
   61407          35 :         PyModule_AddObject(m, "NetShareInfo1006", (PyObject *)(void *)&srvsvc_NetShareInfo1006_Type);
   61408          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr1006_Type);
   61409          35 :         PyModule_AddObject(m, "NetShareCtr1006", (PyObject *)(void *)&srvsvc_NetShareCtr1006_Type);
   61410          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo1007_Type);
   61411          35 :         PyModule_AddObject(m, "NetShareInfo1007", (PyObject *)(void *)&srvsvc_NetShareInfo1007_Type);
   61412          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr1007_Type);
   61413          35 :         PyModule_AddObject(m, "NetShareCtr1007", (PyObject *)(void *)&srvsvc_NetShareCtr1007_Type);
   61414          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr1501_Type);
   61415          35 :         PyModule_AddObject(m, "NetShareCtr1501", (PyObject *)(void *)&srvsvc_NetShareCtr1501_Type);
   61416          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfo_Type);
   61417          35 :         PyModule_AddObject(m, "NetShareInfo", (PyObject *)(void *)&srvsvc_NetShareInfo_Type);
   61418          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCtr_Type);
   61419          35 :         PyModule_AddObject(m, "NetShareCtr", (PyObject *)(void *)&srvsvc_NetShareCtr_Type);
   61420          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareInfoCtr_Type);
   61421          35 :         PyModule_AddObject(m, "NetShareInfoCtr", (PyObject *)(void *)&srvsvc_NetShareInfoCtr_Type);
   61422          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo100_Type);
   61423          35 :         PyModule_AddObject(m, "NetSrvInfo100", (PyObject *)(void *)&srvsvc_NetSrvInfo100_Type);
   61424          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo101_Type);
   61425          35 :         PyModule_AddObject(m, "NetSrvInfo101", (PyObject *)(void *)&srvsvc_NetSrvInfo101_Type);
   61426          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo102_Type);
   61427          35 :         PyModule_AddObject(m, "NetSrvInfo102", (PyObject *)(void *)&srvsvc_NetSrvInfo102_Type);
   61428          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo402_Type);
   61429          35 :         PyModule_AddObject(m, "NetSrvInfo402", (PyObject *)(void *)&srvsvc_NetSrvInfo402_Type);
   61430          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo403_Type);
   61431          35 :         PyModule_AddObject(m, "NetSrvInfo403", (PyObject *)(void *)&srvsvc_NetSrvInfo403_Type);
   61432          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo502_Type);
   61433          35 :         PyModule_AddObject(m, "NetSrvInfo502", (PyObject *)(void *)&srvsvc_NetSrvInfo502_Type);
   61434          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo503_Type);
   61435          35 :         PyModule_AddObject(m, "NetSrvInfo503", (PyObject *)(void *)&srvsvc_NetSrvInfo503_Type);
   61436          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo599_Type);
   61437          35 :         PyModule_AddObject(m, "NetSrvInfo599", (PyObject *)(void *)&srvsvc_NetSrvInfo599_Type);
   61438          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1005_Type);
   61439          35 :         PyModule_AddObject(m, "NetSrvInfo1005", (PyObject *)(void *)&srvsvc_NetSrvInfo1005_Type);
   61440          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1010_Type);
   61441          35 :         PyModule_AddObject(m, "NetSrvInfo1010", (PyObject *)(void *)&srvsvc_NetSrvInfo1010_Type);
   61442          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1016_Type);
   61443          35 :         PyModule_AddObject(m, "NetSrvInfo1016", (PyObject *)(void *)&srvsvc_NetSrvInfo1016_Type);
   61444          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1017_Type);
   61445          35 :         PyModule_AddObject(m, "NetSrvInfo1017", (PyObject *)(void *)&srvsvc_NetSrvInfo1017_Type);
   61446          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1018_Type);
   61447          35 :         PyModule_AddObject(m, "NetSrvInfo1018", (PyObject *)(void *)&srvsvc_NetSrvInfo1018_Type);
   61448          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1107_Type);
   61449          35 :         PyModule_AddObject(m, "NetSrvInfo1107", (PyObject *)(void *)&srvsvc_NetSrvInfo1107_Type);
   61450          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1501_Type);
   61451          35 :         PyModule_AddObject(m, "NetSrvInfo1501", (PyObject *)(void *)&srvsvc_NetSrvInfo1501_Type);
   61452          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1502_Type);
   61453          35 :         PyModule_AddObject(m, "NetSrvInfo1502", (PyObject *)(void *)&srvsvc_NetSrvInfo1502_Type);
   61454          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1503_Type);
   61455          35 :         PyModule_AddObject(m, "NetSrvInfo1503", (PyObject *)(void *)&srvsvc_NetSrvInfo1503_Type);
   61456          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1506_Type);
   61457          35 :         PyModule_AddObject(m, "NetSrvInfo1506", (PyObject *)(void *)&srvsvc_NetSrvInfo1506_Type);
   61458          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1509_Type);
   61459          35 :         PyModule_AddObject(m, "NetSrvInfo1509", (PyObject *)(void *)&srvsvc_NetSrvInfo1509_Type);
   61460          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1510_Type);
   61461          35 :         PyModule_AddObject(m, "NetSrvInfo1510", (PyObject *)(void *)&srvsvc_NetSrvInfo1510_Type);
   61462          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1511_Type);
   61463          35 :         PyModule_AddObject(m, "NetSrvInfo1511", (PyObject *)(void *)&srvsvc_NetSrvInfo1511_Type);
   61464          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1512_Type);
   61465          35 :         PyModule_AddObject(m, "NetSrvInfo1512", (PyObject *)(void *)&srvsvc_NetSrvInfo1512_Type);
   61466          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1513_Type);
   61467          35 :         PyModule_AddObject(m, "NetSrvInfo1513", (PyObject *)(void *)&srvsvc_NetSrvInfo1513_Type);
   61468          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1514_Type);
   61469          35 :         PyModule_AddObject(m, "NetSrvInfo1514", (PyObject *)(void *)&srvsvc_NetSrvInfo1514_Type);
   61470          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1515_Type);
   61471          35 :         PyModule_AddObject(m, "NetSrvInfo1515", (PyObject *)(void *)&srvsvc_NetSrvInfo1515_Type);
   61472          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1516_Type);
   61473          35 :         PyModule_AddObject(m, "NetSrvInfo1516", (PyObject *)(void *)&srvsvc_NetSrvInfo1516_Type);
   61474          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1518_Type);
   61475          35 :         PyModule_AddObject(m, "NetSrvInfo1518", (PyObject *)(void *)&srvsvc_NetSrvInfo1518_Type);
   61476          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1520_Type);
   61477          35 :         PyModule_AddObject(m, "NetSrvInfo1520", (PyObject *)(void *)&srvsvc_NetSrvInfo1520_Type);
   61478          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1521_Type);
   61479          35 :         PyModule_AddObject(m, "NetSrvInfo1521", (PyObject *)(void *)&srvsvc_NetSrvInfo1521_Type);
   61480          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1522_Type);
   61481          35 :         PyModule_AddObject(m, "NetSrvInfo1522", (PyObject *)(void *)&srvsvc_NetSrvInfo1522_Type);
   61482          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1523_Type);
   61483          35 :         PyModule_AddObject(m, "NetSrvInfo1523", (PyObject *)(void *)&srvsvc_NetSrvInfo1523_Type);
   61484          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1524_Type);
   61485          35 :         PyModule_AddObject(m, "NetSrvInfo1524", (PyObject *)(void *)&srvsvc_NetSrvInfo1524_Type);
   61486          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1525_Type);
   61487          35 :         PyModule_AddObject(m, "NetSrvInfo1525", (PyObject *)(void *)&srvsvc_NetSrvInfo1525_Type);
   61488          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1528_Type);
   61489          35 :         PyModule_AddObject(m, "NetSrvInfo1528", (PyObject *)(void *)&srvsvc_NetSrvInfo1528_Type);
   61490          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1529_Type);
   61491          35 :         PyModule_AddObject(m, "NetSrvInfo1529", (PyObject *)(void *)&srvsvc_NetSrvInfo1529_Type);
   61492          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1530_Type);
   61493          35 :         PyModule_AddObject(m, "NetSrvInfo1530", (PyObject *)(void *)&srvsvc_NetSrvInfo1530_Type);
   61494          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1533_Type);
   61495          35 :         PyModule_AddObject(m, "NetSrvInfo1533", (PyObject *)(void *)&srvsvc_NetSrvInfo1533_Type);
   61496          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1534_Type);
   61497          35 :         PyModule_AddObject(m, "NetSrvInfo1534", (PyObject *)(void *)&srvsvc_NetSrvInfo1534_Type);
   61498          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1535_Type);
   61499          35 :         PyModule_AddObject(m, "NetSrvInfo1535", (PyObject *)(void *)&srvsvc_NetSrvInfo1535_Type);
   61500          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1536_Type);
   61501          35 :         PyModule_AddObject(m, "NetSrvInfo1536", (PyObject *)(void *)&srvsvc_NetSrvInfo1536_Type);
   61502          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1537_Type);
   61503          35 :         PyModule_AddObject(m, "NetSrvInfo1537", (PyObject *)(void *)&srvsvc_NetSrvInfo1537_Type);
   61504          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1538_Type);
   61505          35 :         PyModule_AddObject(m, "NetSrvInfo1538", (PyObject *)(void *)&srvsvc_NetSrvInfo1538_Type);
   61506          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1539_Type);
   61507          35 :         PyModule_AddObject(m, "NetSrvInfo1539", (PyObject *)(void *)&srvsvc_NetSrvInfo1539_Type);
   61508          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1540_Type);
   61509          35 :         PyModule_AddObject(m, "NetSrvInfo1540", (PyObject *)(void *)&srvsvc_NetSrvInfo1540_Type);
   61510          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1541_Type);
   61511          35 :         PyModule_AddObject(m, "NetSrvInfo1541", (PyObject *)(void *)&srvsvc_NetSrvInfo1541_Type);
   61512          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1542_Type);
   61513          35 :         PyModule_AddObject(m, "NetSrvInfo1542", (PyObject *)(void *)&srvsvc_NetSrvInfo1542_Type);
   61514          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1543_Type);
   61515          35 :         PyModule_AddObject(m, "NetSrvInfo1543", (PyObject *)(void *)&srvsvc_NetSrvInfo1543_Type);
   61516          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1544_Type);
   61517          35 :         PyModule_AddObject(m, "NetSrvInfo1544", (PyObject *)(void *)&srvsvc_NetSrvInfo1544_Type);
   61518          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1545_Type);
   61519          35 :         PyModule_AddObject(m, "NetSrvInfo1545", (PyObject *)(void *)&srvsvc_NetSrvInfo1545_Type);
   61520          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1546_Type);
   61521          35 :         PyModule_AddObject(m, "NetSrvInfo1546", (PyObject *)(void *)&srvsvc_NetSrvInfo1546_Type);
   61522          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1547_Type);
   61523          35 :         PyModule_AddObject(m, "NetSrvInfo1547", (PyObject *)(void *)&srvsvc_NetSrvInfo1547_Type);
   61524          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1548_Type);
   61525          35 :         PyModule_AddObject(m, "NetSrvInfo1548", (PyObject *)(void *)&srvsvc_NetSrvInfo1548_Type);
   61526          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1549_Type);
   61527          35 :         PyModule_AddObject(m, "NetSrvInfo1549", (PyObject *)(void *)&srvsvc_NetSrvInfo1549_Type);
   61528          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1550_Type);
   61529          35 :         PyModule_AddObject(m, "NetSrvInfo1550", (PyObject *)(void *)&srvsvc_NetSrvInfo1550_Type);
   61530          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1552_Type);
   61531          35 :         PyModule_AddObject(m, "NetSrvInfo1552", (PyObject *)(void *)&srvsvc_NetSrvInfo1552_Type);
   61532          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1553_Type);
   61533          35 :         PyModule_AddObject(m, "NetSrvInfo1553", (PyObject *)(void *)&srvsvc_NetSrvInfo1553_Type);
   61534          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1554_Type);
   61535          35 :         PyModule_AddObject(m, "NetSrvInfo1554", (PyObject *)(void *)&srvsvc_NetSrvInfo1554_Type);
   61536          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1555_Type);
   61537          35 :         PyModule_AddObject(m, "NetSrvInfo1555", (PyObject *)(void *)&srvsvc_NetSrvInfo1555_Type);
   61538          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo1556_Type);
   61539          35 :         PyModule_AddObject(m, "NetSrvInfo1556", (PyObject *)(void *)&srvsvc_NetSrvInfo1556_Type);
   61540          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvInfo_Type);
   61541          35 :         PyModule_AddObject(m, "NetSrvInfo", (PyObject *)(void *)&srvsvc_NetSrvInfo_Type);
   61542          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetDiskInfo0_Type);
   61543          35 :         PyModule_AddObject(m, "NetDiskInfo0", (PyObject *)(void *)&srvsvc_NetDiskInfo0_Type);
   61544          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetDiskInfo_Type);
   61545          35 :         PyModule_AddObject(m, "NetDiskInfo", (PyObject *)(void *)&srvsvc_NetDiskInfo_Type);
   61546          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_Statistics_Type);
   61547          35 :         PyModule_AddObject(m, "Statistics", (PyObject *)(void *)&srvsvc_Statistics_Type);
   61548          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportInfo0_Type);
   61549          35 :         PyModule_AddObject(m, "NetTransportInfo0", (PyObject *)(void *)&srvsvc_NetTransportInfo0_Type);
   61550          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportCtr0_Type);
   61551          35 :         PyModule_AddObject(m, "NetTransportCtr0", (PyObject *)(void *)&srvsvc_NetTransportCtr0_Type);
   61552          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportInfo1_Type);
   61553          35 :         PyModule_AddObject(m, "NetTransportInfo1", (PyObject *)(void *)&srvsvc_NetTransportInfo1_Type);
   61554          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportCtr1_Type);
   61555          35 :         PyModule_AddObject(m, "NetTransportCtr1", (PyObject *)(void *)&srvsvc_NetTransportCtr1_Type);
   61556          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportInfo2_Type);
   61557          35 :         PyModule_AddObject(m, "NetTransportInfo2", (PyObject *)(void *)&srvsvc_NetTransportInfo2_Type);
   61558          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportCtr2_Type);
   61559          35 :         PyModule_AddObject(m, "NetTransportCtr2", (PyObject *)(void *)&srvsvc_NetTransportCtr2_Type);
   61560          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportInfo3_Type);
   61561          35 :         PyModule_AddObject(m, "NetTransportInfo3", (PyObject *)(void *)&srvsvc_NetTransportInfo3_Type);
   61562          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportCtr3_Type);
   61563          35 :         PyModule_AddObject(m, "NetTransportCtr3", (PyObject *)(void *)&srvsvc_NetTransportCtr3_Type);
   61564          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportCtr_Type);
   61565          35 :         PyModule_AddObject(m, "NetTransportCtr", (PyObject *)(void *)&srvsvc_NetTransportCtr_Type);
   61566          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportInfoCtr_Type);
   61567          35 :         PyModule_AddObject(m, "NetTransportInfoCtr", (PyObject *)(void *)&srvsvc_NetTransportInfoCtr_Type);
   61568          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetRemoteTODInfo_Type);
   61569          35 :         PyModule_AddObject(m, "NetRemoteTODInfo", (PyObject *)(void *)&srvsvc_NetRemoteTODInfo_Type);
   61570          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportInfo_Type);
   61571          35 :         PyModule_AddObject(m, "NetTransportInfo", (PyObject *)(void *)&srvsvc_NetTransportInfo_Type);
   61572          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevEnum_Type);
   61573          35 :         PyModule_AddObject(m, "NetCharDevEnum", (PyObject *)(void *)&srvsvc_NetCharDevEnum_Type);
   61574          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevGetInfo_Type);
   61575          35 :         PyModule_AddObject(m, "NetCharDevGetInfo", (PyObject *)(void *)&srvsvc_NetCharDevGetInfo_Type);
   61576          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevControl_Type);
   61577          35 :         PyModule_AddObject(m, "NetCharDevControl", (PyObject *)(void *)&srvsvc_NetCharDevControl_Type);
   61578          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQEnum_Type);
   61579          35 :         PyModule_AddObject(m, "NetCharDevQEnum", (PyObject *)(void *)&srvsvc_NetCharDevQEnum_Type);
   61580          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQGetInfo_Type);
   61581          35 :         PyModule_AddObject(m, "NetCharDevQGetInfo", (PyObject *)(void *)&srvsvc_NetCharDevQGetInfo_Type);
   61582          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQSetInfo_Type);
   61583          35 :         PyModule_AddObject(m, "NetCharDevQSetInfo", (PyObject *)(void *)&srvsvc_NetCharDevQSetInfo_Type);
   61584          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQPurge_Type);
   61585          35 :         PyModule_AddObject(m, "NetCharDevQPurge", (PyObject *)(void *)&srvsvc_NetCharDevQPurge_Type);
   61586          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetCharDevQPurgeSelf_Type);
   61587          35 :         PyModule_AddObject(m, "NetCharDevQPurgeSelf", (PyObject *)(void *)&srvsvc_NetCharDevQPurgeSelf_Type);
   61588          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetConnEnum_Type);
   61589          35 :         PyModule_AddObject(m, "NetConnEnum", (PyObject *)(void *)&srvsvc_NetConnEnum_Type);
   61590          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetFileEnum_Type);
   61591          35 :         PyModule_AddObject(m, "NetFileEnum", (PyObject *)(void *)&srvsvc_NetFileEnum_Type);
   61592          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetFileGetInfo_Type);
   61593          35 :         PyModule_AddObject(m, "NetFileGetInfo", (PyObject *)(void *)&srvsvc_NetFileGetInfo_Type);
   61594          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetFileClose_Type);
   61595          35 :         PyModule_AddObject(m, "NetFileClose", (PyObject *)(void *)&srvsvc_NetFileClose_Type);
   61596          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessEnum_Type);
   61597          35 :         PyModule_AddObject(m, "NetSessEnum", (PyObject *)(void *)&srvsvc_NetSessEnum_Type);
   61598          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSessDel_Type);
   61599          35 :         PyModule_AddObject(m, "NetSessDel", (PyObject *)(void *)&srvsvc_NetSessDel_Type);
   61600          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareAdd_Type);
   61601          35 :         PyModule_AddObject(m, "NetShareAdd", (PyObject *)(void *)&srvsvc_NetShareAdd_Type);
   61602          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareEnumAll_Type);
   61603          35 :         PyModule_AddObject(m, "NetShareEnumAll", (PyObject *)(void *)&srvsvc_NetShareEnumAll_Type);
   61604          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareGetInfo_Type);
   61605          35 :         PyModule_AddObject(m, "NetShareGetInfo", (PyObject *)(void *)&srvsvc_NetShareGetInfo_Type);
   61606          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareSetInfo_Type);
   61607          35 :         PyModule_AddObject(m, "NetShareSetInfo", (PyObject *)(void *)&srvsvc_NetShareSetInfo_Type);
   61608          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareDel_Type);
   61609          35 :         PyModule_AddObject(m, "NetShareDel", (PyObject *)(void *)&srvsvc_NetShareDel_Type);
   61610          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareDelSticky_Type);
   61611          35 :         PyModule_AddObject(m, "NetShareDelSticky", (PyObject *)(void *)&srvsvc_NetShareDelSticky_Type);
   61612          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareCheck_Type);
   61613          35 :         PyModule_AddObject(m, "NetShareCheck", (PyObject *)(void *)&srvsvc_NetShareCheck_Type);
   61614          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvGetInfo_Type);
   61615          35 :         PyModule_AddObject(m, "NetSrvGetInfo", (PyObject *)(void *)&srvsvc_NetSrvGetInfo_Type);
   61616          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSrvSetInfo_Type);
   61617          35 :         PyModule_AddObject(m, "NetSrvSetInfo", (PyObject *)(void *)&srvsvc_NetSrvSetInfo_Type);
   61618          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetDiskEnum_Type);
   61619          35 :         PyModule_AddObject(m, "NetDiskEnum", (PyObject *)(void *)&srvsvc_NetDiskEnum_Type);
   61620          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetServerStatisticsGet_Type);
   61621          35 :         PyModule_AddObject(m, "NetServerStatisticsGet", (PyObject *)(void *)&srvsvc_NetServerStatisticsGet_Type);
   61622          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportAdd_Type);
   61623          35 :         PyModule_AddObject(m, "NetTransportAdd", (PyObject *)(void *)&srvsvc_NetTransportAdd_Type);
   61624          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportEnum_Type);
   61625          35 :         PyModule_AddObject(m, "NetTransportEnum", (PyObject *)(void *)&srvsvc_NetTransportEnum_Type);
   61626          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetTransportDel_Type);
   61627          35 :         PyModule_AddObject(m, "NetTransportDel", (PyObject *)(void *)&srvsvc_NetTransportDel_Type);
   61628          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetRemoteTOD_Type);
   61629          35 :         PyModule_AddObject(m, "NetRemoteTOD", (PyObject *)(void *)&srvsvc_NetRemoteTOD_Type);
   61630          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSetServiceBits_Type);
   61631          35 :         PyModule_AddObject(m, "NetSetServiceBits", (PyObject *)(void *)&srvsvc_NetSetServiceBits_Type);
   61632          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetPathType_Type);
   61633          35 :         PyModule_AddObject(m, "NetPathType", (PyObject *)(void *)&srvsvc_NetPathType_Type);
   61634          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetPathCanonicalize_Type);
   61635          35 :         PyModule_AddObject(m, "NetPathCanonicalize", (PyObject *)(void *)&srvsvc_NetPathCanonicalize_Type);
   61636          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetPathCompare_Type);
   61637          35 :         PyModule_AddObject(m, "NetPathCompare", (PyObject *)(void *)&srvsvc_NetPathCompare_Type);
   61638          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetNameValidate_Type);
   61639          35 :         PyModule_AddObject(m, "NetNameValidate", (PyObject *)(void *)&srvsvc_NetNameValidate_Type);
   61640          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetPRNameCompare_Type);
   61641          35 :         PyModule_AddObject(m, "NetPRNameCompare", (PyObject *)(void *)&srvsvc_NetPRNameCompare_Type);
   61642          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareEnum_Type);
   61643          35 :         PyModule_AddObject(m, "NetShareEnum", (PyObject *)(void *)&srvsvc_NetShareEnum_Type);
   61644          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareDelStart_Type);
   61645          35 :         PyModule_AddObject(m, "NetShareDelStart", (PyObject *)(void *)&srvsvc_NetShareDelStart_Type);
   61646          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetShareDelCommit_Type);
   61647          35 :         PyModule_AddObject(m, "NetShareDelCommit", (PyObject *)(void *)&srvsvc_NetShareDelCommit_Type);
   61648          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetGetFileSecurity_Type);
   61649          35 :         PyModule_AddObject(m, "NetGetFileSecurity", (PyObject *)(void *)&srvsvc_NetGetFileSecurity_Type);
   61650          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetSetFileSecurity_Type);
   61651          35 :         PyModule_AddObject(m, "NetSetFileSecurity", (PyObject *)(void *)&srvsvc_NetSetFileSecurity_Type);
   61652          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetServerTransportAddEx_Type);
   61653          35 :         PyModule_AddObject(m, "NetServerTransportAddEx", (PyObject *)(void *)&srvsvc_NetServerTransportAddEx_Type);
   61654          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_NetServerSetServiceBitsEx_Type);
   61655          35 :         PyModule_AddObject(m, "NetServerSetServiceBitsEx", (PyObject *)(void *)&srvsvc_NetServerSetServiceBitsEx_Type);
   61656          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_InterfaceType);
   61657          35 :         PyModule_AddObject(m, "srvsvc", (PyObject *)(void *)&srvsvc_InterfaceType);
   61658          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_SyntaxType);
   61659          35 :         PyModule_AddObject(m, "srvsvc_abstract_syntax", (PyObject *)(void *)&srvsvc_SyntaxType);
   61660          35 :         Py_INCREF((PyObject *)(void *)&srvsvc_SyntaxType);
   61661          35 :         PyModule_AddObject(m, "abstract_syntax", (PyObject *)(void *)&srvsvc_SyntaxType);
   61662             : #ifdef PY_MOD_SRVSVC_PATCH
   61663             :         PY_MOD_SRVSVC_PATCH(m);
   61664             : #endif
   61665          35 :         out:
   61666          35 :         Py_XDECREF(dep_samba_dcerpc_misc);
   61667          35 :         Py_XDECREF(dep_samba_dcerpc_security);
   61668          35 :         Py_XDECREF(dep_samba_dcerpc_svcctl);
   61669          35 :         Py_XDECREF(dep_talloc);
   61670          35 :         Py_XDECREF(dep_samba_dcerpc_base);
   61671          35 :         return m;
   61672             : 
   61673             : }

Generated by: LCOV version 1.13